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, setIsWriteOnly
public java.lang.Class getAttributeClass()
getAttributeClass
in interface CoreAttributeAccessor
getAttributeClass
in class AttributeAccessor
public java.lang.Object getAttributeValueFromObject(java.lang.Object anObject) throws DescriptorException
getAttributeValueFromObject
in interface CoreAttributeAccessor
getAttributeValueFromObject
in class AttributeAccessor
DescriptorException
public java.lang.reflect.Method getGetMethod()
public java.lang.String getGetMethodName()
public java.lang.Class getGetMethodReturnType() throws DescriptorException
DescriptorException
public java.lang.String getSetMethodName()
public java.lang.Class getSetMethodParameterType()
public void initializeAttributes(java.lang.Class theJavaClass) throws DescriptorException
initializeAttributes
in interface CoreAttributeAccessor
initializeAttributes
in class AttributeAccessor
DescriptorException
public boolean isInitialized()
isInitialized
in class AttributeAccessor
public boolean isMethodAttributeAccessor()
isMethodAttributeAccessor
in interface CoreAttributeAccessor
isMethodAttributeAccessor
in class AttributeAccessor
public void setAttributeValueInObject(java.lang.Object domainObject, java.lang.Object attributeValue) throws DescriptorException
setAttributeValueInObject
in interface CoreAttributeAccessor
setAttributeValueInObject
in class AttributeAccessor
DescriptorException
public void setGetMethodName(java.lang.String getMethodName)
public void setSetMethodName(java.lang.String setMethodName)
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference