| Modifier and Type | Method and Description |
|---|---|
static <T extends Struct> |
createStruct(Class<?>[] _constructorArgs,
Object _values,
Class<T> _classToConstruct)
Will create a new
Struct subclass instance if possible. |
static <T extends Struct> |
createStructFromVariant(Variant<?> _variant,
Class<T> _structClass)
Creates a instance of the given
Struct subclass if the given variant is some sort of Struct. |
public static <T extends Struct> T createStructFromVariant(Variant<?> _variant, Class<T> _structClass) throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
Struct subclass if the given variant is some sort of Struct._variant - variant to convert_structClass - Struct subclass to createNoSuchMethodException - when no constructor can be found for the arguments of the structSecurityException - when constructor cannot be accessesInstantiationException - when reflection failsIllegalAccessException - if this Constructor object is enforcing Java language access control and the underlying constructor is inaccessible.IllegalArgumentException - when data types are incompatibleInvocationTargetException - if the underlying constructor throws an exceptionpublic static <T extends Struct> T createStruct(Class<?>[] _constructorArgs, Object _values, Class<T> _classToConstruct) throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
Struct subclass instance if possible.
May replace Wrapper-classes with primitive classes in _constructorArgs if constructor does not match._constructorArgs - argument-classes expected by constructor_values - values passed to the constructor_classToConstruct - Struct subclass to instantiateNoSuchMethodException - when no constructor can be found for the arguments of the structSecurityException - when constructor cannot be accessesInstantiationException - when reflection failsIllegalAccessException - if this Constructor object is enforcing Java language access control and the underlying constructor is inaccessible.IllegalArgumentException - when data types are incompatibleInvocationTargetException - if the underlying constructor throws an exceptionCopyright © 2020. All rights reserved.