|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springmodules.validation.valang.parser.DefaultVisitor
public class DefaultVisitor
Allows registration of custom functions. Custom functions can overwrite default functions.
Default functions are:
Field Summary | |
---|---|
static char |
INDEXED_DELIM_BEGIN
The delimiter that preceeds the zero-relative subscript for an indexed reference. |
static char |
INDEXED_DELIM_END
|
Constructor Summary | |
---|---|
DefaultVisitor()
Constructor |
Method Summary | |
---|---|
DefaultDateParser |
getDateParser()
Gets date parser. |
Function |
getFunction(String name,
Function[] arguments,
int line,
int column)
Get a function based on the function name and arguments. |
Function |
getFunction(String className,
String propName)
Get bytecode generation function. |
org.apache.commons.collections.Predicate |
getPredicate(Function leftFunction,
Operator operator,
Function rightFunction,
int line,
int column)
Gets predicate. |
ValangVisitor |
getVisitor()
Gets visitor. |
void |
setApplicationContext(ApplicationContext applicationContext)
Implementation of ApplicationContextAware . |
void |
setVisitor(ValangVisitor visitor)
Register a custom visitor to look up custom functions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char INDEXED_DELIM_BEGIN
public static final char INDEXED_DELIM_END
Constructor Detail |
---|
public DefaultVisitor()
Method Detail |
---|
public Function getFunction(String name, Function[] arguments, int line, int column)
getFunction
in interface ValangVisitor
public Function getFunction(String className, String propName)
className
- Name of the Class
to generated
a Function
to retrieve a property.propertyName
- The name of the property to retrieve a value from in the function.
For example, expects 'message' and will call getMessage()
.
Function
based on the class and property name.public ValangVisitor getVisitor()
public void setVisitor(ValangVisitor visitor)
Register a custom visitor to look up custom functions. Lookup of functions will first be delegated to this visitor. If no function has been returned (null) lookup will be handled by DefaultVisitor.
visitor
- The custom visitor.public org.apache.commons.collections.Predicate getPredicate(Function leftFunction, Operator operator, Function rightFunction, int line, int column)
leftFunction
- Left comparison Function
.operator
- Operation
for comparison.rightFunction
- Right comparison Function
.line
- Line number of parsed expression.column
- Column number of parsed expression.
public DefaultDateParser getDateParser()
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
ApplicationContextAware
.
setApplicationContext
in interface ApplicationContextAware
BeansException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |