|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.jdoql.jdoqlc.TypeSupport
Provides query convenience methods to deal with Java/JDO metadata.
Field Summary | |
protected JavaModel |
applicationJavaModel
The JavaModel for the class loader of the candidate class. |
private static RuntimeJavaModelFactory |
javaModelFactory
The runtime JavaModel factory. |
private static I18NHelper |
msg
I18N support |
Constructor Summary | |
TypeSupport()
|
Method Summary | |
static JavaType |
binaryNumericPromotion(JavaType left,
JavaType right)
Implements binary numeric promotion as defined in the Java Language Specification section 5.6.2 |
JavaType |
checkType(java.lang.Class clazz)
Checks for the Java Type with the specified class object. |
JavaType |
checkType(java.lang.String name)
Returns the JavaType representation for the type with the specified name. |
static java.lang.reflect.Field |
getAccessibleField(JavaField javaField)
Returns a accessible java.lang.reflect.Field instance for the specified JavaField. |
static JavaType |
getElementType(JavaField field)
|
static int |
getFieldNumber(JDOField jdoField,
javax.jdo.PersistenceManager pm,
java.lang.Object object)
Returns the fieldNumber of the specified field. |
static java.lang.Object |
getFieldValue(java.lang.reflect.Field field,
java.lang.Object object)
Get field value via reflection |
static java.lang.Object |
getFieldValue(int fieldNumber,
PersistenceManagerInternal pm,
java.lang.Object object)
field value of a managed field. |
static java.lang.Class |
getJavaClass(JavaType type)
Returns the java.lang.Class instance for the specified type. |
void |
initApplicationJavaModel(java.lang.ClassLoader classLoader)
This methods sets the application JavaModel to the JavaModel instance for the specified ClassLoader. |
static boolean |
isBooleanType(JavaType type)
Returns true if the specified type is
boolean or java.lang.Boolean. |
static boolean |
isCharType(JavaType type)
Returns true if the specified type is
char or java.lang.Character |
static boolean |
isIntegralType(JavaType type)
Returns true if the specified type is an interal type
or a Java wrapper class for an interal type. |
static boolean |
isMathType(JavaType type)
Returns true if the specified type is either
java.math.BigDecimal or java.math.BigInteger. |
static boolean |
isNumberType(JavaType type)
Returns true if specified type is a number type:
a numeric primitive a numeric wrapper class java.math.BigDecimal, java.math.BigInteger. |
static boolean |
isNumericType(JavaType type)
Returns true if the specified type is a either a
integral or a floating point type. |
static boolean |
isNumericWrapperClassType(JavaType type)
Returns true if the specified type is a Java wrapper
class type for a numeric primitive type. |
static boolean |
isStaticField(JavaField field)
|
static JavaType |
unaryNumericPromotion(JavaType type)
Implements unray numeric promotion as defined in the Java Language Specification section 5.6.1 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JavaModel applicationJavaModel
private static final RuntimeJavaModelFactory javaModelFactory
private static final I18NHelper msg
Constructor Detail |
public TypeSupport()
Method Detail |
public void initApplicationJavaModel(java.lang.ClassLoader classLoader)
classLoader
- the class loader of the candidate class.public JavaType checkType(java.lang.String name)
name
- the name of the type to be checked.
public JavaType checkType(java.lang.Class clazz)
clazz
- the clazz object of the type to be checked.
public static JavaType binaryNumericPromotion(JavaType left, JavaType right)
public static JavaType unaryNumericPromotion(JavaType type)
public static java.lang.Class getJavaClass(JavaType type)
type
- the type to be checked
public static boolean isBooleanType(JavaType type)
true
if the specified type is
boolean or java.lang.Boolean.
type
- the type to be checked
true
if type is boolean or java.lang.Boolean;
false
otherwise.public static boolean isCharType(JavaType type)
true
if the specified type is
char or java.lang.Character
type
- the type to be checked
true
if type is char or java.lang.Character
false
otherwise.public static boolean isIntegralType(JavaType type)
true
if the specified type is an interal type
or a Java wrapper class for an interal type.
type
- the type to be checked
true
if type is an integral type or a Java
wrapper for an integral type; false
otherwise.public static boolean isNumberType(JavaType type)
true
if specified type is a number type:
type
- the type to be checked
true
if type is a number type;
false
otherwise.public static boolean isNumericWrapperClassType(JavaType type)
true
if the specified type is a Java wrapper
class type for a numeric primitive type.
type
- the type to be checked
true
if type is a numeric wrapper class type;
false
otherwise.public static boolean isNumericType(JavaType type)
true
if the specified type is a either a
integral or a floating point type.
type
- the type to be checked
true
if type is a numeric type;
false
otherwise.public static boolean isMathType(JavaType type)
true
if the specified type is either
java.math.BigDecimal or java.math.BigInteger.
type
- the type to be checked
true
if type is BigDecimal or BigInteger;
false
otherwise.public static boolean isStaticField(JavaField field)
public static JavaType getElementType(JavaField field)
public static java.lang.Object getFieldValue(int fieldNumber, PersistenceManagerInternal pm, java.lang.Object object)
public static java.lang.Object getFieldValue(java.lang.reflect.Field field, java.lang.Object object)
public static int getFieldNumber(JDOField jdoField, javax.jdo.PersistenceManager pm, java.lang.Object object)
public static java.lang.reflect.Field getAccessibleField(JavaField javaField)
javaField
- the JavaField
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |