public class MethodAttributeAccessor extends AttributeAccessor
Purpose: A wrapper class for handling cases when the domain object attributes are to be accessed thru the accessor methods. This could happen if the variables are not defined public in the domain object.
| Constructor and Description |
|---|
MethodAttributeAccessor() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class |
getAttributeClass()
Return the return type of the method accessor.
|
java.lang.Object |
getAttributeValueFromObject(java.lang.Object anObject)
Gets the value of an instance variable in the object.
|
java.lang.reflect.Method |
getGetMethod()
Return the accessor method for the attribute accessor.
|
java.lang.String |
getGetMethodName()
Return the name of the accessor method for the attribute accessor.
|
java.lang.Class |
getGetMethodReturnType()
INTERNAL:
Return the GetMethod return type for this MethodAttributeAccessor.
|
java.lang.String |
getSetMethodName()
Return the name of the set method for the attribute accessor.
|
java.lang.Class |
getSetMethodParameterType() |
void |
initializeAttributes(java.lang.Class theJavaClass)
Set get and set method after creating these methods by using
get and set method names
|
boolean |
isInitialized()
Returns true if this attribute accessor has been initialized and now stores a reference to the
class's attribute.
|
boolean |
isMethodAttributeAccessor() |
void |
setAttributeValueInObject(java.lang.Object domainObject,
java.lang.Object attributeValue)
Sets the value of the instance variable in the object to the value.
|
void |
setGetMethodName(java.lang.String getMethodName)
Set the name of the accessor method for the attribute accessor.
|
void |
setSetMethodName(java.lang.String setMethodName)
Set the name of the set method for the attribute accessor.
|
clone, getAttributeName, isInstanceVariableAttributeAccessor, isMapValueAttributeAccessor, isReadOnly, isValuesAccessor, isVirtualAttributeAccessor, isWriteOnly, setAttributeName, setIsReadOnly, setIsWriteOnlypublic java.lang.Class getAttributeClass()
getAttributeClass in interface CoreAttributeAccessorgetAttributeClass in class AttributeAccessorpublic java.lang.Object getAttributeValueFromObject(java.lang.Object anObject)
throws DescriptorException
getAttributeValueFromObject in interface CoreAttributeAccessorgetAttributeValueFromObject in class AttributeAccessorDescriptorExceptionpublic java.lang.reflect.Method getGetMethod()
public java.lang.String getGetMethodName()
public java.lang.Class getGetMethodReturnType()
throws DescriptorException
DescriptorExceptionpublic java.lang.String getSetMethodName()
public java.lang.Class getSetMethodParameterType()
public void initializeAttributes(java.lang.Class theJavaClass)
throws DescriptorException
initializeAttributes in interface CoreAttributeAccessorinitializeAttributes in class AttributeAccessorDescriptorExceptionpublic boolean isInitialized()
isInitialized in class AttributeAccessorpublic boolean isMethodAttributeAccessor()
isMethodAttributeAccessor in interface CoreAttributeAccessorisMethodAttributeAccessor in class AttributeAccessorpublic void setAttributeValueInObject(java.lang.Object domainObject,
java.lang.Object attributeValue)
throws DescriptorException
setAttributeValueInObject in interface CoreAttributeAccessorsetAttributeValueInObject in class AttributeAccessorDescriptorExceptionpublic void setGetMethodName(java.lang.String getMethodName)
public void setSetMethodName(java.lang.String setMethodName)
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference