public class DefaultCustomType extends Object
Method
which would be responsible for instantiating new Objects. A typical scenario wherein this would be required is when
dealing with Enum
wherein some custom method within the Enum
is responsible for creation of new
Objects. Other use cases would include, the involvement of a class with one or more custom methods for new object
instantiations (Factories are good examples of this).Constructor and Description |
---|
DefaultCustomType(Class<?> typeToUseForInstantiation,
Method instantiationMechanism)
Use this constructor when you have static method that is involved in creating instances.
|
DefaultCustomType(Constructor<?> constructorToInvoke)
Use this constructor when you would like to have a new object created via a custom constructor.
|
DefaultCustomType(Object objectToUseForInstantiation,
Method instantiationMechanism) |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getCustomTypeClass() |
Object |
instantiateObject(Object... args) |
public DefaultCustomType(Object objectToUseForInstantiation, Method instantiationMechanism)
public DefaultCustomType(Class<?> typeToUseForInstantiation, Method instantiationMechanism)
public DefaultCustomType(Constructor<?> constructorToInvoke)
constructorToInvoke
- - The Constructor
that should be invoked.Copyright © 2016 PayPal Open Source. All rights reserved.