Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ognl
Class OgnlRuntime  view OgnlRuntime download OgnlRuntime.java

java.lang.Object
  extended byognl.OgnlRuntime

public abstract class OgnlRuntime
extends java.lang.Object

This is an abstract class with static methods that define runtime caching information in OGNL.


Nested Class Summary
private static class OgnlRuntime.ClassCache
          This is a highly specialized map for storing values keyed by Class objects.
 
Field Summary
private static OgnlRuntime.ClassCache constructorCache
           
private static java.util.Map ctorParameterTypesCache
           
private static OgnlRuntime.ClassCache[] declaredMethods
           
private static OgnlRuntime.ClassCache elementsAccessors
           
private static EvaluationPool evaluationPool
           
private static OgnlRuntime.ClassCache fieldCache
           
private static java.lang.String GET_PREFIX
           
private static int HEX_LENGTH
           
private static java.util.Map HEX_PADDING
          Prefix padding for hexadecimal numbers to HEX_LENGTH.
private static java.lang.String HEX_PREFIX
          Hexadecimal prefix for printing "pointers".
static int INDEXED_PROPERTY_INT
          JavaBeans IndexedProperty
static int INDEXED_PROPERTY_NONE
          Not an indexed property
static int INDEXED_PROPERTY_OBJECT
          OGNL ObjectIndexedProperty
private static OgnlRuntime.ClassCache instanceMethodCache
           
private static OgnlRuntime.ClassCache invokePermissionCache
           
private static java.lang.String IS_PREFIX
           
private static OgnlRuntime.ClassCache methodAccessors
           
private static java.util.Map methodParameterTypesCache
           
static java.lang.Object[] NoArguments
           
static java.lang.Class[] NoArgumentTypes
           
static java.lang.Object NoConversionPossible
          Token returned by TypeConverter for no conversion possible
static java.lang.Object NotFound
           
static java.util.List NotFoundList
           
static java.util.Map NotFoundMap
           
private static java.lang.String NULL_OBJECT_STRING
          Returned by getUniqueDescriptor() when the object is null.
static java.lang.String NULL_STRING
           
private static OgnlRuntime.ClassCache nullHandlers
           
private static ObjectArrayPool objectArrayPool
           
private static OgnlRuntime.ClassCache primitiveDefaults
           
private static java.util.Map primitiveTypes
           
private static OgnlRuntime.ClassCache propertyAccessors
           
private static OgnlRuntime.ClassCache propertyDescriptorCache
           
private static java.lang.SecurityManager securityManager
           
private static java.lang.String SET_PREFIX
           
private static OgnlRuntime.ClassCache staticMethodCache
           
private static java.util.List superclasses
           
 
Constructor Summary
OgnlRuntime()
           
 
Method Summary
static boolean areArgsCompatible(java.lang.Object[] args, java.lang.Class[] classes)
          Tells whether the given array of objects is compatible with the given array of classes---that is, whether the given array of objects can be passed as arguments to a method or constructor whose parameter types are the given array of classes.
static java.lang.Object callAppropriateMethod(OgnlContext context, java.lang.Object source, java.lang.Object target, java.lang.String methodName, java.lang.String propertyName, java.util.List methods, java.lang.Object[] args)
           
static java.lang.Object callConstructor(OgnlContext context, java.lang.String className, java.lang.Object[] args)
           
static java.lang.Object callMethod(OgnlContext context, java.lang.Object target, java.lang.String methodName, java.lang.String propertyName, java.lang.Object[] args)
           
static java.lang.Object callStaticMethod(OgnlContext context, java.lang.String className, java.lang.String methodName, java.lang.Object[] args)
           
static java.lang.Class classForName(OgnlContext context, java.lang.String className)
           
private static void findObjectIndexedPropertyDescriptors(java.lang.Class targetClass, java.util.Map intoMap)
           
static java.lang.reflect.Method getAppropriateMethod(OgnlContext context, java.lang.Object source, java.lang.Object target, java.lang.String methodName, java.lang.String propertyName, java.util.List methods, java.lang.Object[] args, java.lang.Object[] actualArgs)
          Gets the appropriate method to be called for the given target, method name and arguments.
