Top Description Fields Constructors Methods
org.eclipse.persistence.internal.descriptors

public Class MethodAttributeAccessor

extends AttributeAccessor
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.descriptors.VirtualAttributeAccessor
Imports
java.lang.reflect.InvocationTargetException, .Method, org.eclipse.persistence.exceptions.DescriptorException, org.eclipse.persistence.internal.helper.ConversionManager, .Helper, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, org.eclipse.persistence.logging.AbstractSessionLog, .SessionLog, org.eclipse.persistence.mappings.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.

Author
Sati
Since
TOPLink/Java 1.0

Field Summary

Modifier and TypeField and Description
protected transient Method
protected String
protected transient Method
protected String
Inherited from org.eclipse.persistence.mappings.AttributeAccessor:
attributeNameisReadOnlyisWriteOnly

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Class<?>
public Object
protected Object
getAttributeValueFromObject(final Object anObject, final Object[] parameters)

Gets the value of an instance variable in the object.

public Method
getGetMethod()

Return the accessor method for the attribute accessor.

public String
getGetMethodName()

Return the name of the accessor method for the attribute accessor.

public Class<?>
getGetMethodReturnType()

INTERNAL: Return the GetMethod return type for this MethodAttributeAccessor.

protected Method
getSetMethod()

Return the set method for the attribute accessor.

public String
getSetMethodName()

Return the name of the set method for the attribute accessor.

public Class<?>
protected Class<?>
protected Class<?>[]
public void
initializeAttributes(Class<?> theJavaClass)

Overrides org.eclipse.persistence.mappings.AttributeAccessor.initializeAttributes.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.initializeAttributes.

Set get and set method after creating these methods by using get and set method names
protected void
initializeAttributes(Class<?> theJavaClass, Class<?>[] getParameterTypes)

Set get and set method after creating these methods by using get and set method names

public boolean
isInitialized()

Overrides org.eclipse.persistence.mappings.AttributeAccessor.isInitialized.

Returns true if this attribute accessor has been initialized and now stores a reference to the class's attribute.
public boolean
public void
setAttributeValueInObject(Object domainObject, Object attributeValue)

Implements abstract org.eclipse.persistence.mappings.AttributeAccessor.setAttributeValueInObject.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.setAttributeValueInObject.

Sets the value of the instance variable in the object to the value.
protected void
setAttributeValueInObject(final Object domainObject, final Object attributeValue, final Object[] parameters)

Sets the value of the instance variable in the object to the value.

protected void
setGetMethod(Method getMethod)

Set the accessor method for the attribute accessor.

public void
setGetMethodName(String getMethodName)

Set the name of the accessor method for the attribute accessor.

protected void
setSetMethod(Method setMethod)

Set the set method for the attribute accessor.

public void
setSetMethodName(String setMethodName)

Set the name of the set method for the attribute accessor.

Inherited from org.eclipse.persistence.mappings.AttributeAccessor:
clonegetAttributeNameisInstanceVariableAttributeAccessorisMapValueAttributeAccessorisReadOnlyisValuesAccessorisVirtualAttributeAccessorisWriteOnlysetAttributeNamesetIsReadOnlysetIsWriteOnly

Field Detail

getMethodback to summary
protected transient Method getMethod
getMethodNameback to summary
protected String getMethodName
setMethodback to summary
protected transient Method setMethod
setMethodNameback to summary
protected String setMethodName

Constructor Detail

MethodAttributeAccessorback to summary
public MethodAttributeAccessor()

Method Detail

getAttributeClassback to summary
public Class<?> getAttributeClass()

Overrides org.eclipse.persistence.mappings.AttributeAccessor.getAttributeClass.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.getAttributeClass.

Return the return type of the method accessor.

Annotations
@Override
getAttributeValueFromObjectback to summary
public Object getAttributeValueFromObject(Object anObject) throws DescriptorException

Implements abstract org.eclipse.persistence.mappings.AttributeAccessor.getAttributeValueFromObject.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.getAttributeValueFromObject.

Gets the value of an instance variable in the object.

Annotations
@Override
getAttributeValueFromObjectback to summary
protected Object getAttributeValueFromObject(final Object anObject, final Object[] parameters) throws DescriptorException

Gets the value of an instance variable in the object.

getGetMethodback to summary
public Method getGetMethod()

Return the accessor method for the attribute accessor. 266912: For Metamodel API - change visibility from protected

getGetMethodNameback to summary
public String getGetMethodName()

Return the name of the accessor method for the attribute accessor.

getGetMethodReturnTypeback to summary
public Class<?> getGetMethodReturnType() throws DescriptorException

INTERNAL: Return the GetMethod return type for this MethodAttributeAccessor. A special check is made to determine if a missing method is a result of failed weaving.

getSetMethodback to summary
protected Method getSetMethod()

Return the set method for the attribute accessor.

getSetMethodNameback to summary
public String getSetMethodName()

Return the name of the set method for the attribute accessor.

getSetMethodParameterTypeback to summary
public Class<?> getSetMethodParameterType()
getSetMethodParameterTypeback to summary
protected Class<?> getSetMethodParameterType(int index)
getSetMethodParameterTypesback to summary
protected Class<?>[] getSetMethodParameterTypes()
initializeAttributesback to summary
public void initializeAttributes(Class<?> theJavaClass) throws DescriptorException

Overrides org.eclipse.persistence.mappings.AttributeAccessor.initializeAttributes.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.initializeAttributes.

Set get and set method after creating these methods by using get and set method names

Annotations
@Override
initializeAttributesback to summary
protected void initializeAttributes(Class<?> theJavaClass, Class<?>[] getParameterTypes) throws DescriptorException

Set get and set method after creating these methods by using get and set method names

isInitializedback to summary
public boolean isInitialized()

Overrides org.eclipse.persistence.mappings.AttributeAccessor.isInitialized.

Returns true if this attribute accessor has been initialized and now stores a reference to the class's attribute. An attribute accessor can become uninitialized on serialization.

Annotations
@Override
isMethodAttributeAccessorback to summary
public boolean isMethodAttributeAccessor()

Overrides org.eclipse.persistence.mappings.AttributeAccessor.isMethodAttributeAccessor.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.isMethodAttributeAccessor.

Annotations
@Override
setAttributeValueInObjectback to summary
public void setAttributeValueInObject(Object domainObject, Object attributeValue) throws DescriptorException

Implements abstract org.eclipse.persistence.mappings.AttributeAccessor.setAttributeValueInObject.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.setAttributeValueInObject.

Sets the value of the instance variable in the object to the value.

Annotations
@Override
setAttributeValueInObjectback to summary
protected void setAttributeValueInObject(final Object domainObject, final Object attributeValue, final Object[] parameters) throws DescriptorException

Sets the value of the instance variable in the object to the value.

setGetMethodback to summary
protected void setGetMethod(Method getMethod)

Set the accessor method for the attribute accessor.

setGetMethodNameback to summary
public void setGetMethodName(String getMethodName)

Set the name of the accessor method for the attribute accessor.

setSetMethodback to summary
protected void setSetMethod(Method setMethod)

Set the set method for the attribute accessor.

setSetMethodNameback to summary
public void setSetMethodName(String setMethodName)

Set the name of the set method for the attribute accessor.