Module org.eclipse.persistence.moxy
Class JAXBSetMethodAttributeAccessor
java.lang.Object
org.eclipse.persistence.mappings.AttributeAccessor
org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
org.eclipse.persistence.internal.jaxb.JAXBSetMethodAttributeAccessor
- All Implemented Interfaces:
Serializable
,Cloneable
,CoreAttributeAccessor
This accessor should be used when processing a class that uses method access,
and a has set method but no get method. The get method is required during
mapping initialization to determine the type of the set method's input
parameter, and an exception will occur if none is present. Using this
custom method accessor, the input parameter of the set method can be
set (as a string) and loaded (using the provided classloader) during
the initialization phase.
Two methods are overridden to avoid exceptions due to lack of a get
method:
- initializeAttributes
- getAttributeClass
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
getMethod, getMethodName, setMethod, setMethodName
Fields inherited from class org.eclipse.persistence.mappings.AttributeAccessor
attributeName, isReadOnly, isWriteOnly
-
Constructor Summary
ConstructorDescriptionJAXBSetMethodAttributeAccessor
(String parameterTypeAsString, ClassLoader loader) This constructor sets the set method input parameter type (as string) as well as the classloader that will be used to load the associated class during initialization. -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> Return the return type of the method accessor.void
initializeAttributes
(Class<?> theJavaClass) Override to avoid exceptions due to lack of get method.Methods inherited from class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
getAttributeValueFromObject, getAttributeValueFromObject, getGetMethod, getGetMethodName, getGetMethodReturnType, getSetMethod, getSetMethodName, getSetMethodParameterType, getSetMethodParameterType, getSetMethodParameterTypes, initializeAttributes, isInitialized, isMethodAttributeAccessor, setAttributeValueInObject, setAttributeValueInObject, setGetMethod, setGetMethodName, setSetMethod, setSetMethodName
Methods inherited from class org.eclipse.persistence.mappings.AttributeAccessor
clone, getAttributeName, isInstanceVariableAttributeAccessor, isMapValueAttributeAccessor, isReadOnly, isValuesAccessor, isVirtualAttributeAccessor, isWriteOnly, setAttributeName, setIsReadOnly, setIsWriteOnly
-
Constructor Details
-
JAXBSetMethodAttributeAccessor
This constructor sets the set method input parameter type (as string) as well as the classloader that will be used to load the associated class during initialization.
-
-
Method Details
-
initializeAttributes
Override to avoid exceptions due to lack of get method.- Specified by:
initializeAttributes
in interfaceCoreAttributeAccessor
- Overrides:
initializeAttributes
in classMethodAttributeAccessor
- Throws:
DescriptorException
-
getAttributeClass
Return the return type of the method accessor.- Specified by:
getAttributeClass
in interfaceCoreAttributeAccessor
- Overrides:
getAttributeClass
in classMethodAttributeAccessor
-