| Constructor and Description |
|---|
TypeHelper(ITypeRepository typeRepository)
Creates a new
TypeHelper. |
| Modifier and Type | Method and Description |
|---|---|
IType |
bigDecimal()
Retrieves the
IType for BigDecimal. |
IType |
bigInteger()
Retrieves the
IType for BigInteger. |
IType |
booleanType()
|
IType |
byteType()
|
IType |
characterType()
|
IType |
collectionType()
Retrieves the
IType for Collection. |
IType |
convertPrimitive(IType type)
Converts the given
IType, if it's representing a primitive type, into the class of the
same type. |
IType |
dateType()
|
IType |
doubleType()
|
IType |
enumType()
|
IType |
floatType()
|
IType |
getType(Class<?> type)
Returns the
IType of the given Java type. |
IType |
getType(String typeName)
Retrieves the external class for the given fully qualified class name.
|
ITypeRepository |
getTypeRepository()
Returns the
ITypeRepository used by this helper |
IType |
integerType()
|
boolean |
isBooleanType(IType type)
|
boolean |
isCollectionType(IType type)
Determines whether the given
IType is an instance of Collection. |
boolean |
isDateType(IType type)
|
boolean |
isEnumType(IType type)
|
boolean |
isFloatingType(IType type)
Determines whether the given
IType is an instance of a floating type, which is either
Float, Double, float or double. |
boolean |
isIntegralType(IType type)
Determines whether the given
IType is an instance of a floating type, which is either
Integer, Long, int or float. |
boolean |
isMapType(IType type)
|
boolean |
isNumericType(IType type)
|
boolean |
isObjectType(IType type)
|
boolean |
isPrimitiveType(IType type)
Determines whether the given
IType represents a primitive type. |
boolean |
isStringType(IType type)
Determines whether the given
IType represents the String class. |
IType |
longType()
|
IType |
longType(IType type)
Converts the given
IType, if it's the primitive long, into the Long type. |
IType |
mapType()
|
IType |
numberType()
|
IType |
objectType()
|
ITypeDeclaration |
objectTypeDeclaration()
|
IType |
primitiveBoolean()
Retrieves the
IType for the primitive boolean. |
IType |
primitiveByte()
Retrieves the
IType for the primitive byte. |
IType |
primitiveChar()
Retrieves the
IType for the primitive char. |
IType |
primitiveDouble()
Retrieves the
IType for the primitive double. |
IType |
primitiveFloat()
Retrieves the
IType for the primitive float. |
IType |
primitiveInteger()
Retrieves the
IType for the primitive int. |
IType |
primitiveLong()
Retrieves the
IType for the primitive long. |
IType |
primitiveShort()
Retrieves the
IType for the primitive short. |
IType |
shortType()
|
IType |
stringType()
|
IType |
timestampType()
|
IType |
toBooleanType(IType type)
Converts the given
IType, if it's the primitive boolean, into the Boolean
type. |
IType |
toByteType(IType type)
Converts the given
IType, if it's the primitive byte, into the Byte
type. |
IType |
toDoubleType(IType type)
Converts the given
IType, if it's the primitive double, into the Double
type. |
IType |
toFloatType(IType type)
Converts the given
IType, if it's the primitive float, into the Float
type. |
IType |
toIntegerType(IType type)
Converts the given
IType, if it's the primitive int, into the Integer
type. |
IType |
toShortType(IType type)
Converts the given
IType, if it's the primitive short, into the Short
type. |
IType |
unknownType()
Retrieves the
IType that represents an unknown type. |
ITypeDeclaration |
unknownTypeDeclaration()
Returns the
ITypeDeclaration for the IType representing an unknown type. |
public TypeHelper(ITypeRepository typeRepository)
TypeHelper.typeRepository - The repository used to retrieve the typespublic IType bigDecimal()
IType for BigDecimal.BigDecimal classpublic IType bigInteger()
IType for BigInteger.BigInteger classpublic IType booleanType()
Boolean classpublic IType byteType()
Byte classpublic IType characterType()
Character classpublic IType collectionType()
IType for Collection.Collection classpublic IType convertPrimitive(IType type)
IType, if it's representing a primitive type, into the class of the
same type.type - Type to possibly convert from the primitive into the classIType if it's not a primitive type otherwise the primitive type will
have been converted into the class of that primitivepublic IType dateType()
Date classpublic IType doubleType()
Double classpublic IType enumType()
Enum classpublic IType floatType()
Float classpublic IType getType(Class<?> type)
IType of the given Java type.type - The Java type for which its external form will be returnedIType representing the given Java typepublic IType getType(String typeName)
typeName - The fully qualified class name of the class to retrievepublic ITypeRepository getTypeRepository()
ITypeRepository used by this helperITypes.public IType integerType()
Integer classpublic boolean isBooleanType(IType type)
public boolean isCollectionType(IType type)
IType is an instance of Collection.type - The type to check it's assignabilitytrue if the given IType is an instance of Collection;
false otherwisepublic boolean isDateType(IType type)
public boolean isEnumType(IType type)
public boolean isFloatingType(IType type)
IType is an instance of a floating type, which is either
Float, Double, float or double.type - The type to check it's assignabilitytrue if the given IType is a floating type; false
otherwisepublic boolean isIntegralType(IType type)
IType is an instance of a floating type, which is either
Integer, Long, int or float.type - The type to check it's assignabilitytrue if the given IType is a integral type; false
otherwisepublic boolean isMapType(IType type)
public boolean isNumericType(IType type)
public boolean isObjectType(IType type)
public boolean isPrimitiveType(IType type)
IType represents a primitive type.type - The type to check it's assignabilitytrue if the given IType represents a primitive; false
otherwisepublic boolean isStringType(IType type)
IType represents the String class.type - The type to check it's assignabilitytrue if the given IType represents the String class;
false otherwisepublic IType longType()
Long classpublic IType longType(IType type)
IType, if it's the primitive long, into the Long type.public IType mapType()
Map classpublic IType numberType()
Number classpublic IType objectType()
Object classpublic ITypeDeclaration objectTypeDeclaration()
ITypeDeclaration of the Object classpublic IType primitiveBoolean()
IType for the primitive boolean.public IType primitiveByte()
IType for the primitive byte.public IType primitiveChar()
IType for the primitive char.public IType primitiveDouble()
IType for the primitive double.public IType primitiveFloat()
IType for the primitive float.public IType primitiveInteger()
IType for the primitive int.public IType primitiveLong()
IType for the primitive long.public IType primitiveShort()
IType for the primitive short.public IType shortType()
Short classpublic IType stringType()
String classpublic IType timestampType()
Timestamp classpublic IType toBooleanType(IType type)
IType, if it's the primitive boolean, into the Boolean
type.public IType toByteType(IType type)
IType, if it's the primitive byte, into the Byte
type.public IType toDoubleType(IType type)
IType, if it's the primitive double, into the Double
type.public IType toFloatType(IType type)
IType, if it's the primitive float, into the Float
type.public IType toIntegerType(IType type)
IType, if it's the primitive int, into the Integer
type.public IType toShortType(IType type)
IType, if it's the primitive short, into the Short
type.public IType unknownType()
IType that represents an unknown type.public ITypeDeclaration unknownTypeDeclaration()
ITypeDeclaration for the IType representing an unknown type.ITypeDeclaration of the unknown typeCopyright © 2007–2020 Eclipse.org - EclipseLink Project. All rights reserved.