Package | Description |
---|---|
ognl |
OGNL stands for Object-Graph Navigation Language; it is an expression language
for getting and setting properties of Java objects.
|
Modifier and Type | Class and Description |
---|---|
class |
ExpressionSyntaxException
Exception thrown if a malformed OGNL expression is encountered.
|
class |
InappropriateExpressionException
Exception thrown if an OGNL expression is evaluated in the wrong context; the usual
case is when an expression that does not end in a property reference is passed to
setValue . |
class |
MethodFailedException
Exception thrown if a method or constructor call fails.
|
class |
NoSuchPropertyException
Exception thrown if a property is attempted to be extracted from an object that does
not have such a property.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
OgnlRuntime.callConstructor(OgnlContext context,
java.lang.String className,
java.lang.Object[] args) |
static java.lang.Object |
OgnlRuntime.callMethod(OgnlContext context,
java.lang.Object target,
java.lang.String methodName,
java.lang.Object[] args)
Invokes the specified method against the target object.
|
static java.lang.Object |
OgnlRuntime.callMethod(OgnlContext context,
java.lang.Object target,
java.lang.String methodName,
java.lang.String propertyName,
java.lang.Object[] args)
Deprecated.
|
static java.lang.Object |
OgnlRuntime.callStaticMethod(OgnlContext context,
java.lang.String className,
java.lang.String methodName,
java.lang.Object[] args) |
protected java.lang.Object |
SimpleNode.evaluateGetValueBody(OgnlContext context,
java.lang.Object source) |
protected void |
SimpleNode.evaluateSetValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
static java.lang.String |
OgnlRuntime.getChildSource(OgnlContext context,
java.lang.Object target,
Node child)
Attempts to get the java source string represented by the specific child expression
via the
JavaSource.toGetSourceString(OgnlContext,Object) interface method. |
static java.lang.String |
OgnlRuntime.getChildSource(OgnlContext context,
java.lang.Object target,
Node child,
boolean forceConversion)
Attempts to get the java source string represented by the specific child expression
via the
JavaSource.toGetSourceString(OgnlContext,Object) interface method. |
java.util.Enumeration |
ElementsAccessor.getElements(java.lang.Object target)
Returns an iterator over the elements of the given target object.
|
static ElementsAccessor |
OgnlRuntime.getElementsAccessor(java.lang.Class cls) |
static java.lang.reflect.Method |
OgnlRuntime.getGetMethod(OgnlContext context,
java.lang.Class targetClass,
java.lang.String propertyName) |
static java.lang.Object |
OgnlRuntime.getIndexedProperty(OgnlContext context,
java.lang.Object source,
java.lang.String name,
java.lang.Object index) |
static int |
OgnlRuntime.getIndexedPropertyType(OgnlContext context,
java.lang.Class sourceClass,
java.lang.String name)
Determines the index property type, if any.
|
int |
ASTProperty.getIndexedPropertyType(OgnlContext context,
java.lang.Object source)
Returns true if this property is described by an IndexedPropertyDescriptor and that if
followed by an index specifier it will call the index get/set methods rather than go through
property accessors.
|
static MethodAccessor |
OgnlRuntime.getMethodAccessor(java.lang.Class cls) |
static java.lang.Object |
OgnlRuntime.getMethodValue(OgnlContext context,
java.lang.Object target,
java.lang.String propertyName) |
static java.lang.Object |
OgnlRuntime.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 NullHandler |
OgnlRuntime.getNullHandler(java.lang.Class cls) |
java.lang.Object |
ObjectPropertyAccessor.getPossibleProperty(java.util.Map context,
java.lang.Object target,
java.lang.String name)
Returns OgnlRuntime.NotFound if the property does not exist.
|
java.lang.Object |
EnumerationPropertyAccessor.getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name) |
java.lang.Object |
SetPropertyAccessor.getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name) |
java.lang.Object |
ListPropertyAccessor.getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name) |
java.lang.Object |
IteratorPropertyAccessor.getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name) |
java.lang.Object |
ArrayPropertyAccessor.getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name) |
java.lang.Object |
MapPropertyAccessor.getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name) |
java.lang.Object |
ObjectPropertyAccessor.getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object oname) |
java.lang.Object |
PropertyAccessor.getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name)
Extracts and returns the property of the given name from the given target object.
|
java.lang.Object |
ASTProperty.getProperty(OgnlContext context,
java.lang.Object source) |
static java.lang.Object |
OgnlRuntime.getProperty(OgnlContext context,
java.lang.Object source,
java.lang.Object name) |
static PropertyAccessor |
OgnlRuntime.getPropertyAccessor(java.lang.Class cls) |
static java.beans.PropertyDescriptor |
OgnlRuntime.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.util.Map |
OgnlRuntime.getPropertyDescriptors(java.lang.Class targetClass)
This method returns the property descriptors for the given class as a Map.
|
static java.lang.reflect.Method |
OgnlRuntime.getSetMethod(OgnlContext context,
java.lang.Class targetClass,
java.lang.String propertyName) |
static java.lang.Object |
OgnlRuntime.getStaticField(OgnlContext context,
java.lang.String className,
java.lang.String fieldName) |
static java.lang.Object |
Ognl.getValue(java.lang.Object tree,
java.util.Map context,
java.lang.Object root)
Evaluates the given OGNL expression tree to extract a value from the given root object.
|
static java.lang.Object |
Ognl.getValue(java.lang.Object tree,
java.util.Map context,
java.lang.Object root,
java.lang.Class resultType)
Evaluates the given OGNL expression tree to extract a value from the given root object.
|
static java.lang.Object |
Ognl.getValue(java.lang.Object tree,
java.lang.Object root)
Evaluates the given OGNL expression tree to extract a value from the given root object.
|
static java.lang.Object |
Ognl.getValue(java.lang.Object tree,
java.lang.Object root,
java.lang.Class resultType)
Evaluates the given OGNL expression tree to extract a value from the given root object.
|
java.lang.Object |
Node.getValue(OgnlContext context,
java.lang.Object source)
Extracts the value from the given source object that is appropriate for this node
within the given context.
|
java.lang.Object |
SimpleNode.getValue(OgnlContext context,
java.lang.Object source) |
static java.lang.Object |
Ognl.getValue(java.lang.String expression,
java.util.Map context,
java.lang.Object root)
Evaluates the given OGNL expression to extract a value from the given root object in a given
context
|
static java.lang.Object |
Ognl.getValue(java.lang.String expression,
java.util.Map context,
java.lang.Object root,
java.lang.Class resultType)
Evaluates the given OGNL expression to extract a value from the given root object in a given
context
|
static java.lang.Object |
Ognl.getValue(java.lang.String expression,
java.lang.Object root)
Convenience method that combines calls to
parseExpression and
getValue . |
static java.lang.Object |
Ognl.getValue(java.lang.String expression,
java.lang.Object root,
java.lang.Class resultType)
Convenience method that combines calls to
parseExpression and
getValue . |
protected java.lang.Object |
ASTRootVarRef.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTThisVarRef.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTOr.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTConst.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTList.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTStaticField.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTStaticMethod.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTVarRef.getValueBody(OgnlContext context,
java.lang.Object source) |
protected abstract java.lang.Object |
SimpleNode.getValueBody(OgnlContext context,
java.lang.Object source)
Subclasses implement this method to do the actual work of extracting the appropriate value from the source object.
|
protected java.lang.Object |
ASTProperty.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTCtor.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTInstanceof.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTAnd.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTMethod.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTSequence.getValueBody(OgnlContext context,
java.lang.Object source) |
protected java.lang.Object |
ASTChain.getValueBody(OgnlContext context,
java.lang.Object source) |
static boolean |
OgnlRuntime.hasGetMethod(OgnlContext context,
java.lang.Object target,
java.lang.Class targetClass,
java.lang.String propertyName) |
boolean |
ObjectPropertyAccessor.hasGetProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object oname) |
static boolean |
OgnlRuntime.hasGetProperty(OgnlContext context,
java.lang.Object target,
java.lang.Object oname) |
boolean |
ObjectPropertyAccessor.hasGetProperty(OgnlContext context,
java.lang.Object target,
java.lang.Object oname) |
static boolean |
OgnlRuntime.hasSetMethod(OgnlContext context,
java.lang.Object target,
java.lang.Class targetClass,
java.lang.String propertyName) |
boolean |
ObjectPropertyAccessor.hasSetProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object oname) |
static boolean |
OgnlRuntime.hasSetProperty(OgnlContext context,
java.lang.Object target,
java.lang.Object oname) |
boolean |
ObjectPropertyAccessor.hasSetProperty(OgnlContext context,
java.lang.Object target,
java.lang.Object oname) |
static boolean |
OgnlOps.in(java.lang.Object v1,
java.lang.Object v2) |
static boolean |
Ognl.isConstant(java.lang.Object tree)
Same as
Ognl.isConstant(Object, java.util.Map) - only the Map context
is created for you. |
static boolean |
Ognl.isConstant(java.lang.Object tree,
java.util.Map context)
Checks if the specified
Node instance represents a constant
expression. |
boolean |
ExpressionNode.isConstant(OgnlContext context) |
boolean |
SimpleNode.isConstant(OgnlContext context) |
static boolean |
Ognl.isConstant(java.lang.String expression)
Same as
Ognl.isConstant(String, java.util.Map) - only the Map
instance is created for you. |
static boolean |
Ognl.isConstant(java.lang.String expression,
java.util.Map context)
Checks if the specified expression represents a constant expression.
|
static boolean |
OgnlRuntime.isInstance(OgnlContext context,
java.lang.Object value,
java.lang.String className) |
boolean |
ASTConst.isNodeConstant(OgnlContext context) |
boolean |
ASTStaticField.isNodeConstant(OgnlContext context) |
boolean |
ExpressionNode.isNodeConstant(OgnlContext context)
Returns true iff this node is constant without respect to the children.
|
boolean |
SimpleNode.isNodeConstant(OgnlContext context)
Returns true iff this node is constant without respect to the children.
|
boolean |
SimpleNode.isNodeSimpleProperty(OgnlContext context) |
boolean |
ASTProperty.isNodeSimpleProperty(OgnlContext context) |
static boolean |
Ognl.isSimpleNavigationChain(java.lang.Object tree) |
static boolean |
Ognl.isSimpleNavigationChain(java.lang.Object tree,
java.util.Map context) |
boolean |
SimpleNode.isSimpleNavigationChain(OgnlContext context) |
boolean |
ASTChain.isSimpleNavigationChain(OgnlContext context) |
static boolean |
Ognl.isSimpleNavigationChain(java.lang.String expression) |
static boolean |
Ognl.isSimpleNavigationChain(java.lang.String expression,
java.util.Map context) |
static boolean |
Ognl.isSimpleProperty(java.lang.Object tree) |
static boolean |
Ognl.isSimpleProperty(java.lang.Object tree,
java.util.Map context) |
boolean |
SimpleNode.isSimpleProperty(OgnlContext context) |
static boolean |
Ognl.isSimpleProperty(java.lang.String expression) |
static boolean |
Ognl.isSimpleProperty(java.lang.String expression,
java.util.Map context) |
static java.lang.Object |
Ognl.parseExpression(java.lang.String expression)
Parses the given OGNL expression and returns a tree representation of the expression that can
be used by
Ognl static methods. |
static boolean |
OgnlRuntime.setFieldValue(OgnlContext context,
java.lang.Object target,
java.lang.String propertyName,
java.lang.Object value) |
static void |
OgnlRuntime.setIndexedProperty(OgnlContext context,
java.lang.Object source,
java.lang.String name,
java.lang.Object index,
java.lang.Object value) |
static boolean |
OgnlRuntime.setMethodValue(OgnlContext context,
java.lang.Object target,
java.lang.String propertyName,
java.lang.Object value) |
static boolean |
OgnlRuntime.setMethodValue(OgnlContext context,
java.lang.Object target,
java.lang.String propertyName,
java.lang.Object value,
boolean checkAccessAndExistence) |
java.lang.Object |
ObjectPropertyAccessor.setPossibleProperty(java.util.Map context,
java.lang.Object target,
java.lang.String name,
java.lang.Object value)
Returns OgnlRuntime.NotFound if the property does not exist.
|
void |
EnumerationPropertyAccessor.setProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name,
java.lang.Object value) |
void |
ListPropertyAccessor.setProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name,
java.lang.Object value) |
void |
IteratorPropertyAccessor.setProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name,
java.lang.Object value) |
void |
ArrayPropertyAccessor.setProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name,
java.lang.Object value) |
void |
MapPropertyAccessor.setProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name,
java.lang.Object value) |
void |
ObjectPropertyAccessor.setProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object oname,
java.lang.Object value) |
void |
PropertyAccessor.setProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object name,
java.lang.Object value)
Sets the value of the property of the given name in the given target object.
|
static void |
OgnlRuntime.setProperty(OgnlContext context,
java.lang.Object target,
java.lang.Object name,
java.lang.Object value) |
static void |
Ognl.setValue(java.lang.Object tree,
java.util.Map context,
java.lang.Object root,
java.lang.Object value)
Evaluates the given OGNL expression tree to insert a value into the object graph rooted at
the given root object.
|
static void |
Ognl.setValue(java.lang.Object tree,
java.lang.Object root,
java.lang.Object value)
Evaluates the given OGNL expression tree to insert a value into the object graph rooted at
the given root object.
|
void |
Node.setValue(OgnlContext context,
java.lang.Object target,
java.lang.Object value)
Sets the given value in the given target as appropriate for this node within the
given context.
|
void |
SimpleNode.setValue(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
static void |
Ognl.setValue(java.lang.String expression,
java.util.Map context,
java.lang.Object root,
java.lang.Object value)
Evaluates the given OGNL expression to insert a value into the object graph rooted at the
given root object given the context.
|
static void |
Ognl.setValue(java.lang.String expression,
java.lang.Object root,
java.lang.Object value)
Convenience method that combines calls to
parseExpression and
setValue . |
protected void |
ASTRootVarRef.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
protected void |
ASTThisVarRef.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
protected void |
ASTOr.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
protected void |
ASTVarRef.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
protected void |
SimpleNode.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value)
Subclasses implement this method to do the actual work of setting the appropriate value in the target object.
|
protected void |
ASTProperty.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
protected void |
ASTAnd.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
protected void |
ASTSequence.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |
protected void |
ASTChain.setValueBody(OgnlContext context,
java.lang.Object target,
java.lang.Object value) |