[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Helper for questions about types.

what is the boxed type for a primitive type

is this a numeric type.

The following tables list the members exposed by the TypeHelper type.

Public Methods

  NameDescription
static memberCoerceNumber
Coerce the given number to the given type. Allows coerce to lower resultion number. Doesn't coerce to primitive types. numToCoerce is the number to coerce to the given typethe result type to return

Equals (Inherited from Object.)
static memberGetArithmaticCoercionType
Returns the coercion type for the 2 numeric types for use in arithmatic. Note: byte and short types always result in integer.

static memberGetBoxedType
Returns the boxed class for the given class, or the class itself if already boxed or not a primitive type. For primitive unboxed types returns the boxed types, e.g. returns java.lang.Integer for passing int.class. For any other class, returns the class passed.

static memberGetBoxedTypeName
Returns for the class name given the class name of the boxed (wrapped) type if the class name is one of the CLR primitive types.

static memberGetCommonCoercionType
Determines a common denominator type to which one or more types can be casted or coerced. For use in determining the result type in certain expressions (coalesce, case).

Null values are allowed as part of the input and indicate a 'null' constant value in an expression tree. Such as value doesn't have any type and can be ignored in determining a result type.

For numeric types, determines a coercion type that all types can be converted to via the method GetArithmaticCoercionType.

Indicates that there is no common denominator type by throwing net.esper.util.CoercionException.


static memberGetCompareToCoercionType
Returns for 2 classes to be compared via relational operator the Class type of common comparison. The output is always Long.class, double.class, String.class or bool.class depending on whether the passed types are numeric and floating-point. Accepts primitive as well as boxed types.

GetHashCode (Inherited from Object.)
GetType (Inherited from Object.)
static memberIsAssignmentCompatible
Returns true if 2 classes are assignment compatible.

static memberIsBoolean
Determines whether the specified type is boolean.

static memberIsBuiltinDataType
Returns true if the class passed in is a built-in data type (primitive or wrapper) including String.

static memberIsCharacter
Returns true if the type represents a character type.

static memberIsFloatingPointClass
Returns true if the supplied type is a floating point number.

static memberIsFloatingPointNumber
Returns true if the Number instance is a floating point number.

static memberIsNumeric
Determines if the class passed in is one of the numeric classes.

ResolveTypeOverloaded.
ToString (Inherited from Object.)

Protected Methods

  NameDescription
Finalize (Inherited from Object.)
MemberwiseClone (Inherited from Object.)

Public Constructors

  NameDescription
TypeHelperNew