Package net.thevpc.common.util
Class TypeReference<T>
java.lang.Object
net.thevpc.common.util.TypeReference<T>
- All Implemented Interfaces:
Serializable
This is super type token implementation as described in
http://gafter.blogspot.com/2006/12/super-type-tokens.html
References a generic type.
- Author:
- crazybob@google.com (Bob Lee)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetType()Gets the referenced type.inthashCode()booleanisAssignableFrom(TypeReference<?> cls) <T> booleanisInstance(T t) booleanInstantiates a new instance ofTusing the default, no-arg constructor.static TypeReferencetoString()
-
Constructor Details
-
TypeReference
protected TypeReference()
-
-
Method Details
-
toString
-
of
-
newInstance
public T newInstance() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationExceptionInstantiates a new instance ofTusing the default, no-arg constructor. -
getTypeClass
Gets the referenced type. -
getType
-
isAssignableFrom
-
equals
-
hashCode
public int hashCode() -
isInterface
public boolean isInterface() -
getInterfaces
-
getSuperclass
-
isInstance
public <T> boolean isInstance(T t)
-