|
||||||||||
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 |
---|
@NonNull protected final C context
Constructor Detail |
---|
protected AbstractVisitor(@NonNull C context)
context
- my initial result valueMethod Detail |
---|
public <A> A getAdapter(@NonNull java.lang.Class<A> adapter)
Visitor
null
if
no such object can be found.
getAdapter
in interface Visitor<R>
adapter
- the adapter class to look up
null
if this object does not
have an adapter for the given class@Nullable public R safeVisit(@Nullable Visitable v)
v
- a visitable, or null
null
if the visitable is null
;
otherwise, the result of visiting it@Nullable public R visit(@NonNull 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 |