T
- type of the element occupying each array slot.public class CtorAndArgs<T>
extends java.lang.Object
StructuredArray
)Constructor and Description |
---|
CtorAndArgs(java.lang.Class<T> instanceClass)
Create a
CtorAndArgs instance for the given instanceClass, using the default constructor (and no args) |
CtorAndArgs(java.lang.Class<T> instanceClass,
java.lang.Class[] constructorArgTypes,
java.lang.Object... args)
Create a
CtorAndArgs instance for the given instanceClass, with a constructor
identified by the constructorArgTypes, and using the args provides. |
CtorAndArgs(java.lang.reflect.Constructor<T> constructor,
java.lang.Object... args)
Create a
CtorAndArgs instance. |
CtorAndArgs(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.Class<T> instanceClass)
Create a
CtorAndArgs instance for the given instanceClass, using the default constructor (and no args) |
CtorAndArgs(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.Class<T> instanceClass,
java.lang.Class[] constructorArgTypes,
java.lang.Object... args)
Create a
CtorAndArgs instance for the given instanceClass, with a constructor
identified by the constructorArgTypes, and using the args provides. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
getArgs() |
java.lang.reflect.Constructor<T> |
getConstructor() |
java.lang.Object |
getContextCookie()
Get the value of the opaque contextCookie object
|
CtorAndArgs<T> |
setArgs(java.lang.Object... args)
Set the constructor arguments to be indicated in this CtorAndArgs.
|
CtorAndArgs<T> |
setConstructor(java.lang.reflect.Constructor<T> constructor)
Set the constructor to be indicated in this
CtorAndArgs . |
void |
setContextCookie(java.lang.Object contextCookie)
Set the value of the opaque contextCookie object
|
public CtorAndArgs(java.lang.reflect.Constructor<T> constructor, java.lang.Object... args)
CtorAndArgs
instance. The presumption is that types in args
match those expected by constructor. Obviously exceptions may be generated at construction time if
this is not the case.constructor
- Constructor to be indicated in this CtorAndArgs
args
- constructor arguments to be indicated in this CtorAndArgs
public CtorAndArgs(java.lang.Class<T> instanceClass, java.lang.Class[] constructorArgTypes, java.lang.Object... args)
CtorAndArgs
instance for the given instanceClass, with a constructor
identified by the constructorArgTypes, and using the args provides. The presumption is
that types in args match those expected by constructor. Obviously exceptions may be
generated at construction time if this is not the case.instanceClass
- The class which the constructor in this CtorAndArgs
will instantiateconstructorArgTypes
- The argument types expected by the constructorargs
- constructor arguments to be indicated in this CtorAndArgs
public CtorAndArgs(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.Class<T> instanceClass, java.lang.Class[] constructorArgTypes, java.lang.Object... args)
CtorAndArgs
instance for the given instanceClass, with a constructor
identified by the constructorArgTypes, and using the args provides. The presumption is
that types in args match those expected by constructor. Obviously exceptions may be
generated at construction time if this is not the case.lookup
- The lookup object to use when resolving constructorsinstanceClass
- The class which the constructor in this CtorAndArgs
will instantiateconstructorArgTypes
- The argument types expected by the constructorargs
- constructor arguments to be indicated in this CtorAndArgs
public CtorAndArgs(java.lang.Class<T> instanceClass)
CtorAndArgs
instance for the given instanceClass, using the default constructor (and no args)instanceClass
- The class which the constructor in this CtorAndArgs
will instantiatepublic CtorAndArgs(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.Class<T> instanceClass)
CtorAndArgs
instance for the given instanceClass, using the default constructor (and no args)lookup
- The lookup object to use when resolving constructorsinstanceClass
- The class which the constructor in this CtorAndArgs
will instantiatepublic final java.lang.reflect.Constructor<T> getConstructor()
public final CtorAndArgs<T> setConstructor(java.lang.reflect.Constructor<T> constructor)
CtorAndArgs
. Enables recycling of
CtorAndArgs
objects to avoid re-allocation. E.g. in copy construction loops.constructor
- Constructor to be indicated in this CtorAndArgsCtorAndArgs
instance operated onpublic final java.lang.Object[] getArgs()
public final CtorAndArgs<T> setArgs(java.lang.Object... args)
CtorAndArgs
objects to avoid re-allocation. E.g. in copy construction loops.args
- constructor arguments to be indicated in this CtorAndArgs
CtorAndArgs
instance operated onpublic java.lang.Object getContextCookie()
public void setContextCookie(java.lang.Object contextCookie)
contextCookie
- carries an opaque object