public class GenericTypeHelper extends java.lang.Object implements ITypeHelper
ITypeHelper wraps ITypeHelper and delegates the
calls to it.| Constructor and Description |
|---|
GenericTypeHelper(TypeHelper delegate)
Creates a new
GenericTypeHelper. |
| Modifier and Type | Method and Description |
|---|---|
IType |
bigDecimal()
Retrieves the;@link IType} for;@link BigDecimal}.
|
IType |
bigInteger()
Retrieves the;@link IType} for;@link BigInteger}.
|
IType |
booleanType()
Retrieves the;@link IType} for;@link Boolean}.
|
IType |
byteType()
Retrieves the;@link IType} for;@link Byte}.
|
IType |
characterType()
Retrieves the;@link IType} for;@link Character}.
|
IType |
collectionType()
Retrieves the;@link IType} for;@link Collection}.
|
IType |
convertPrimitive(java.lang.Object type)
Converts the given;@link IType}, if it's representing a primitive type, into the class of the
same type.
|
IType |
dateType()
Retrieves the;@link IType} for;@link Date}.
|
IType |
doubleType()
Retrieves the;@link IType} for;@link Double}.
|
IType |
enumType()
Retrieves the;@link IType} for;@link Enum}.
|
IType |
floatType()
Retrieves the;@link IType} for;@link Float}.
|
IType |
getType(java.lang.Class<?> type)
Returns the;@link IType} of the given Java type.
|
IType |
getType(java.lang.String typeName)
Retrieves the external class for the given fully qualified class name.
|
IType |
integerType()
Retrieves the;@link IType} for;@link Integer}.
|
boolean |
isBooleanType(java.lang.Object type)
Determines whether the given;@link IType} is a;@link Boolean}.
|
boolean |
isCollectionType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of;@link Collection}.
|
boolean |
isDateType(java.lang.Object type)
Determines whether the given;@link IType} is a;@link Date},;@link Timestamp} or
;@link Calendar}.
|
boolean |
isEnumType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of;@link Enum}.
|
boolean |
isFloatingType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of a floating type, which is either
Float, Double, float or double. |
boolean |
isIntegralType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of a floating type, which is either
Integer, Long, int or float. |
boolean |
isMapType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of;@link Map}.
|
boolean |
isNumericType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of;@link Numeric}.
|
boolean |
isObjectType(java.lang.Object type)
Determines whether the given;@link IType} is the external form of;@link Object}.
|
boolean |
isPrimitiveType(java.lang.Object type)
Determines whether the given;@link IType} represents a primitive type.
|
boolean |
isStringType(java.lang.Object type)
Determines whether the given;@link IType} represents the
String class. |
IType |
longType()
Retrieves the;@link IType} for;@link Long}.
|
IType |
longType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive long, into the
Long type. |
IType |
mapType()
Retrieves the;@link IType} for;@link Map}.
|
IType |
numberType()
Retrieves the;@link IType} for;@link Number}.
|
IType |
objectType()
Retrieves the;@link IType} for;@link Object}.
|
ITypeDeclaration |
objectTypeDeclaration()
Returns the;@link Object } for the;@link IType} representing the
Object
class. |
IType |
primitiveBoolean()
Retrieves the;@link IType} for the primitive boolean.
|
IType |
primitiveByte()
Retrieves the;@link IType} for the primitive byte.
|
IType |
primitiveChar()
Retrieves the;@link IType} for the primitive char.
|
IType |
primitiveDouble()
Retrieves the;@link IType} for the primitive double.
|
IType |
primitiveFloat()
Retrieves the;@link IType} for the primitive float.
|
IType |
primitiveInteger()
Retrieves the;@link IType} for the primitive int.
|
IType |
primitiveLong()
Retrieves the;@link IType} for the primitive long.
|
IType |
primitiveShort()
Retrieves the;@link IType} for the primitive short.
|
IType |
shortType()
Retrieves the;@link IType} for;@link Short}.
|
IType |
stringType()
Retrieves the;@link IType} for;@link String}.
|
IType |
timestampType()
Retrieves the;@link IType} for;@link Timestamp}.
|
IType |
toBooleanType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive boolean, into the
Boolean
type. |
IType |
toByteType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive byte, into the
Byte
type. |
IType |
toDoubleType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive double, into the
Double
type. |
IType |
toFloatType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive float, into the
Float
type. |
IType |
toIntegerType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive int, into the
Integer
type. |
IType |
toShortType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive short, into the
Short
type. |
IType |
unknownType()
Retrieves the;@link IType} that represents an unknown type.
|
ITypeDeclaration |
unknownTypeDeclaration()
Returns the;@link Object } for the;@link IType} representing an unknown type.
|
public GenericTypeHelper(TypeHelper delegate)
GenericTypeHelper.delegate - The TypeHelper that is wrapped by this one and all the calls are
delegated to itpublic IType bigDecimal()
bigDecimal in interface ITypeHelperBigDecimal classpublic IType bigInteger()
bigInteger in interface ITypeHelperBigInteger classpublic IType booleanType()
booleanType in interface ITypeHelperBoolean classpublic IType byteType()
byteType in interface ITypeHelperByte classpublic IType characterType()
characterType in interface ITypeHelperCharacter classpublic IType collectionType()
collectionType in interface ITypeHelperCollection classpublic IType convertPrimitive(java.lang.Object type)
convertPrimitive in interface ITypeHelpertype - Type to possibly convert from the primitive into the classpublic IType dateType()
dateType in interface ITypeHelperDate classpublic IType doubleType()
doubleType in interface ITypeHelperDouble classpublic IType enumType()
enumType in interface ITypeHelperEnum classpublic IType floatType()
floatType in interface ITypeHelperFloat classpublic IType getType(java.lang.Class<?> type)
getType in interface ITypeHelpertype - The Java type for which its external form will be returnedpublic IType getType(java.lang.String typeName)
getType in interface ITypeHelpertypeName - The fully qualified class name of the class to retrievepublic IType integerType()
integerType in interface ITypeHelperInteger classpublic boolean isBooleanType(java.lang.Object type)
isBooleanType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is a;@link Boolean}; false
otherwisepublic boolean isCollectionType(java.lang.Object type)
isCollectionType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is an instance of;@link Collection};
false otherwisepublic boolean isDateType(java.lang.Object type)
isDateType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is a;@link Date},;@link Timestamp} or
;@link Calendar}public boolean isEnumType(java.lang.Object type)
isEnumType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is an instance of;@link Enum};
false otherwisepublic boolean isFloatingType(java.lang.Object type)
Float, Double, float or double.isFloatingType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is a floating type; false
otherwisepublic boolean isIntegralType(java.lang.Object type)
Integer, Long, int or float.isIntegralType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is a integral type; false
otherwisepublic boolean isMapType(java.lang.Object type)
isMapType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is an instance of;@link Map};
false otherwisepublic boolean isNumericType(java.lang.Object type)
isNumericType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is an instance of;@link Numeric};
false otherwisepublic boolean isObjectType(java.lang.Object type)
isObjectType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} is the external form of;@link Object}public boolean isPrimitiveType(java.lang.Object type)
isPrimitiveType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} represents a primitive; false
otherwisepublic boolean isStringType(java.lang.Object type)
String class.isStringType in interface ITypeHelpertype - The type to check it's assignabilitytrue if the given;@link IType} represents the String class;
false otherwisepublic IType longType()
longType in interface ITypeHelperLong classpublic IType longType(java.lang.Object type)
Long type.longType in interface ITypeHelpertype - The;@link IType} to possibly convertLongpublic IType mapType()
mapType in interface ITypeHelperMap classpublic IType numberType()
numberType in interface ITypeHelperNumber classpublic IType objectType()
objectType in interface ITypeHelperObject classpublic ITypeDeclaration objectTypeDeclaration()
Object
class.objectTypeDeclaration in interface ITypeHelperObject classpublic IType primitiveBoolean()
primitiveBoolean in interface ITypeHelperpublic IType primitiveByte()
primitiveByte in interface ITypeHelperpublic IType primitiveChar()
primitiveChar in interface ITypeHelperpublic IType primitiveDouble()
primitiveDouble in interface ITypeHelperpublic IType primitiveFloat()
primitiveFloat in interface ITypeHelperpublic IType primitiveInteger()
primitiveInteger in interface ITypeHelperpublic IType primitiveLong()
primitiveLong in interface ITypeHelperpublic IType primitiveShort()
primitiveShort in interface ITypeHelperpublic IType shortType()
shortType in interface ITypeHelperShort classpublic IType stringType()
stringType in interface ITypeHelperString classpublic IType timestampType()
timestampType in interface ITypeHelperTimestamp classpublic IType toBooleanType(java.lang.Object type)
Boolean
type.toBooleanType in interface ITypeHelpertype - The;@link IType} to possibly convertBooleanpublic IType toByteType(java.lang.Object type)
Byte
type.toByteType in interface ITypeHelpertype - The;@link IType} to possibly convertBytepublic IType toDoubleType(java.lang.Object type)
Double
type.toDoubleType in interface ITypeHelpertype - The;@link IType} to possibly convertDoublepublic IType toFloatType(java.lang.Object type)
Float
type.toFloatType in interface ITypeHelpertype - The;@link IType} to possibly convertFloatpublic IType toIntegerType(java.lang.Object type)
Integer
type.toIntegerType in interface ITypeHelpertype - The;@link IType} to possibly convertIntegerpublic IType toShortType(java.lang.Object type)
Short
type.toShortType in interface ITypeHelpertype - The;@link IType} to possibly convertShortpublic IType unknownType()
unknownType in interface ITypeHelperpublic ITypeDeclaration unknownTypeDeclaration()
unknownTypeDeclaration in interface ITypeHelper