Module org.eclipse.persistence.core
Class BasicTypeHelperImpl
java.lang.Object
org.eclipse.persistence.internal.helper.BasicTypeHelperImpl
- Direct Known Subclasses:
TypeHelperImpl
INTERNAL
This class is a helper class providing type information.
Its implementation uses Java reflection to calculate the type information.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
binaryNumericPromotion
(Object left, Object right) Implements binary numeric promotion as defined in JLS.extendedBinaryNumericPromotion
(Object left, Object right) Implements binary numeric promotion as defined in JLS extended by wrapper classes, BigDecimal and BigInteger.Returns the BigDecimal type representation.Returns the BigInteger type representation.Returns the Boolean class representation.Returns the boolean type representation.Returns the Byte class representation.Returns the byte type representation.Returns the Character class representation.Returns the char type representation.Returns the java.util.Date type representation.Returns the type representation of class Double.Returns the double type representation.Returns the type representation of class Float.Returns the float type representation.static BasicTypeHelperImpl
Gets instance of this classReturns the Inter class representation.Returns the int type representation.Class
<?> getJavaClass
(Object type) Returns the class object of the specified type.Returns the type representation of class Long.Returns the long type representation.Returns the type representation of class Map.Entry.Returns the Object type representation.protected Class
<?> getPrimitiveType
(Object wrapper) Returns the primitive for the specified wrapper class.Returns the Short class representation.Returns the short type representation.Returns the Date type representation.Returns the String type representation.Returns the timestamp type representation.Returns the Time type representation.getTypeName
(Object type) Returns the name of the specified type.protected Class
<?> getWrapperClass
(Object primitive) Returns the wrapper class for the specified primitive.boolean
isAssignableFrom
(Object left, Object right) convenience method for java's isAssignableFrom that allows auto-boxing, taking java class or a descriptor as arguments.boolean
isBigDecimalType
(Object type) boolean
isBigIntegerType
(Object type) boolean
isBooleanType
(Object type) Returns true if type is the boolean primitive type or the Boolean wrapper classboolean
isByteType
(Object type) Returns true if type is the byte primitive type or the Byte wrapper classboolean
isCharacterType
(Object type) Returns true if type is the char primitive type or the Character wrapper classboolean
isDateClass
(Object type) boolean
isDoubleType
(Object type) Returns true if type is the double primitive type or the Double wrapper classboolean
isEnumType
(Object type) boolean
isFloatingPointType
(Object type) Returns true if the specified type represents an floating point type or a wrapper class of an floating point type.boolean
isFloatType
(Object type) Returns true if type is the float primitive type or the Float wrapper classboolean
isIntegerType
(Object type) Returns true if type is the int primitive type or the Integer wrapper classboolean
isIntegralType
(Object type) Returns true if the specified type represents an integral type or a wrapper class of an integral type.boolean
Returns true if type is the int primitive type or the Integer wrapper classboolean
isLongType
(Object type) Returns true if type is the long primitive type or the Long wrapper classboolean
isNumericType
(Object type) Returns true if the class is any numeric type.boolean
isOrderableType
(Object type) Returns true if the specified type denotes an orderable typeboolean
isShortType
(Object type) Returns true if type is the short primitive type or the Short wrapper classboolean
isStrictlyAssignableFrom
(Object left, Object right) convenience method for java's isAssignableFrom that allows auto-boxing but follows more closely Java's Class.isAssignableFrom method results, and returns true if either arguments is null.boolean
isStringType
(Object type) Returns true if the specified type represents java.lang.String.boolean
isWrapperClass
(Object type) Returns true if the specified type is a wrapper class.
-
Constructor Details
-
BasicTypeHelperImpl
public BasicTypeHelperImpl()
-
-
Method Details
-
getInstance
Gets instance of this class -
getTypeName
Returns the name of the specified type. -
getJavaClass
Returns the class object of the specified type. -
getObjectType
Returns the Object type representation. -
getBooleanType
Returns the boolean type representation. -
getBooleanClassType
Returns the Boolean class representation. -
getCharType
Returns the char type representation. -
getSQLDateType
Returns the Date type representation. -
getTimeType
Returns the Time type representation. -
getTimestampType
Returns the timestamp type representation. -
getCharacterClassType
Returns the Character class representation. -
getByteType
Returns the byte type representation. -
getByteClassType
Returns the Byte class representation. -
getShortType
Returns the short type representation. -
getShortClassType
Returns the Short class representation. -
getIntType
Returns the int type representation. -
getIntegerClassType
Returns the Inter class representation. -
getLongType
Returns the long type representation. -
getLongClassType
Returns the type representation of class Long. -
getMapEntryType
Returns the type representation of class Map.Entry. -
getFloatType
Returns the float type representation. -
getFloatClassType
Returns the type representation of class Float. -
getDoubleType
Returns the double type representation. -
getDoubleClassType
Returns the type representation of class Double. -
getStringType
Returns the String type representation. -
getBigIntegerType
Returns the BigInteger type representation. -
getBigDecimalType
Returns the BigDecimal type representation. -
getDateType
Returns the java.util.Date type representation. -
isEnumType
-
isNumericType
Returns true if the class is any numeric type. -
isIntegralType
Returns true if the specified type represents an integral type or a wrapper class of an integral type. -
isFloatingPointType
Returns true if the specified type represents an floating point type or a wrapper class of an floating point type. -
isWrapperClass
Returns true if the specified type is a wrapper class. -
isBooleanType
Returns true if type is the boolean primitive type or the Boolean wrapper class -
isCharacterType
Returns true if type is the char primitive type or the Character wrapper class -
isByteType
Returns true if type is the byte primitive type or the Byte wrapper class -
isShortType
Returns true if type is the short primitive type or the Short wrapper class -
isIntType
Returns true if type is the int primitive type or the Integer wrapper class -
isIntegerType
Returns true if type is the int primitive type or the Integer wrapper class -
isLongType
Returns true if type is the long primitive type or the Long wrapper class -
isFloatType
Returns true if type is the float primitive type or the Float wrapper class -
isDoubleType
Returns true if type is the double primitive type or the Double wrapper class -
isStringType
Returns true if the specified type represents java.lang.String. -
isDateClass
-
isBigIntegerType
-
isBigDecimalType
-
isOrderableType
Returns true if the specified type denotes an orderable type -
isAssignableFrom
convenience method for java's isAssignableFrom that allows auto-boxing, taking java class or a descriptor as arguments. It will return true if both sides are in the same category (Numberic, Date or Boolean) otherwise it will use java's isAssignableFrom on the argument classes. Returns true if either arguments is null. -
isStrictlyAssignableFrom
convenience method for java's isAssignableFrom that allows auto-boxing but follows more closely Java's Class.isAssignableFrom method results, and returns true if either arguments is null. -
extendedBinaryNumericPromotion
Implements binary numeric promotion as defined in JLS extended by wrapper classes, BigDecimal and BigInteger. -
getPrimitiveType
Returns the primitive for the specified wrapper class. -
getWrapperClass
Returns the wrapper class for the specified primitive. -
binaryNumericPromotion
Implements binary numeric promotion as defined in JLS.
-