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
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
Build and return a new instance, using the factory.void
INTERNAL: Convert all the class-name-based settings in this InstantiationPolicy to actual class-based settings.protected void
Initialize the method.void
setDefaultValues
(Object[] values) void
setParameterTypeNames
(String[] parameterTypeNames) void
setParameterTypes
(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:InstantiationPolicy
INTERNAL: 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:
convertClassNamesToClasses
in classInstantiationPolicy
-
initializeMethod
Description copied from class:InstantiationPolicy
Initialize the method. It is either a static on the descriptor class, or it is a non-static on the factory.- Overrides:
initializeMethod
in 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:
buildNewInstanceUsingFactory
in classInstantiationPolicy
- Throws:
DescriptorException
-