|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.examples.pivot.util.AbstractVisitor<R,C>
public abstract class AbstractVisitor<R,C>
| Field Summary | |
|---|---|
protected C |
context
Context for the AST visitation. |
| Constructor Summary | |
|---|---|
protected |
AbstractVisitor(C context)
Initializes me with an initial value for my result. |
| Method Summary | ||
|---|---|---|
|
getAdapter(java.lang.Class<A> adapter)
Returns an object which is an instance of the given class associated with this object. |
|
R |
safeVisit(Visitable v)
A null-safe visitation of the specified visitable. |
|
R |
visit(Visitable v)
Perform a visit to the specified visitable. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final C context
| Constructor Detail |
|---|
protected AbstractVisitor(C context)
context - my initial result value| Method Detail |
|---|
public <A> A getAdapter(java.lang.Class<A> adapter)
Visitornull if
no such object can be found.
getAdapter in interface Visitor<R,C>adapter - the adapter class to look up
null if this object does not
have an adapter for the given classpublic R safeVisit(Visitable v)
v - a visitable, or null
null if the visitable is null;
otherwise, the result of visiting itpublic R visit(Visitable v)
v - a visitable, or null
null if the visitable is null;
otherwise, the result of visiting it
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||