|
||||||||||
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
public class TypeSupport
Provides query convenience methods to deal with Java/JDO metadata.
Field Summary | |
---|---|
protected org.apache.jdo.model.java.JavaModel |
applicationJavaModel
The JavaModel for the class loader of the candidate class. |
Constructor Summary | |
---|---|
TypeSupport()
|
Method Summary | |
---|---|
static org.apache.jdo.model.java.JavaType |
binaryNumericPromotion(org.apache.jdo.model.java.JavaType left,
org.apache.jdo.model.java.JavaType right)
Implements binary numeric promotion as defined in the Java Language Specification section 5.6.2 |
org.apache.jdo.model.java.JavaType |
checkType(java.lang.Class clazz)
Checks for the Java Type with the specified class object. |
org.apache.jdo.model.java.JavaType |
checkType(java.lang.String name)
Returns the JavaType representation for the type with the specified name. |
static java.lang.reflect.Field |
getAccessibleField(org.apache.jdo.model.java.JavaField javaField)
Returns a accessible java.lang.reflect.Field instance for the specified JavaField. |
static org.apache.jdo.model.java.JavaType |
getElementType(org.apache.jdo.model.java.JavaField field)
|
static int |
getFieldNumber(org.apache.jdo.model.java.JavaField javaField,
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,
org.apache.jdo.pm.PersistenceManagerInternal pm,
java.lang.Object object)
field value of a managed field. |
static java.lang.Class |
getJavaClass(org.apache.jdo.model.java.JavaType type)
Returns the java.lang.Class instance for the specified type. |
static org.apache.jdo.model.jdo.JDOField |
getJDOField(org.apache.jdo.model.java.JavaField javaField)
|
void |
initApplicationJavaModel(java.lang.ClassLoader classLoader)
This methods sets the application JavaModel to the JavaModel instance for the specified ClassLoader. |
static boolean |
isBooleanType(org.apache.jdo.model.java.JavaType type)
Returns true if the specified type is
boolean or java.lang.Boolean. |
static boolean |
isCharType(org.apache.jdo.model.java.JavaType type)
Returns true if the specified type is
char or java.lang.Character |
static boolean |
isIntegralType(org.apache.jdo.model.java.JavaType type)
Returns true if the specified type is an interal type
or a Java wrapper class for an interal type. |
static boolean |
isMathType(org.apache.jdo.model.java.JavaType type)
Returns true if the specified type is either
java.math.BigDecimal or java.math.BigInteger. |
static boolean |
isNumberType(org.apache.jdo.model.java.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(org.apache.jdo.model.java.JavaType type)
Returns true if the specified type is a either a
integral or a floating point type. |
static boolean |
isNumericWrapperClassType(org.apache.jdo.model.java.JavaType type)
Returns true if the specified type is a Java wrapper
class type for a numeric primitive type. |
static boolean |
isStaticField(org.apache.jdo.model.java.JavaField field)
|
static org.apache.jdo.model.java.JavaType |
unaryNumericPromotion(org.apache.jdo.model.java.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 org.apache.jdo.model.java.JavaModel applicationJavaModel
Constructor Detail |
---|
public TypeSupport()
Method Detail |
---|
public void initApplicationJavaModel(java.lang.ClassLoader classLoader)
classLoader
- the class loader of the candidate class.public org.apache.jdo.model.java.JavaType checkType(java.lang.String name)
name
- the name of the type to be checked.
public org.apache.jdo.model.java.JavaType checkType(java.lang.Class clazz)
clazz
- the clazz object of the type to be checked.
public static org.apache.jdo.model.java.JavaType binaryNumericPromotion(org.apache.jdo.model.java.JavaType left, org.apache.jdo.model.java.JavaType right)
public static org.apache.jdo.model.java.JavaType unaryNumericPromotion(org.apache.jdo.model.java.JavaType type)
public static java.lang.Class getJavaClass(org.apache.jdo.model.java.JavaType type)
type
- the type to be checked
public static boolean isBooleanType(org.apache.jdo.model.java.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(org.apache.jdo.model.java.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(org.apache.jdo.model.java.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(org.apache.jdo.model.java.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(org.apache.jdo.model.java.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(org.apache.jdo.model.java.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(org.apache.jdo.model.java.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(org.apache.jdo.model.java.JavaField field)
public static org.apache.jdo.model.jdo.JDOField getJDOField(org.apache.jdo.model.java.JavaField javaField)
public static org.apache.jdo.model.java.JavaType getElementType(org.apache.jdo.model.java.JavaField field)
public static java.lang.Object getFieldValue(int fieldNumber, org.apache.jdo.pm.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(org.apache.jdo.model.java.JavaField javaField, javax.jdo.PersistenceManager pm, java.lang.Object object)
public static java.lang.reflect.Field getAccessibleField(org.apache.jdo.model.java.JavaField javaField)
javaField
- the JavaField
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |