public class TypeUtility extends Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Creates an instance of the given type filled with the data provided by the given Data-Structure (a mixture of array and
public static <T> T toType(Object aValue, Class<T> aType) throws InstantiationException, IllegalAccessException, NoSuchMethodException, SecurityException, InvocationTargetException, ClassNotFoundException
T- the generic type
aValue- The Data-Structure, a mixture of arrays and
Mapinstance, from which to construct the instance of the given type.
aType- The type for which an instance is to be created.
InstantiationException- thrown when an application tries to create an instance of a class using the newInstance method in class
Class, but the specified class object cannot be instantiated.
IllegalAccessException- thrown when an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, but the currently executing method does not have access to the definition of the specified class, field, method or constructor.
NoSuchMethodException- thrown when a particular method cannot be found.
SecurityException- thrown by the security manager to indicate a security violation.
InvocationTargetException- wraps an exception thrown by an invoked method or constructor.
ClassNotFoundException- thrown when an application tries to load in a class through its string name but no definition for the class with the specified name could be found.
Copyright © 2017. All rights reserved.