public class AggregateClassAccessor extends Object implements ClassAccessor
Modifier and Type | Class and Description |
---|---|
class |
AggregateClassAccessor.AliasPropertyAccessor |
class |
AggregateClassAccessor.PropertyAccessorWrapper |
Modifier and Type | Field and Description |
---|---|
protected List<ClassAccessor> |
accessors |
protected List<String> |
aliases |
protected Class<? extends List> |
collectionClass |
static String |
copyright |
protected PropertyAccessor[] |
keyProperties |
protected String |
name |
protected PropertyAccessor[] |
properties |
Constructor and Description |
---|
AggregateClassAccessor(ClassAccessor... accessors) |
AggregateClassAccessor(List<ClassAccessor> accessors) |
Modifier and Type | Method and Description |
---|---|
void |
alias(int index,
String alias) |
protected void |
computeKeyProperties() |
protected void |
computeProperties() |
List<ClassAccessor> |
getAccessors() |
String |
getAlias(int index) |
<T extends Annotation> |
getAnnotation(Class<T> annotationClass) |
Annotation[] |
getAnnotations() |
Class<? extends List> |
getCollectionClass() |
Annotation[] |
getDeclaredAnnotations() |
PropertyAccessor[] |
getKeyProperties() |
String |
getName() |
PropertyAccessor[] |
getProperties() |
PropertyAccessor |
getProperty(String propertyName) |
Class<?> |
getType()
The type of the objects this accessor can operate on.
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass) |
Object |
newInstance() |
void |
setCollectionClass(Class<? extends List> collectionClass) |
void |
setName(String name) |
public static final String copyright
protected final List<ClassAccessor> accessors
protected String name
protected PropertyAccessor[] properties
protected PropertyAccessor[] keyProperties
public AggregateClassAccessor(List<ClassAccessor> accessors)
public AggregateClassAccessor(ClassAccessor... accessors)
public void alias(int index, String alias)
public String getAlias(int index)
public List<ClassAccessor> getAccessors()
public String getName()
getName
in interface ClassAccessor
public Class<?> getType()
ClassAccessor
getType
in interface ClassAccessor
public void setName(String name)
protected void computeProperties()
protected void computeKeyProperties()
public PropertyAccessor getProperty(String propertyName) throws NoSuchFieldException
getProperty
in interface ClassAccessor
NoSuchFieldException
public PropertyAccessor[] getProperties()
getProperties
in interface ClassAccessor
public PropertyAccessor[] getKeyProperties()
getKeyProperties
in interface ClassAccessor
public Object newInstance()
newInstance
in interface ClassAccessor
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
isAnnotationPresent
in interface AnnotatedElement
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
getAnnotation
in interface AnnotatedElement
public Annotation[] getAnnotations()
getAnnotations
in interface AnnotatedElement
public Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations
in interface AnnotatedElement