Package org.simpleframework.xml.core
Class ParameterFactory.ParameterBuilder
- java.lang.Object
-
- org.simpleframework.xml.core.ParameterFactory.ParameterBuilder
-
- Enclosing class:
- ParameterFactory
private static class ParameterFactory.ParameterBuilder extends java.lang.Object
TheParameterBuilder
is used to create a constructor that can be used to instantiate the correct parameter for the XML annotation specified. The constructor requires three arguments, the constructor, the annotation, and the index.
- See Also:
Constructor
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class
entry
This is the entry that is used to create the parameter.private java.lang.Class
label
This is the XML annotation type within the constructor.private java.lang.Class
type
This is the parameter type that is to be instantiated.
-
Constructor Summary
Constructors Constructor Description ParameterBuilder(java.lang.Class type, java.lang.Class label)
Constructor for thePameterBuilder
object.ParameterBuilder(java.lang.Class type, java.lang.Class label, java.lang.Class entry)
Constructor for thePameterBuilder
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.Constructor
getConstructor()
Creates the constructor used to instantiate the label for the XML annotation.java.lang.reflect.Constructor
getConstructor(java.lang.Class label)
Creates the constructor used to instantiate the parameter for the XML annotation.private java.lang.reflect.Constructor
getConstructor(java.lang.Class... types)
Creates the constructor used to instantiate the parameter for the XML annotation.java.lang.reflect.Constructor
getConstructor(java.lang.Class label, java.lang.Class entry)
Creates the constructor used to instantiate the parameter for the XML annotation.
-
-
-
Field Detail
-
entry
private final java.lang.Class entry
This is the entry that is used to create the parameter.
-
label
private final java.lang.Class label
This is the XML annotation type within the constructor.
-
type
private final java.lang.Class type
This is the parameter type that is to be instantiated.
-
-
Constructor Detail
-
ParameterBuilder
public ParameterBuilder(java.lang.Class type, java.lang.Class label)
Constructor for thePameterBuilder
object. This pairs the parameter type with the annotation argument used within the constructor. This allows constructor to be selected.- Parameters:
type
- this is the parameter type to be instantiatedlabel
- the type that is used within the constructor
-
ParameterBuilder
public ParameterBuilder(java.lang.Class type, java.lang.Class label, java.lang.Class entry)
Constructor for thePameterBuilder
object. This pairs the parameter type with the annotation argument used within the constructor. This allows constructor to be selected.- Parameters:
type
- this is the parameter type to be instantiatedlabel
- the type that is used within the constructorentry
- this is the entry used to create the parameter
-
-
Method Detail
-
getConstructor
public java.lang.reflect.Constructor getConstructor() throws java.lang.Exception
Creates the constructor used to instantiate the label for the XML annotation. The constructor returned will take two arguments, a contact and the XML annotation type.- Returns:
- returns the constructor for the label object
- Throws:
java.lang.Exception
-
getConstructor
public java.lang.reflect.Constructor getConstructor(java.lang.Class label) throws java.lang.Exception
Creates the constructor used to instantiate the parameter for the XML annotation. The constructor returned will take two arguments, a contact and the XML annotation type.- Parameters:
label
- the type that is used within the constructor- Returns:
- returns the constructor for the parameter object
- Throws:
java.lang.Exception
-
getConstructor
public java.lang.reflect.Constructor getConstructor(java.lang.Class label, java.lang.Class entry) throws java.lang.Exception
Creates the constructor used to instantiate the parameter for the XML annotation. The constructor returned will take two arguments, a contact and the XML annotation type.- Parameters:
label
- the type that is used within the constructorentry
- this is the entry used to create the parameter- Returns:
- returns the constructor for the parameter object
- Throws:
java.lang.Exception
-
getConstructor
private java.lang.reflect.Constructor getConstructor(java.lang.Class... types) throws java.lang.Exception
Creates the constructor used to instantiate the parameter for the XML annotation. The constructor returned will take three arguments, a constructor, an annotation and a type.- Parameters:
types
- these are the arguments for the constructor- Returns:
- returns the constructor for the parameter object
- Throws:
java.lang.Exception
-
-