org.unitils.objectvalidation.reflect
Class TypeWrapper
java.lang.Object
org.unitils.objectvalidation.reflect.TypeWrapper
- Direct Known Subclasses:
- ObjectCreatorTypeWrapper
public class TypeWrapper
- extends Object
- Author:
- Tim Ducheyne
wrappedType
protected Type wrappedType
TypeWrapper
public TypeWrapper(Type wrappedType)
getWrappedType
public Type getWrappedType()
getName
public String getName()
isPrimitive
public boolean isPrimitive()
isClassType
public boolean isClassType()
isParameterizedType
public boolean isParameterizedType()
hasRawType
public boolean hasRawType(Type rawType)
isOfType
public boolean isOfType(Type type)
isAssignableTo
public boolean isAssignableTo(Type type)
isAssignableFrom
public boolean isAssignableFrom(Type type)
getSingleGenericClass
public Class<?> getSingleGenericClass()
getSingleGenericType
public Type getSingleGenericType()
isAssignable
protected boolean isAssignable(Type toType,
Type fromType)
- Checks whether the given fromType is assignable to the given toType, also
taking into account possible auto-boxing.
- Parameters:
toType - The to type, not nullfromType - The from type, not null
- Returns:
- True if assignable
isAssignableClass
protected boolean isAssignableClass(Class<?> toClass,
Class<?> fromClass)
isAssignableParameterizedType
protected boolean isAssignableParameterizedType(ParameterizedType toType,
ParameterizedType fromType)
isAssignableWildcardType
protected boolean isAssignableWildcardType(WildcardType toType,
Type fromType)
equals
public boolean equals(Object value)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
isFinal
public boolean isFinal()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2013-2015. All Rights Reserved.