|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springmodules.validation.valang.javascript.ReflectiveVisitorHelper
public class ReflectiveVisitorHelper
Helper implementation for a reflective visitor. Mainly for internal use within the framework.
To use, call invokeVisit
, passing a Visitor object
and the data argument to accept (double-dispatch). For example:
public String styleValue(Object value) { reflectiveVistorSupport.invokeVisit(this, value) } // visit call back will be invoked via reflection String visit(<valueType> arg) { // process argument of type <valueType> }See the
DefaultValueStyler
class
for a concrete usage of this visitor helper.
Note: Copied from Spring 2.5 to avoid redoing work using this.
Constructor Summary | |
---|---|
ReflectiveVisitorHelper()
Deprecated. |
Method Summary | |
---|---|
Object |
invokeVisit(Object visitor,
Object argument)
Deprecated. Use reflection to call the appropriate visit method
on the provided visitor, passing in the specified argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectiveVisitorHelper()
Method Detail |
---|
public Object invokeVisit(Object visitor, Object argument)
visit
method
on the provided visitor, passing in the specified argument.
visitor
- the visitor encapsulating the logic to process the argumentargument
- the argument to dispatch
IllegalArgumentException
- if the visitor parameter is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |