org.trails.descriptor
Class ReflectionDescriptorFactory
java.lang.Object
org.trails.descriptor.ReflectionDescriptorFactory
- All Implemented Interfaces:
- DescriptorFactory
public class ReflectionDescriptorFactory
- extends java.lang.Object
- implements DescriptorFactory
Generate descriptors using reflection on the underlying class.
ReflectionDescriptorFactory.buildClassDescriptor() is the only public method
here.
|
Field Summary |
protected static org.apache.commons.logging.Log |
LOG
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.commons.logging.Log LOG
ReflectionDescriptorFactory
public ReflectionDescriptorFactory()
buildClassDescriptor
public IClassDescriptor buildClassDescriptor(java.lang.Class type)
- Given a type, build a property descriptor
- Specified by:
buildClassDescriptor in interface DescriptorFactory
- Parameters:
type - The type to build for
- Returns:
- a completed property descriptor
buildPropertyDescriptors
protected java.util.ArrayList<IPropertyDescriptor> buildPropertyDescriptors(java.lang.Class beanType,
java.beans.BeanInfo beanInfo,
IClassDescriptor parentClassDescriptor)
throws java.lang.Exception
- Build the set of property descriptors for this type
- Parameters:
beanType - the aggregating classbeanInfo - the BeanInfo, already gatheredparentClassDescriptor - reference to the aggregating class, used for recovery with
graph traversal
- Returns:
- ObjectReferenceDescriptor if this property is an association,
otherwise a TrailsPropertyDescriptor
- Throws:
java.lang.Exception
buildMethodDescriptors
protected java.util.ArrayList<IMethodDescriptor> buildMethodDescriptors(java.lang.Class type,
java.beans.BeanInfo beanInfo,
IClassDescriptor parentClassDescriptor)
throws java.lang.Exception
- Throws:
java.lang.Exception
isExcluded
protected boolean isExcluded(java.lang.String name,
java.util.List excludes)
getMethodExcludes
public java.util.List getMethodExcludes()
setMethodExcludes
public void setMethodExcludes(java.util.List methodExcludes)
- Specified by:
setMethodExcludes in interface DescriptorFactory
getPropertyExcludes
public java.util.List getPropertyExcludes()
setPropertyExcludes
public void setPropertyExcludes(java.util.List propertyExcludes)
- Specified by:
setPropertyExcludes in interface DescriptorFactory
Copyright © 2004-2008. All Rights Reserved.