Methods Summary |
---|
public java.lang.reflect.AnnotatedElement | getAnnotatedElement()INTERNAL:
Return the actual field or method.
return m_annotatedElement;
|
public java.lang.String | getAttributeName()INTERNAL:
Set the relation type of this accessible object.
return m_attributeName;
|
public java.lang.Class | getMapKeyClass()INTERNAL:
This should only be called for accessor's of type Map. It will return
the Map key type if generics are used, null otherwise.
if (MetadataHelper.isGenericCollectionType(m_relationType)) {
// By default, the reference class is equal to the relation
// class. But if the relation class is a generic we need to
// extract and set the actual reference class from the generic.
return MetadataHelper.getMapKeyTypeFromGeneric(m_relationType);
} else {
return null;
}
|
public java.lang.String | getName()INTERNAL:
Set the relation type of this accessible object.
return m_name;
|
public java.lang.Class | getRawClass()INTERNAL:
Return the raw class for this accessible object. E.g. For an
accessible object with a type of java.util.Collection, this
method will return java.util.Collection.
if (m_rawClass == null) {
if (MetadataHelper.isGenericCollectionType(m_relationType)) {
// By default, the raw class is equal to the relation
// class. But if the relation class is a generic we need to
// extract and set the actual raw class from the generic.
m_rawClass = MetadataHelper.getRawClassFromGeneric(m_relationType);
} else {
m_rawClass = (Class) m_relationType;
}
}
return m_rawClass;
|
public java.lang.Class | getReferenceClassFromGeneric()INTERNAL:
Return the reference class from the generic specification on this
accessible object.
Here is what you will get back from this method given the following
scenarios:
1 - public Collection getTasks() => String.class
2 - public Map getTasks() => Integer.class
3 - public Employee getEmployee() => null
4 - public Collection getTasks() => null
5 - public Map getTasks() => null
if (MetadataHelper.isGenericCollectionType(m_relationType)) {
return MetadataHelper.getReturnTypeFromGeneric(m_relationType);
} else {
return null;
}
|
public java.lang.reflect.Type | getRelationType()INTERNAL:
Return the relation type of this accessible object.
return m_relationType;
|
public void | setAnnotatedElement(java.lang.reflect.AnnotatedElement annotatedElement)INTERNAL:
Set the annotated element for this accessible object.
Once the class loader changes, we need to be able to update our
classes.
m_annotatedElement = annotatedElement;
|
protected void | setAttributeName(java.lang.String attributeName)INTERNAL:
Set the relation type of this accessible object.
m_attributeName = attributeName;
|
protected void | setName(java.lang.String name)INTERNAL:
Set the relation type of this accessible object.
m_name = name;
|
protected void | setRelationType(java.lang.reflect.Type relationType)INTERNAL:
Set the relation type of this accessible object.
m_relationType = relationType;
|