Module org.eclipse.persistence.moxy
Class MultiArgInstantiationPolicy
java.lang.Object
org.eclipse.persistence.internal.core.descriptors.CoreInstantiationPolicy
org.eclipse.persistence.internal.descriptors.InstantiationPolicy
org.eclipse.persistence.internal.jaxb.MultiArgInstantiationPolicy
- All Implemented Interfaces:
Serializable,Cloneable
Purpose:
Provide a version of Instantiation Policy that can make use of a multiple argument factory method.
The defaultValues specified on this policy will be passed in to the factory method for the parameter values.
This is required for certain JAXB generated classes that have no 0 arg constructor and a factory method with multiple arguments.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.descriptors.InstantiationPolicy
descriptor, factory, factoryClass, factoryClassName, factoryMethodName, method, methodName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectBuild and return a new instance, using the factory.voidINTERNAL: Convert all the class-name-based settings in this InstantiationPolicy to actual class-based settings.protected voidInitialize the method.voidsetDefaultValues(Object[] values) voidsetParameterTypeNames(String[] parameterTypeNames) voidsetParameterTypes(Class<?>[] parameterTypes) Methods inherited from class org.eclipse.persistence.internal.descriptors.InstantiationPolicy
buildDefaultConstructor, buildDefaultConstructorFor, buildFactory, buildFactoryDefaultConstructor, buildFactoryUsingDefaultConstructor, buildFactoryUsingStaticMethod, buildMethod, buildNewInstance, buildNewInstanceUsingDefaultConstructor, clone, getDefaultConstructor, getDescriptor, getFactory, getFactoryClass, getFactoryClassName, getFactoryMethodName, getMethod, getMethodName, initialize, isUsingDefaultConstructor, setDefaultConstructor, setDescriptor, setFactory, setFactoryClass, setFactoryClassName, setFactoryMethodName, setMethod, setMethodName, toString, useDefaultConstructorInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useMethodInstantiationPolicy
-
Constructor Details
-
MultiArgInstantiationPolicy
public MultiArgInstantiationPolicy()
-
-
Method Details
-
setParameterTypeNames
-
setParameterTypes
-
setDefaultValues
-
convertClassNamesToClasses
Description copied from class:InstantiationPolicyINTERNAL: Convert all the class-name-based settings in this InstantiationPolicy to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.- Overrides:
convertClassNamesToClassesin classInstantiationPolicy
-
initializeMethod
Description copied from class:InstantiationPolicyInitialize the method. It is either a static on the descriptor class, or it is a non-static on the factory.- Overrides:
initializeMethodin classInstantiationPolicy- Throws:
DescriptorException
-
buildNewInstanceUsingFactory
Build and return a new instance, using the factory. The factory can be null, in which case the method is a static method defined by the descriptor class.- Overrides:
buildNewInstanceUsingFactoryin classInstantiationPolicy- Throws:
DescriptorException
-