com.googlecode.jtype
Class TypeUtils
java.lang.Object
com.googlecode.jtype.TypeUtils
public final class TypeUtils
- extends Object
Provides utility methods for working with types.
- Version:
- $Id: TypeUtils.java 3 2009-02-03 21:40:20Z markhobson $
- Author:
- Mark Hobson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isAssignable
public static boolean isAssignable(Type supertype,
Type type)
isInstance
public static boolean isInstance(Type type,
Object object)
getErasedType
public static Type getErasedType(Type type)
- Gets the erased type of the specified type.
- Parameters:
type - the type to perform erasure on
- Returns:
- the erased type, never a parameterized type nor a type variable
- See Also:
- 4.6 Type Erasure
getRawType
public static Class<?> getRawType(Type type)
isArray
public static boolean isArray(Type type)
getComponentType
public static Type getComponentType(Type type)
getArrayType
public static Type getArrayType(Type componentType)
isSimpleParameterizedType
public static boolean isSimpleParameterizedType(Type type,
Class<?> rawType)
getActualTypeArgument
public static Type getActualTypeArgument(Type type)
toString
public static String toString(Type type)
toString
public static String toString(Type type,
ClassSerializer serializer)
toUnqualifiedString
public static String toUnqualifiedString(Type type)
Copyright © 2012 Oracle Corporation. All Rights Reserved.