Class BasicTypeHelperImpl

  • Direct Known Subclasses:
    TypeHelperImpl

    public class BasicTypeHelperImpl
    extends Object
    INTERNAL This class is a helper class providing type information. Its implementation uses Java reflection to calculate the type information.
    • Constructor Detail

      • BasicTypeHelperImpl

        public BasicTypeHelperImpl()
    • Method Detail

      • getTypeName

        public String getTypeName​(Object type)
        Returns the name of the specified type.
      • getJavaClass

        public Class getJavaClass​(Object type)
        Returns the class object of the specified type.
      • getObjectType

        public Object getObjectType()
        Returns the Object type representation.
      • getBooleanType

        public Object getBooleanType()
        Returns the boolean type representation.
      • getBooleanClassType

        public Object getBooleanClassType()
        Returns the Boolean class representation.
      • getCharType

        public Object getCharType()
        Returns the char type representation.
      • getSQLDateType

        public Object getSQLDateType()
        Returns the Date type representation.
      • getTimeType

        public Object getTimeType()
        Returns the Time type representation.
      • getTimestampType

        public Object getTimestampType()
        Returns the timestamp type representation.
      • getCharacterClassType

        public Object getCharacterClassType()
        Returns the Character class representation.
      • getByteType

        public Object getByteType()
        Returns the byte type representation.
      • getByteClassType

        public Object getByteClassType()
        Returns the Byte class representation.
      • getShortType

        public Object getShortType()
        Returns the short type representation.
      • getShortClassType

        public Object getShortClassType()
        Returns the Short class representation.
      • getIntType

        public Object getIntType()
        Returns the int type representation.
      • getIntegerClassType

        public Object getIntegerClassType()
        Returns the Inter class representation.
      • getLongType

        public Object getLongType()
        Returns the long type representation.
      • getLongClassType

        public Object getLongClassType()
        Returns the type representation of class Long.
      • getMapEntryType

        public Object getMapEntryType()
        Returns the type representation of class Map.Entry.
      • getFloatType

        public Object getFloatType()
        Returns the float type representation.
      • getFloatClassType

        public Object getFloatClassType()
        Returns the type representation of class Float.
      • getDoubleType

        public Object getDoubleType()
        Returns the double type representation.
      • getDoubleClassType

        public Object getDoubleClassType()
        Returns the type representation of class Double.
      • getStringType

        public Object getStringType()
        Returns the String type representation.
      • getBigIntegerType

        public Object getBigIntegerType()
        Returns the BigInteger type representation.
      • getBigDecimalType

        public Object getBigDecimalType()
        Returns the BigDecimal type representation.
      • getDateType

        public Object getDateType()
        Returns the java.util.Date type representation.
      • isEnumType

        public boolean isEnumType​(Object type)
      • isNumericType

        public boolean isNumericType​(Object type)
        Returns true if the class is any numeric type.
      • isIntegralType

        public boolean isIntegralType​(Object type)
        Returns true if the specified type represents an integral type or a wrapper class of an integral type.
      • isFloatingPointType

        public boolean isFloatingPointType​(Object type)
        Returns true if the specified type represents an floating point type or a wrapper class of an floating point type.
      • isWrapperClass

        public boolean isWrapperClass​(Object type)
        Returns true if the specified type is a wrapper class.
      • isBooleanType

        public boolean isBooleanType​(Object type)
        Returns true if type is the boolean primitive type or the Boolean wrapper class
      • isCharacterType

        public boolean isCharacterType​(Object type)
        Returns true if type is the char primitive type or the Character wrapper class
      • isByteType

        public boolean isByteType​(Object type)
        Returns true if type is the byte primitive type or the Byte wrapper class
      • isShortType

        public boolean isShortType​(Object type)
        Returns true if type is the short primitive type or the Short wrapper class
      • isIntType

        public boolean isIntType​(Object type)
        Returns true if type is the int primitive type or the Integer wrapper class
      • isIntegerType

        public boolean isIntegerType​(Object type)
        Returns true if type is the int primitive type or the Integer wrapper class
      • isLongType

        public boolean isLongType​(Object type)
        Returns true if type is the long primitive type or the Long wrapper class
      • isFloatType

        public boolean isFloatType​(Object type)
        Returns true if type is the float primitive type or the Float wrapper class
      • isDoubleType

        public boolean isDoubleType​(Object type)
        Returns true if type is the double primitive type or the Double wrapper class
      • isStringType

        public boolean isStringType​(Object type)
        Returns true if the specified type represents java.lang.String.
      • isDateClass

        public boolean isDateClass​(Object type)
      • isBigIntegerType

        public boolean isBigIntegerType​(Object type)
      • isBigDecimalType

        public boolean isBigDecimalType​(Object type)
      • isOrderableType

        public boolean isOrderableType​(Object type)
        Returns true if the specified type denotes an orderable type
      • isAssignableFrom

        public boolean isAssignableFrom​(Object left,
                                        Object right)
        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

        public boolean 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.
      • extendedBinaryNumericPromotion

        public Object extendedBinaryNumericPromotion​(Object left,
                                                     Object right)
        Implements binary numeric promotion as defined in JLS extended by wrapper classes, BigDecimal and BigInteger.
      • getPrimitiveType

        protected Class getPrimitiveType​(Object wrapper)
        Returns the primitive for the specified wrapper class.
      • getWrapperClass

        protected Class getWrapperClass​(Object primitive)
        Returns the wrapper class for the specified primitive.
      • binaryNumericPromotion

        protected Object binaryNumericPromotion​(Object left,
                                                Object right)
        Implements binary numeric promotion as defined in JLS.