public final class Invoke extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Annotation> |
invokeAnnotation(T annotation,
String attributeName)
Invoke the method with the name
attributeName on the
annotation . |
static <T> T |
invokeConstructor(Class<T> toInstantiate)
Invoke the default/non-arg constructor from
toInstantiate . |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
boolean argument)
Invoke the boolean constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Boolean argument)
Invoke the Boolean constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
byte argument)
Invoke the byte constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Byte argument)
Invoke the Byte constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
char argument)
Invoke the char constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Character argument)
Invoke the Character constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Class<?>[] argumentTypes,
Object[] argument)
Invoke the constructor from
toInstantiate with the parameter
specified by parameterTypes and provides parameterValues
as parameters. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Class<?> argumentType,
Object argument)
Invoke the constructor from
toInstantiate with the parameter
specified by parameterTypes and provides parameterValues
as parameters. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
double argument)
Invoke the double constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Double argument)
Invoke the Double constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
int argument)
Invoke the int constructor from
toInstantiate with
parameterValues as parameters. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Integer argument)
Invoke the Integer constructor from
toInstantiate with
parameterValues as parameters. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
long argument)
Invoke the long constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Long argument)
Invoke the Long constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
short argument)
Invoke the short constructor from
toInstantiate with
parameterValues as parameter. |
static <T> T |
invokeConstructor(Class<T> toInstantiate,
Short argument)
Invoke the Short constructor from
toInstantiate with
parameterValues as parameter. |
public static <T> T invokeConstructor(Class<T> toInstantiate, Class<?>[] argumentTypes, Object[] argument)
toInstantiate
with the parameter
specified by parameterTypes
and provides parameterValues
as parameters.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargumentTypes
- - the parameter types of the constructor to useargument
- - the values to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate)
toInstantiate
.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdpublic static <T> T invokeConstructor(Class<T> toInstantiate, Class<?> argumentType, Object argument)
toInstantiate
with the parameter
specified by parameterTypes
and provides parameterValues
as parameters.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargumentType
- - the parameter type of the constructor to useargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, int argument)
toInstantiate
with
parameterValues
as parameters.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, Integer argument)
toInstantiate
with
parameterValues
as parameters.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, boolean argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, Boolean argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, byte argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, Byte argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, char argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, Character argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, double argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, Double argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, long argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, Long argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, short argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T> T invokeConstructor(Class<T> toInstantiate, Short argument)
toInstantiate
with
parameterValues
as parameter.T
- - type of class to instantiatetoInstantiate
- - class object from which a new instance is to be createdargument
- - the value to pass to the constructorpublic static <T extends Annotation> Object invokeAnnotation(T annotation, String attributeName)
attributeName
on the
annotation
.
As result the value of attributeName
is returned.T
- - the annotation classannotation
- - annotationattributeName
- - attribute nameCopyright © 2014–2015. All rights reserved.