ognl |
OGNL Overview
OGNL stands for Object-Graph Navigation Language; it is an expression language
for getting and setting properties of Java objects. You use the same expression
for both getting and setting the value of a property.
OGNL started out as a way to set up associations between UI
components and controllers using property names. As the desire for
more complicated associations grew, Drew Davidson created what he
called KVCL, for Key-Value Coding Language, egged on by Luke
Blanshard. Luke then reimplemented the language using ANTLR, came up
with the new name, and, egged on by Drew, filled it out to its current
state.
We pronounce OGNL as a word, like the last syllables of a drunken
pronunciation of "orthogonal" or like "ogg-null".
|
Java Source File Name | Type | Comment |
ArrayElementsAccessor.java | Class | Implementation of ElementsAccessor that returns an iterator over a Java array. |
ArrayPropertyAccessor.java | Class | Implementation of PropertyAccessor that uses numbers and dynamic subscripts as
properties to index into Java arrays. |
ASTAdd.java | Class | |
ASTAnd.java | Class | |
ASTAssign.java | Class | |
ASTBitAnd.java | Class | |
ASTBitNegate.java | Class | |
ASTBitOr.java | Class | |
ASTChain.java | Class | |
ASTConst.java | Class | |
ASTCtor.java | Class | |
ASTDivide.java | Class | |
ASTEq.java | Class | |
ASTEval.java | Class | |
ASTGreater.java | Class | |
ASTGreaterEq.java | Class | |
ASTIn.java | Class | |
ASTInstanceof.java | Class | |
ASTKeyValue.java | Class | |
ASTLess.java | Class | |
ASTLessEq.java | Class | |
ASTList.java | Class | |
ASTMap.java | Class | |
ASTMethod.java | Class | |
ASTMultiply.java | Class | |
ASTNegate.java | Class | |
ASTNot.java | Class | |
ASTNotEq.java | Class | |
ASTNotIn.java | Class | |
ASTOr.java | Class | |
ASTProject.java | Class | |
ASTProperty.java | Class | |
ASTRemainder.java | Class | |
ASTRootVarRef.java | Class | |
ASTSelect.java | Class | |
ASTSelectFirst.java | Class | |
ASTSelectLast.java | Class | |
ASTSequence.java | Class | |
ASTShiftLeft.java | Class | |
ASTShiftRight.java | Class | |
ASTStaticField.java | Class | |
ASTStaticMethod.java | Class | |
ASTSubtract.java | Class | |
ASTTest.java | Class | |
ASTThisVarRef.java | Class | |
ASTUnsignedShiftRight.java | Class | |
ASTVarRef.java | Class | |
ASTXor.java | Class | |
ClassResolver.java | Interface | This interface defines an object that will resolve a class from a string
and a ognl context table. |
CollectionElementsAccessor.java | Class | Implementation of ElementsAccessor that returns a collection's iterator. |
DefaultClassResolver.java | Class | Default class resolution. |
DefaultMemberAccess.java | Class | This class provides methods for setting up and restoring
access in a Field. |
DefaultTypeConverter.java | Class | Default type conversion. |
DynamicSubscript.java | Class | This class has predefined instances that stand for OGNL's special "dynamic subscripts"
for getting at the first, middle, or last elements of a list. |
ElementsAccessor.java | Interface | This interface defines a method for getting the "elements" of an object, which means
any objects that naturally would be considered to be contained by the object. |
EnumerationElementsAccessor.java | Class | Implementation of the ElementsAccessor interface for Enumerations, which returns an
iterator that passes its calls through to the target Enumeration. |
EnumerationIterator.java | Class | |
EnumerationPropertyAccessor.java | Class | Implementation of PropertyAccessor that provides "property" reference to
"nextElement" (aliases to "next" also) and "hasMoreElements" (also aliased
to "hasNext"). |
Evaluation.java | Class | An Evaluation is and object that holds a node being evaluated
and the source from which that node will take extract its
value. |
EvaluationPool.java | Class | |
ExpressionNode.java | Class | |
ExpressionSyntaxException.java | Class | Exception thrown if a malformed OGNL expression is encountered. |
InappropriateExpressionException.java | Class | 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 . |
IntHashMap.java | Class | A Map that uses ints as the keys. |
IteratorElementsAccessor.java | Class | Implementation of the ElementsAccessor interface for Iterators, which simply returns
the target iterator itself. |
IteratorEnumeration.java | Class | |
IteratorPropertyAccessor.java | Class | Implementation of PropertyAccessor that provides "property" reference to
"next" and "hasNext". |
JavaCharStream.java | Class | An implementation of interface CharStream, where the stream is assumed to
contain only ASCII characters (with java-like unicode escape processing). |
JJTOgnlParserState.java | Class | |
ListPropertyAccessor.java | Class | Implementation of PropertyAccessor that uses numbers and dynamic subscripts as
properties to index into Lists. |
MapElementsAccessor.java | Class | Implementation of ElementsAccessor that returns an iterator over the map's values. |
MapPropertyAccessor.java | Class | Implementation of PropertyAccessor that sets and gets properties by storing and looking
up values in Maps. |
MemberAccess.java | Interface | This interface provides a hook for preparing for accessing members
of objects. |
MethodAccessor.java | Interface | This interface defines methods for callinig methods in a target object. |
MethodFailedException.java | Class | Exception thrown if a method or constructor call fails. |
Node.java | Interface | JJTree interface for AST nodes, as modified to handle the OGNL operations getValue and
setValue. |
NoSuchPropertyException.java | Class | Exception thrown if a property is attempted to be extracted from an object that does
not have such a property. |
NullHandler.java | Interface | Interface for handling null results from Chains. |
NumberElementsAccessor.java | Class | Implementation of ElementsAccessor that returns an iterator over integers from 0 up to
the given target. |
NumericTypes.java | Interface | This interface defines some useful constants for describing the various possible
numeric types of OGNL. |
ObjectArrayPool.java | Class | |
ObjectElementsAccessor.java | Class | Implementation of ElementsAccessor that returns a single-element iterator, containing
the original target object. |
ObjectIndexedPropertyDescriptor.java | Class | PropertyDescriptor subclass that describes an indexed set of read/write
methods to get a property. |
ObjectMethodAccessor.java | Class | Implementation of PropertyAccessor that uses reflection on the target object's class to
find a field or a pair of set/get methods with the given property name. |
ObjectNullHandler.java | Class | Implementation of NullHandler that returns null in all cases,
so that NullPointerException will be thrown by the caller. |
ObjectPropertyAccessor.java | Class | Implementation of PropertyAccessor that uses reflection on the target object's class to
find a field or a pair of set/get methods with the given property name. |
Ognl.java | Class | This class provides static methods for parsing and interpreting OGNL expressions.
The simplest use of the Ognl class is to get the value of an expression from
an object, without extra context or pre-parsing.
import ognl.Ognl;
import ognl.OgnlException;
try {
result = Ognl.getValue(expression, root);
} catch (OgnlException ex) {
// Report error or recover
}
This will parse the expression given and evaluate it against the root object
given, returning the result. |
OgnlContext.java | Class | |
OgnlException.java | Class | Superclass for OGNL exceptions, incorporating an optional encapsulated exception. |
OgnlInvokePermission.java | Class | BasicPermission subclass that defines a permission token for invoking
methods within OGNL. |
OgnlOps.java | Class | This is an abstract class with static methods that define the operations of OGNL. |
OgnlParser.java | Class | OgnlParser is a JavaCC parser class; it translates OGNL expressions into abstract
syntax trees (ASTs) that can then be interpreted by the getValue and setValue methods. |
OgnlParserConstants.java | Interface | |
OgnlParserTokenManager.java | Class | |
OgnlParserTreeConstants.java | Interface | |
OgnlRuntime.java | Class | This is an abstract class with static methods that define runtime
caching information in OGNL. |
ParseException.java | Class | This exception is thrown when parse errors are encountered. |
PropertyAccessor.java | Interface | This interface defines methods for setting and getting a property from a target object.
A "property" in this case is a named data value that takes the generic form of an
Object---the same definition as is used by beans. |
SetPropertyAccessor.java | Class | Implementation of PropertyAccessor that uses numbers and dynamic subscripts as
properties to index into Lists. |
SimpleNode.java | Class | |
Token.java | Class | Describes the input token stream. |
TokenMgrError.java | Class | |
TypeConverter.java | Interface | Interface for accessing the type conversion facilities within a context. |