public final class Reflect extends Object
A series of basic Reflect based utility functions. In most cases, exceptions thrown by the Reflect API methods
are caught and ignored choosing to return an
Optional with no value instead.
|Modifier and Type||Method and Description|
Returns the class with the given name.
Get the constructor of the class with the given arguments.
Optionalwith an absent value will be returned instead. Similarly, if a ClassCastException is thrown, because the class name is valid, but is not of the correct type of class requested by the user, an Optional without a value will be returned..
theClassName- the class name
public static <T> com.google.common.base.Optional<Constructor<T>> getConstructor(Class<T> theClass, Class<?>... theArgTypes)
Optionalwithout a value is returned.
T- the class type
theClass- the class to get the constructor of
theArgTypes- the arguments to the constructor
Copyright © 2010-2016 Stardog Union. All Rights Reserved.