static java.lang.Class getArgClass(java.lang.Object arg)
          Gets the class for a method argument that is appropriate for looking up methods by reflection, by looking for the standard primitive wrapper classes and exchanging for them their underlying primitive class objects.
static java.lang.String getBaseName(java.lang.Object o)
          Returns the base name (the class name without the package name prepended) of the object given.
static java.lang.String getClassBaseName(java.lang.Class c)
          Returns the base name (the class name without the package name prepended) of the class given.
static java.lang.String getClassName(java.lang.Class c, boolean fullyQualified)
           
static java.lang.String getClassName(java.lang.Object o, boolean fullyQualified)
           
static java.lang.String getClassPackageName(java.lang.Class c)
          Returns the package name of the class given.
static java.util.List getConstructors(java.lang.Class targetClass)
           
static java.lang.reflect.Constructor getConvertedConstructorAndArgs(OgnlContext context, java.lang.Object target, java.util.List constructors, java.lang.Object[] args, java.lang.Object[] newArgs)
           
static java.lang.reflect.Method getConvertedMethodAndArgs(OgnlContext context, java.lang.Object target, java.lang.String propertyName, java.util.List methods, java.lang.Object[] args, java.lang.Object[] newArgs)
           
static java.lang.Object getConvertedType(OgnlContext context, java.lang.Object target, java.lang.reflect.Member member, java.lang.String propertyName, java.lang.Object value, java.lang.Class type)
           
static boolean getConvertedTypes(OgnlContext context, java.lang.Object target, java.lang.reflect.Member member, java.lang.String propertyName, java.lang.Class[] parameterTypes, java.lang.Object[] args, java.lang.Object[] newArgs)
           
static java.util.List getDeclaredMethods(java.lang.Class targetClass, java.lang.String propertyName, boolean findSets)
           
static ElementsAccessor getElementsAccessor(java.lang.Class cls)
           
static EvaluationPool getEvaluationPool()
           
static java.lang.reflect.Field getField(java.lang.Class inClass, java.lang.String name)
           
static java.util.Map getFields(java.lang.Class targetClass)
           
static java.lang.Object getFieldValue(OgnlContext context, java.lang.Object target, java.lang.String propertyName)
           
static java.lang.Object getFieldValue(OgnlContext context, java.lang.Object target, java.lang.String propertyName, boolean checkAccessAndExistence)
           
static java.lang.reflect.Method getGetMethod(OgnlContext context, java.lang.Class targetClass, java.lang.String propertyName)
           
private static java.lang.Object getHandler(java.lang.Class forClass, OgnlRuntime.ClassCache handlers)
           
static java.lang.Object getIndexedProperty(OgnlContext context, java.lang.Object source, java.lang.String name, java.lang.Object index)
           
static int getIndexedPropertyType(OgnlContext context, java.lang.Class sourceClass, java.lang.String name)
          Determines the index property type, if any.
static MethodAccessor getMethodAccessor(java.lang.Class cls)
           
static java.util.Map getMethods(java.lang.Class targetClass, boolean staticMethods)
           
static java.util.List getMethods(java.lang.Class targetClass, java.lang.String name, boolean staticMethods)
           
static java.lang.Object getMethodValue(OgnlContext context, java.lang.Object target, java.lang.String propertyName)
           
static java.lang.Object getMethodValue(OgnlContext context, java.lang.Object target, java.lang.String propertyName, boolean checkAccessAndExistence)
          If the checkAccessAndExistence flag is true this method will check to see if the method exists and if it is accessible according to the context's MemberAccess.
static java.lang.String getModifierString(int modifiers)
           
static NullHandler getNullHandler(java.lang.Class cls)
           
static ObjectArrayPool getObjectArrayPool()
           
static java.lang.String getPackageName(java.lang.Object o)
          Returns the package name of the object's class.
static java.lang.Class[] getParameterTypes(java.lang.reflect.Constructor c)
          Returns the parameter types of the given method.
static java.lang.Class[] getParameterTypes(java.lang.reflect.Method m)
          Returns the parameter types of the given method.
static java.security.Permission getPermission(java.lang.reflect.Method method)
          Permission will be named "invoke..".
static java.lang.String getPointerString(int num)
          Returns a "pointer" string in the usual format for these things - 0x.
static java.lang.String getPointerString(java.lang.Object o)
          Returns a "pointer" string in the usual format for these things - 0x for the object given.
static java.lang.Object getPrimitiveDefaultValue(java.lang.Class forClass)
           
static java.lang.Object getProperty(OgnlContext context, java.lang.Object source, java.lang.Object name)
           
static PropertyAccessor getPropertyAccessor(java.lang.Class cls)
           
static java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.Class targetClass, java.lang.String propertyName)
          This method returns a PropertyDescriptor for the given class and property name using a Map lookup (using getPropertyDescriptorsMap()).
static java.beans.PropertyDescriptor getPropertyDescriptorFromArray(java.lang.Class targetClass, java.lang.String name)
          Gets the property descriptor with the given name for the target class given.
static java.util.Map getPropertyDescriptors(java.lang.Class targetClass)
          This method returns the property descriptors for the given class as a Map
static java.beans.PropertyDescriptor[] getPropertyDescriptorsArray(java.lang.Class targetClass)
           
static java.lang.reflect.Method getSetMethod(OgnlContext context, java.lang.Class targetClass, java.lang.String propertyName)
           
static java.lang.Object getStaticField(OgnlContext context, java.lang.String className, java.lang.String fieldName)
           
static java.lang.Class getTargetClass(java.lang.Object o)
          Gets the "target" class of an object for looking up accessors that are registered on the target.
static java.lang.String getUniqueDescriptor(java.lang.Object object)
          Returns a unique descriptor string that includes the object's class' base name and a unique integer identifier.
static java.lang.String getUniqueDescriptor(java.lang.Object object, boolean fullyQualified)
          Returns a unique descriptor string that includes the object's class and a unique integer identifier.
static boolean hasField(OgnlContext context, java.lang.Object target, java.lang.Class inClass, java.lang.String propertyName)
           
static boolean hasGetMethod(OgnlContext context, java.lang.Object target, java.lang.Class targetClass, java.lang.String propertyName)
           
static boolean hasGetProperty(OgnlContext context, java.lang.Object target, java.lang.Object oname)
           
static boolean hasSetMethod(OgnlContext context, java.lang.Object target, java.lang.Class targetClass, java.lang.String propertyName)
           
static boolean hasSetProperty(OgnlContext context, java.lang.Object target, java.lang.Object oname)
           
private static boolean indexMethodCheck(java.util.List methods)
           
static java.lang.Object invokeMethod(java.lang.Object target, java.lang.reflect.Method method, java.lang.Object[] argsArray)
           
static boolean isFieldAccessible(OgnlContext context, java.lang.Object target, java.lang.Class inClass, java.lang.String propertyName)
           
static boolean isFieldAccessible(OgnlContext context, java.lang.Object target, java.lang.reflect.Field field, java.lang.String propertyName)
           
static boolean isInstance(OgnlContext context, java.lang.Object value, java.lang.String className)
           
static boolean isMethodAccessible(OgnlContext context, java.lang.Object target, java.lang.reflect.Method method, java.lang.String propertyName)
           
static boolean isMoreSpecific(java.lang.Class[] classes1, java.lang.Class[] classes2)
          Tells whether the first array of classes is more specific than the second.
static boolean isTypeCompatible(java.lang.Object object, java.lang.Class c)
          Tells whether the given object is compatible with the given class ---that is, whether the given object can be passed as an argument to a method or constructor whose parameter type is the given class.
static void setElementsAccessor(java.lang.Class cls, ElementsAccessor accessor)
           
static boolean setFieldValue(OgnlContext context, java.lang.Object target, java.lang.String propertyName, java.lang.Object value)
           
static void setIndexedProperty(OgnlContext context, java.lang.Object source, java.lang.String name, java.lang.Object index, java.lang.Object value)
           
static void setMethodAccessor(java.lang.Class cls, MethodAccessor accessor)
           
static boolean setMethodValue(OgnlContext context, java.lang.Object target, java.lang.String propertyName, java.lang.Object value)
           
static boolean setMethodValue(OgnlContext context, java.lang.Object target, java.lang.String propertyName, java.lang.Object value, boolean checkAccessAndExistence)
           
static void setNullHandler(java.lang.Class cls, NullHandler handler)
           
static void setProperty(OgnlContext context, java.lang.Object target, java.lang.Object name, java.lang.Object value)
           
static void setPropertyAccessor(java.lang.Class cls, PropertyAccessor accessor)
           
static java.lang.Object[] toArray(java.util.List list)
          Utility to convert a List into an Object[] array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NotFound

public static final java.lang.Object NotFound

NotFoundList

public static final java.util.List NotFoundList

NotFoundMap

public static final java.util.Map NotFoundMap

NoArguments

public static final java.lang.Object[] NoArguments

NoArgumentTypes

public static final java.lang.Class[] NoArgumentTypes

NoConversionPossible

public static final java.lang.Object NoConversionPossible
Token returned by TypeConverter for no conversion possible


INDEXED_PROPERTY_NONE

public static int INDEXED_PROPERTY_NONE
Not an indexed property


INDEXED_PROPERTY_INT

public static int INDEXED_PROPERTY_INT
JavaBeans IndexedProperty


INDEXED_PROPERTY_OBJECT

public static int INDEXED_PROPERTY_OBJECT
OGNL ObjectIndexedProperty


NULL_STRING

public static final java.lang.String NULL_STRING

SET_PREFIX

private static final java.lang.String SET_PREFIX
See Also:
Constant Field Values

GET_PREFIX

private static final java.lang.String GET_PREFIX
See Also:
Constant Field Values

IS_PREFIX

private static final java.lang.String IS_PREFIX
See Also:
Constant Field Values

HEX_PADDING

private static final java.util.Map HEX_PADDING
Prefix padding for hexadecimal numbers to HEX_LENGTH.


HEX_PREFIX

private static final java.lang.String HEX_PREFIX
Hexadecimal prefix for printing "pointers".

See Also:
Constant Field Values

HEX_LENGTH

private static final int HEX_LENGTH
See Also:
Constant Field Values

NULL_OBJECT_STRING

private static final java.lang.String NULL_OBJECT_STRING
Returned by getUniqueDescriptor() when the object is null.

See Also:
Constant Field Values

methodAccessors

private static OgnlRuntime.ClassCache methodAccessors

propertyAccessors

private static OgnlRuntime.ClassCache propertyAccessors

elementsAccessors

private static OgnlRuntime.ClassCache elementsAccessors

nullHandlers

private static OgnlRuntime.ClassCache nullHandlers

propertyDescriptorCache

private static OgnlRuntime.ClassCache propertyDescriptorCache

constructorCache

private static OgnlRuntime.ClassCache constructorCache

staticMethodCache

private static OgnlRuntime.ClassCache staticMethodCache

instanceMethodCache

private static OgnlRuntime.ClassCache instanceMethodCache

invokePermissionCache

private static OgnlRuntime.ClassCache invokePermissionCache

fieldCache

private static OgnlRuntime.ClassCache fieldCache

superclasses

private static java.util.List superclasses

declaredMethods

private static OgnlRuntime.ClassCache[] declaredMethods

primitiveTypes

private static java.util.Map primitiveTypes

primitiveDefaults

private static OgnlRuntime.ClassCache primitiveDefaults

methodParameterTypesCache

private static java.util.Map methodParameterTypesCache

ctorParameterTypesCache

private static java.util.Map ctorParameterTypesCache

securityManager

private static java.lang.SecurityManager securityManager

evaluationPool

private static EvaluationPool evaluationPool

objectArrayPool

private static ObjectArrayPool objectArrayPool
Constructor Detail

OgnlRuntime

public OgnlRuntime()
Method Detail

getTargetClass

public static java.lang.Class getTargetClass(java.lang.Object o)
Gets the "target" class of an object for looking up accessors that are registered on the target. If the object is a Class object this will return the Class itself, else it will return object's getClass() result.


getBaseName

public static java.lang.String getBaseName(java.lang.Object o)
Returns the base name (the class name without the package name prepended) of the object given.


getClassBaseName

public static java.lang.String getClassBaseName(java.lang.Class c)
Returns the base name (the class name without the package name prepended) of the class given.


getClassName

public static java.lang.String getClassName(java.lang.Object o,
                                            boolean fullyQualified)

getClassName

public static java.lang.String getClassName(java.lang.Class c,
                                            boolean fullyQualified)

getPackageName

public static java.lang.String getPackageName(java.lang.Object o)
Returns the package name of the object's class.


getClassPackageName

public static java.lang.String getClassPackageName(java.lang.Class c)
Returns the package name of the class given.


getPointerString

public static java.lang.String getPointerString(int num)
Returns a "pointer" string in the usual format for these things - 0x.


getPointerString

public static java.lang.String getPointerString(java.lang.Object o)
Returns a "pointer" string in the usual format for these things - 0x for the object given. This will always return a unique value for each object.


getUniqueDescriptor

public static java.lang.String getUniqueDescriptor(java.lang.Object object,
                                                   boolean fullyQualified)
Returns a unique descriptor string that includes the object's class and a unique integer identifier. If fullyQualified is true then the class name will be fully qualified to include the package name, else it will be just the class' base name.


getUniqueDescriptor

public static java.lang.String getUniqueDescriptor(java.lang.Object object)
Returns a unique descriptor string that includes the object's class' base name and a unique integer identifier.


toArray

public static java.lang.Object[] toArray(java.util.List list)
Utility to convert a List into an Object[] array. If the list is zero elements this will return a constant array; toArray() on List always returns a new object and this is wasteful for our purposes.


getParameterTypes

public static java.lang.Class[] getParameterTypes(java.lang.reflect.Method m)
Returns the parameter types of the given method.


getParameterTypes

public static java.lang.Class[] getParameterTypes(java.lang.reflect.Constructor c)
Returns the parameter types of the given method.


getPermission

public static java.security.Permission getPermission(java.lang.reflect.Method method)
Permission will be named "invoke..".


invokeMethod

public static java.lang.Object invokeMethod(java.lang.Object target,
                                            java.lang.reflect.Method method,
                                            java.lang.Object[] argsArray)
                                     throws java.lang.reflect.InvocationTargetException,
                                            java.lang.IllegalAccessException

getArgClass

public static final java.lang.Class getArgClass(java.lang.Object arg)
Gets the class for a method argument that is appropriate for looking up methods by reflection, by looking for the standard primitive wrapper classes and exchanging for them their underlying primitive class objects. Other classes are passed through unchanged.


isTypeCompatible

public static final boolean isTypeCompatible(java.lang.Object object,
                                             java.lang.Class c)
Tells whether the given object is compatible with the given class ---that is, whether the given object can be passed as an argument to a method or constructor whose parameter type is the given class. If object is null this will return true because null is compatible with any type.


areArgsCompatible

public static final boolean areArgsCompatible(java.lang.Object[] args,
                                              java.lang.Class[] classes)
Tells whether the given array of objects is compatible with the given array of classes---that is, whether the given array of objects can be passed as arguments to a method or constructor whose parameter types are the given array of classes.


isMoreSpecific

public static final boolean isMoreSpecific(java.lang.Class[] classes1,
                                           java.lang.Class[] classes2)
Tells whether the first array of classes is more specific than the second. Assumes that the two arrays are of the same length.


getModifierString

public static final java.lang.String getModifierString(int modifiers)

classForName

public static final java.lang.Class classForName(OgnlContext context,
                                                 java.lang.String className)
                                          throws java.lang.ClassNotFoundException

isInstance

public static final boolean isInstance(OgnlContext context,
                                       java.lang.Object value,
                                       java.lang.String className)
                                throws OgnlException

getPrimitiveDefaultValue

public static java.lang.Object getPrimitiveDefaultValue(java.lang.Class forClass)

getConvertedType

public static java.lang.Object getConvertedType(OgnlContext context,
                                                java.lang.Object target,
                                                java.lang.reflect.Member member,
                                                java.lang.String propertyName,
                                                java.lang.Object value,
                                                java.lang.Class type)

getConvertedTypes

public static boolean getConvertedTypes(OgnlContext context,
                                        java.lang.Object target,
                                        java.lang.reflect.Member member,
                                        java.lang.String propertyName,
                                        java.lang.Class[] parameterTypes,
                                        java.lang.Object[] args,
                                        java.lang.Object[] newArgs)

getConvertedMethodAndArgs

public static java.lang.reflect.Method getConvertedMethodAndArgs(OgnlContext context,
                                                                 java.lang.Object target,
                                                                 java.lang.String propertyName,
                                                                 java.util.List methods,
                                                                 java.lang.Object[] args,
                                                                 java.lang.Object[] newArgs)

getConvertedConstructorAndArgs

public static java.lang.reflect.Constructor getConvertedConstructorAndArgs(OgnlContext context,
                                                                           java.lang.Object target,
                                                                           java.util.List constructors,
                                                                           java.lang.Object[] args,
                                                                           java.lang.Object[] newArgs)

getAppropriateMethod

public static java.lang.reflect.Method getAppropriateMethod(OgnlContext context,
                                                            java.lang.Object source,
                                                            java.lang.Object target,
                                                            java.lang.String methodName,
                                                            java.lang.String propertyName,
                                                            java.util.List methods,
                                                            java.lang.Object[] args,
                                                            java.lang.Object[] actualArgs)
Gets the appropriate method to be called for the given target, method name and arguments. If successful this method will return the Method within the target that can be called and the converted arguments in actualArgs. If unsuccessful this method will return null and the actualArgs will be empty.


callAppropriateMethod

public static java.lang.Object callAppropriateMethod(OgnlContext context,
                                                     java.lang.Object source,
                                                     java.lang.Object target,
                                                     java.lang.String methodName,
                                                     java.lang.String propertyName,
                                                     java.util.List methods,
                                                     java.lang.Object[] args)
                                              throws MethodFailedException

callStaticMethod

public static final java.lang.Object callStaticMethod(OgnlContext context,
                                                      java.lang.String className,
                                                      java.lang.String methodName,
                                                      java.lang.Object[] args)
                                               throws OgnlException,
                                                      MethodFailedException

callMethod

public static final java.lang.Object callMethod(OgnlContext context,
                                                java.lang.Object target,
                                                java.lang.String methodName,
                                                java.lang.String propertyName,
                                                java.lang.Object[] args)
                                         throws OgnlException,
                                                MethodFailedException

callConstructor

public static final java.lang.Object callConstructor(OgnlContext context,
                                                     java.lang.String className,
                                                     java.lang.Object[] args)
                                              throws OgnlException

getMethodValue

public static final java.lang.Object getMethodValue(OgnlContext context,
                                                    java.lang.Object target,
                                                    java.lang.String propertyName)
                                             throws OgnlException,
                                                    java.lang.IllegalAccessException,
                                                    java.lang.NoSuchMethodException,
                                                    java.beans.IntrospectionException

getMethodValue

public static final java.lang.Object getMethodValue(OgnlContext context,
                                                    java.lang.Object target,
                                                    java.lang.String propertyName,
                                                    boolean checkAccessAndExistence)
                                             throws OgnlException,
                                                    java.lang.IllegalAccessException,
                                                    java.lang.NoSuchMethodException,
                                                    java.beans.IntrospectionException
If the checkAccessAndExistence flag is true this method will check to see if the method exists and if it is accessible according to the context's MemberAccess. If neither test passes this will return NotFound.


setMethodValue

public static final boolean setMethodValue(OgnlContext context,
                                           java.lang.Object target,
                                           java.lang.String propertyName,
                                           java.lang.Object value)
                                    throws OgnlException,
                                           java.lang.IllegalAccessException,
                                           java.lang.NoSuchMethodException,
                                           MethodFailedException,
                                           java.beans.IntrospectionException

setMethodValue

public static final boolean setMethodValue(OgnlContext context,
                                           java.lang.Object target,
                                           java.lang.String propertyName,
                                           java.lang.Object value,
                                           boolean checkAccessAndExistence)
                                    throws OgnlException,
                                           java.lang.IllegalAccessException,
                                           java.lang.NoSuchMethodException,
                                           MethodFailedException,
                                           java.beans.IntrospectionException

getConstructors

public static final java.util.List getConstructors(java.lang.Class targetClass)

getMethods

public static final java.util.Map getMethods(java.lang.Class targetClass,
                                             boolean staticMethods)

getMethods

public static final java.util.List getMethods(java.lang.Class targetClass,
                                              java.lang.String name,
                                              boolean staticMethods)

getFields

public static final java.util.Map getFields(java.lang.Class targetClass)

getField

public static final java.lang.reflect.Field getField(java.lang.Class inClass,
                                                     java.lang.String name)

getFieldValue

public static final java.lang.Object getFieldValue(OgnlContext context,
                                                   java.lang.Object target,
                                                   java.lang.String propertyName)
                                            throws java.lang.NoSuchFieldException

getFieldValue

public static final java.lang.Object getFieldValue(OgnlContext context,
                                                   java.lang.Object target,
                                                   java.lang.String propertyName,
                                                   boolean checkAccessAndExistence)
                                            throws java.lang.NoSuchFieldException

setFieldValue

public static final boolean setFieldValue(OgnlContext context,
                                          java.lang.Object target,
                                          java.lang.String propertyName,
                                          java.lang.Object value)
                                   throws OgnlException

isFieldAccessible

public static final boolean isFieldAccessible(OgnlContext context,
                                              java.lang.Object target,
                                              java.lang.Class inClass,
                                              java.lang.String propertyName)

isFieldAccessible

public static final boolean isFieldAccessible(OgnlContext context,
                                              java.lang.Object target,
                                              java.lang.reflect.Field field,
                                              java.lang.String propertyName)

hasField

public static final boolean hasField(OgnlContext context,
                                     java.lang.Object target,
                                     java.lang.Class inClass,
                                     java.lang.String propertyName)

getStaticField

public static final java.lang.Object getStaticField(OgnlContext context,
                                                    java.lang.String className,
                                                    java.lang.String fieldName)
                                             throws OgnlException

getDeclaredMethods

public static final java.util.List getDeclaredMethods(java.lang.Class targetClass,
                                                      java.lang.String propertyName,
                                                      boolean findSets)

getGetMethod

public static final java.lang.reflect.Method getGetMethod(OgnlContext context,
                                                          java.lang.Class targetClass,
                                                          java.lang.String propertyName)
                                                   throws java.beans.IntrospectionException,
                                                          OgnlException

isMethodAccessible

public static final boolean isMethodAccessible(OgnlContext context,
                                               java.lang.Object target,
                                               java.lang.reflect.Method method,
                                               java.lang.String propertyName)

hasGetMethod

public static final boolean hasGetMethod(OgnlContext context,
                                         java.lang.Object target,
                                         java.lang.Class targetClass,
                                         java.lang.String propertyName)
                                  throws java.beans.IntrospectionException,
                                         OgnlException

getSetMethod

public static final java.lang.reflect.Method getSetMethod(OgnlContext context,
                                                          java.lang.Class targetClass,
                                                          java.lang.String propertyName)
                                                   throws java.beans.IntrospectionException,
                                                          OgnlException

hasSetMethod

public static final boolean hasSetMethod(OgnlContext context,
                                         java.lang.Object target,
                                         java.lang.Class targetClass,
                                         java.lang.String propertyName)
                                  throws java.beans.IntrospectionException,
                                         OgnlException

hasGetProperty

public static final boolean hasGetProperty(OgnlContext context,
                                           java.lang.Object target,
                                           java.lang.Object oname)
                                    throws java.beans.IntrospectionException,
                                           OgnlException

hasSetProperty

public static final boolean hasSetProperty(OgnlContext context,
                                           java.lang.Object target,
                                           java.lang.Object oname)
                                    throws java.beans.IntrospectionException,
                                           OgnlException

indexMethodCheck

private static final boolean indexMethodCheck(java.util.List methods)

findObjectIndexedPropertyDescriptors

private static final void findObjectIndexedPropertyDescriptors(java.lang.Class targetClass,
                                                               java.util.Map intoMap)
                                                        throws OgnlException

getPropertyDescriptors

public static final java.util.Map getPropertyDescriptors(java.lang.Class targetClass)
                                                  throws java.beans.IntrospectionException,
                                                         OgnlException
This method returns the property descriptors for the given class as a Map


getPropertyDescriptor

public static final java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.Class targetClass,
                                                                        java.lang.String propertyName)
                                                                 throws java.beans.IntrospectionException,
                                                                        OgnlException
This method returns a PropertyDescriptor for the given class and property name using a Map lookup (using getPropertyDescriptorsMap()).


getPropertyDescriptorsArray

public static final java.beans.PropertyDescriptor[] getPropertyDescriptorsArray(java.lang.Class targetClass)
                                                                         throws java.beans.IntrospectionException

getPropertyDescriptorFromArray

public static final java.beans.PropertyDescriptor getPropertyDescriptorFromArray(java.lang.Class targetClass,
                                                                                 java.lang.String name)
                                                                          throws java.beans.IntrospectionException
Gets the property descriptor with the given name for the target class given.


setMethodAccessor

public static final void setMethodAccessor(java.lang.Class cls,
                                           MethodAccessor accessor)

getMethodAccessor

public static final MethodAccessor getMethodAccessor(java.lang.Class cls)
                                              throws OgnlException

setPropertyAccessor

public static final void setPropertyAccessor(java.lang.Class cls,
                                             PropertyAccessor accessor)

getPropertyAccessor

public static final PropertyAccessor getPropertyAccessor(java.lang.Class cls)
                                                  throws OgnlException

getElementsAccessor

public static final ElementsAccessor getElementsAccessor(java.lang.Class cls)
                                                  throws OgnlException

setElementsAccessor

public static final void setElementsAccessor(java.lang.Class cls,
                                             ElementsAccessor accessor)

getNullHandler

public static final NullHandler getNullHandler(java.lang.Class cls)
                                        throws OgnlException

setNullHandler

public static final void setNullHandler(java.lang.Class cls,
                                        NullHandler handler)

getHandler

private static final java.lang.Object getHandler(java.lang.Class forClass,
                                                 OgnlRuntime.ClassCache handlers)

getProperty

public static final java.lang.Object getProperty(OgnlContext context,
                                                 java.lang.Object source,
                                                 java.lang.Object name)
                                          throws OgnlException

setProperty

public static final void setProperty(OgnlContext context,
                                     java.lang.Object target,
                                     java.lang.Object name,
                                     java.lang.Object value)
                              throws OgnlException

getIndexedPropertyType

public static final int getIndexedPropertyType(OgnlContext context,
                                               java.lang.Class sourceClass,
                                               java.lang.String name)
                                        throws OgnlException
Determines the index property type, if any. Returns INDEXED_PROPERTY_NONE if the property is not index-accessible as determined by OGNL or JavaBeans. If it is indexable then this will return whether it is a JavaBeans indexed property, conforming to the indexed property patterns (returns INDEXED_PROPERTY_INT) or if it conforms to the OGNL arbitrary object indexable (returns INDEXED_PROPERTY_OBJECT).


getIndexedProperty

public static final java.lang.Object getIndexedProperty(OgnlContext context,
                                                        java.lang.Object source,
                                                        java.lang.String name,
                                                        java.lang.Object index)
                                                 throws OgnlException

setIndexedProperty

public static final void setIndexedProperty(OgnlContext context,
                                            java.lang.Object source,
                                            java.lang.String name,
                                            java.lang.Object index,
                                            java.lang.Object value)
                                     throws OgnlException

getEvaluationPool

public static EvaluationPool getEvaluationPool()

getObjectArrayPool

public static ObjectArrayPool getObjectArrayPool()