| java.lang.Object ognl.OgnlRuntime
OgnlRuntime | abstract public class OgnlRuntime extends Object (Code) | | This is an abstract class with static methods that define runtime
caching information in OGNL.
author: Luke Blanshard (blanshlu@netscape.net) author: Drew Davidson (drew@ognl.org) |
Method Summary | |
final public static boolean | areArgsCompatible(Object[] args, 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. | public static Object | callAppropriateMethod(OgnlContext context, Object source, Object target, String methodName, String propertyName, List methods, Object[] args) | final public static Object | callConstructor(OgnlContext context, String className, Object[] args) | final public static Object | callMethod(OgnlContext context, Object target, String methodName, String propertyName, Object[] args) | final public static Object | callStaticMethod(OgnlContext context, String className, String methodName, Object[] args) | final public static Class | classForName(OgnlContext context, String className) | public static Method | getAppropriateMethod(OgnlContext context, Object source, Object target, String methodName, String propertyName, List methods, Object[] args, 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. | final public static Class | getArgClass(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. | public static String | getBaseName(Object o) Returns the base name (the class name without the
package name prepended) of the object given. | public static String | getClassBaseName(Class c) Returns the base name (the class name without the
package name prepended) of the class given. | public static String | getClassName(Object o, boolean fullyQualified) | public static String | getClassName(Class c, boolean fullyQualified) | public static String | getClassPackageName(Class c) Returns the package name of the class given. | final public static List | getConstructors(Class targetClass) | public static Constructor | getConvertedConstructorAndArgs(OgnlContext context, Object target, List constructors, Object[] args, Object[] newArgs) | public static Method | getConvertedMethodAndArgs(OgnlContext context, Object target, String propertyName, List methods, Object[] args, Object[] newArgs) | public static Object | getConvertedType(OgnlContext context, Object target, Member member, String propertyName, Object value, Class type) | public static boolean | getConvertedTypes(OgnlContext context, Object target, Member member, String propertyName, Class[] parameterTypes, Object[] args, Object[] newArgs) | final public static List | getDeclaredMethods(Class targetClass, String propertyName, boolean findSets) | final public static ElementsAccessor | getElementsAccessor(Class cls) | public static EvaluationPool | getEvaluationPool() | final public static Field | getField(Class inClass, String name) | final public static Object | getFieldValue(OgnlContext context, Object target, String propertyName) | final public static Object | getFieldValue(OgnlContext context, Object target, String propertyName, boolean checkAccessAndExistence) | final public static Map | getFields(Class targetClass) | final public static Method | getGetMethod(OgnlContext context, Class targetClass, String propertyName) | final public static Object | getIndexedProperty(OgnlContext context, Object source, String name, Object index) | final public static int | getIndexedPropertyType(OgnlContext context, Class sourceClass, String name) Determines the index property type, if any. | final public static MethodAccessor | getMethodAccessor(Class cls) | final public static Object | getMethodValue(OgnlContext context, Object target, String propertyName) | final public static Object | getMethodValue(OgnlContext context, Object target, 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. | final public static Map | getMethods(Class targetClass, boolean staticMethods) | final public static List | getMethods(Class targetClass, String name, boolean staticMethods) | final public static String | getModifierString(int modifiers) | final public static NullHandler | getNullHandler(Class cls) | public static ObjectArrayPool | getObjectArrayPool() | public static String | getPackageName(Object o) Returns the package name of the object's class. | public static Class[] | getParameterTypes(Method m) Returns the parameter types of the given method. | public static Class[] | getParameterTypes(Constructor c) Returns the parameter types of the given method. | public static Permission | getPermission(Method method) Permission will be named "invoke..". | public static String | getPointerString(int num) Returns a "pointer" string in the usual format for these
things - 0x. | public static String | getPointerString(Object o) Returns a "pointer" string in the usual format for these
things - 0x for the object given. | public static Object | getPrimitiveDefaultValue(Class forClass) | final public static Object | getProperty(OgnlContext context, Object source, Object name) | final public static PropertyAccessor | getPropertyAccessor(Class cls) | final public static PropertyDescriptor | getPropertyDescriptor(Class targetClass, String propertyName) This method returns a PropertyDescriptor for the given class and property name using
a Map lookup (using getPropertyDescriptorsMap()). | final public static PropertyDescriptor | getPropertyDescriptorFromArray(Class targetClass, String name) Gets the property descriptor with the given name for the target class given. | final public static Map | getPropertyDescriptors(Class targetClass) | final public static PropertyDescriptor[] | getPropertyDescriptorsArray(Class targetClass) | public static SecurityManager | getSecurityManager() Gets the SecurityManager that OGNL uses to determine permissions for
invoking methods. | final public static Method | getSetMethod(OgnlContext context, Class targetClass, String propertyName) | final public static Object | getStaticField(OgnlContext context, String className, String fieldName) | public static Class | getTargetClass(Object o) Gets the "target" class of an object for looking up accessors that
are registered on the target. | public static String | getUniqueDescriptor(Object object, boolean fullyQualified) Returns a unique descriptor string that includes the object's
class and a unique integer identifier. | public static String | getUniqueDescriptor(Object object) Returns a unique descriptor string that includes the object's
class' base name and a unique integer identifier. | final public static boolean | hasField(OgnlContext context, Object target, Class inClass, String propertyName) | final public static boolean | hasGetMethod(OgnlContext context, Object target, Class targetClass, String propertyName) | final public static boolean | hasGetProperty(OgnlContext context, Object target, Object oname) | final public static boolean | hasSetMethod(OgnlContext context, Object target, Class targetClass, String propertyName) | final public static boolean | hasSetProperty(OgnlContext context, Object target, Object oname) | public static Object | invokeMethod(Object target, Method method, Object[] argsArray) | final public static boolean | isFieldAccessible(OgnlContext context, Object target, Class inClass, String propertyName) | final public static boolean | isFieldAccessible(OgnlContext context, Object target, Field field, String propertyName) | final public static boolean | isInstance(OgnlContext context, Object value, String className) | final public static boolean | isMethodAccessible(OgnlContext context, Object target, Method method, String propertyName) | final public static boolean | isMoreSpecific(Class[] classes1, Class[] classes2) Tells whether the first array of classes is more specific than the second. | final public static boolean | isTypeCompatible(Object object, 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. | final public static void | setElementsAccessor(Class cls, ElementsAccessor accessor) | final public static boolean | setFieldValue(OgnlContext context, Object target, String propertyName, Object value) | final public static void | setIndexedProperty(OgnlContext context, Object source, String name, Object index, Object value) | final public static void | setMethodAccessor(Class cls, MethodAccessor accessor) | final public static boolean | setMethodValue(OgnlContext context, Object target, String propertyName, Object value) | final public static boolean | setMethodValue(OgnlContext context, Object target, String propertyName, Object value, boolean checkAccessAndExistence) | final public static void | setNullHandler(Class cls, NullHandler handler) | final public static void | setProperty(OgnlContext context, Object target, Object name, Object value) | final public static void | setPropertyAccessor(Class cls, PropertyAccessor accessor) | public static void | setSecurityManager(SecurityManager value) Sets the SecurityManager that OGNL uses to determine permissions for
invoking methods. | public static Object[] | toArray(List list) Utility to convert a List into an Object[] array. |
INDEXED_PROPERTY_INT | public static int INDEXED_PROPERTY_INT(Code) | | JavaBeans IndexedProperty
|
INDEXED_PROPERTY_NONE | public static int INDEXED_PROPERTY_NONE(Code) | | Not an indexed property
|
INDEXED_PROPERTY_OBJECT | public static int INDEXED_PROPERTY_OBJECT(Code) | | OGNL ObjectIndexedProperty
|
NoArgumentTypes | final public static Class[] NoArgumentTypes(Code) | | |
NoConversionPossible | final public static Object NoConversionPossible(Code) | | Token returned by TypeConverter for no conversion possible
|
NotFoundList | final public static List NotFoundList(Code) | | |
NotFoundMap | final public static Map NotFoundMap(Code) | | |
areArgsCompatible | final public static boolean areArgsCompatible(Object[] args, Class[] classes)(Code) | | 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.
|
getAppropriateMethod | public static Method getAppropriateMethod(OgnlContext context, Object source, Object target, String methodName, String propertyName, List methods, Object[] args, Object[] actualArgs)(Code) | | 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.
|
getArgClass | final public static Class getArgClass(Object arg)(Code) | | 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.
Parameters: arg - an object that is being passed to a method the class to use to look up the method |
getBaseName | public static String getBaseName(Object o)(Code) | | Returns the base name (the class name without the
package name prepended) of the object given.
|
getClassBaseName | public static String getClassBaseName(Class c)(Code) | | Returns the base name (the class name without the
package name prepended) of the class given.
|
getClassPackageName | public static String getClassPackageName(Class c)(Code) | | Returns the package name of the class given.
|
getConstructors | final public static List getConstructors(Class targetClass)(Code) | | |
getDeclaredMethods | final public static List getDeclaredMethods(Class targetClass, String propertyName, boolean findSets)(Code) | | |
getIndexedPropertyType | final public static int getIndexedPropertyType(OgnlContext context, Class sourceClass, String name) throws OgnlException(Code) | | 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 ).
|
getMethods | final public static Map getMethods(Class targetClass, boolean staticMethods)(Code) | | |
getMethods | final public static List getMethods(Class targetClass, String name, boolean staticMethods)(Code) | | |
getModifierString | final public static String getModifierString(int modifiers)(Code) | | |
getPackageName | public static String getPackageName(Object o)(Code) | | Returns the package name of the object's class.
|
getParameterTypes | public static Class[] getParameterTypes(Method m)(Code) | | Returns the parameter types of the given method.
|
getParameterTypes | public static Class[] getParameterTypes(Constructor c)(Code) | | Returns the parameter types of the given method.
|
getPointerString | public static String getPointerString(int num)(Code) | | Returns a "pointer" string in the usual format for these
things - 0x.
|
getPointerString | public static String getPointerString(Object o)(Code) | | 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.
|
getPrimitiveDefaultValue | public static Object getPrimitiveDefaultValue(Class forClass)(Code) | | |
getPropertyDescriptorFromArray | final public static PropertyDescriptor getPropertyDescriptorFromArray(Class targetClass, String name) throws IntrospectionException(Code) | | Gets the property descriptor with the given name for the target class given.
Parameters: targetClass - Class for which property descriptor is desired Parameters: name - Name of property PropertyDescriptor of the named property or null ifthe class has no property with the given name |
getSecurityManager | public static SecurityManager getSecurityManager()(Code) | | Gets the SecurityManager that OGNL uses to determine permissions for
invoking methods.
SecurityManager for OGNL |
getTargetClass | public static Class getTargetClass(Object o)(Code) | | 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.
|
getUniqueDescriptor | public static String getUniqueDescriptor(Object object, boolean fullyQualified)(Code) | | 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 String getUniqueDescriptor(Object object)(Code) | | Returns a unique descriptor string that includes the object's
class' base name and a unique integer identifier.
|
isMoreSpecific | final public static boolean isMoreSpecific(Class[] classes1, Class[] classes2)(Code) | | Tells whether the first array of classes is more specific than the second.
Assumes that the two arrays are of the same length.
|
isTypeCompatible | final public static boolean isTypeCompatible(Object object, Class c)(Code) | | 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.
|
setSecurityManager | public static void setSecurityManager(SecurityManager value)(Code) | | Sets the SecurityManager that OGNL uses to determine permissions for
invoking methods.
Parameters: value - SecurityManager to set |
toArray | public static Object[] toArray(List list)(Code) | | 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.
|
|
|