|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.triactive.jdo.util.Types
Contains static methods related to Java and JDO type conversions.
Method Summary | |
static boolean |
areAssignableFrom(java.lang.Class[] boxedParamTypes,
java.lang.Class[] boxedArgTypes)
Tests if a set of parameters types are all assignable from a given set of argument types. |
static java.lang.Class |
binaryNumericPromotion(java.lang.Class[] types)
Performs binary numeric promotion on a set of input types. |
static java.lang.Class |
binaryNumericPromotion(java.lang.Class operand1Type,
java.lang.Class operand2Type)
Performs binary numeric promotion on a pair of types. |
static java.lang.Class |
box(java.lang.Class c)
Performs a boxing conversion, if applicable. |
static java.lang.Class[] |
box(java.lang.Class[] c)
Performs a boxing conversion on multiple classes. |
static java.lang.Class |
unaryNumericPromotion(java.lang.Class operandType)
Performs unary numeric promotion on the given type. |
static java.lang.Class |
unbox(java.lang.Class c)
Performs an unboxing conversion, if applicable. |
static java.lang.Class[] |
unbox(java.lang.Class[] c)
Performs an unboxing conversion on multiple classes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.Class box(java.lang.Class c)
c
- the type to be boxed, or null
null
is returned if the argument was null.public static java.lang.Class unbox(java.lang.Class c)
c
- the type to be unboxed, or null
null
is returned if the argument was null.public static java.lang.Class[] box(java.lang.Class[] c)
box(Class)
on every class in the argument array.
c
- the types to be boxed
public static java.lang.Class[] unbox(java.lang.Class[] c)
unbox(Class)
on every class in the argument array.
c
- the types to be unboxed
public static boolean areAssignableFrom(java.lang.Class[] boxedParamTypes, java.lang.Class[] boxedArgTypes)
Class.isAssignableFrom()
.
All classes in the parameter type array and the argument type array must already be boxed.
boxedParamTypes
- the parameter typesboxedArgTypes
- the argument types
true
if the all the parameter types are assignable from
the argument types.public static java.lang.Class unaryNumericPromotion(java.lang.Class operandType)
operandType
- the type to be promoted, or null
null
if the argument was null.public static java.lang.Class binaryNumericPromotion(java.lang.Class[] types)
types
- The input types to be promoted. If more than two types are present
then the first two are promoted, then the promoted type and the
third type are promoted, and so on for all the types.
null
if the input array
is empty. Returns the first type if the input array has only one
type.
java.lang.IllegalArgumentException
- if any argument type is not a subclass of java.lang.Numberpublic static java.lang.Class binaryNumericPromotion(java.lang.Class operand1Type, java.lang.Class operand2Type)
operand1Type
- the first type in the pair.operand2Type
- the other type in the pair.
java.lang.IllegalArgumentException
- if either argument type is not a subclass of java.lang.Number
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |