Class ScopedTreeWalker
- java.lang.Object
-
- org.emftext.language.java.resolver.decider.ScopedTreeWalker
-
public class ScopedTreeWalker extends Object
This class can be used to traverse a model tree after parsing for reference resolving. It follows scoping rules common to textual languages.It starts at the point of the reference, walking up the tree but visiting, for each step up, the children of the new parent. On each visited element it applies a set of deciders with which it is initialized.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<IResolutionTargetDecider>
deciderList
-
Constructor Summary
Constructors Constructor Description ScopedTreeWalker(List<IResolutionTargetDecider> deciderList)
Initializes a new walker with a list of deciders.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EObject
walk(EObject startingPoint, String identifier, EObject container, EReference crossReference)
Main method.
-
-
-
Field Detail
-
deciderList
protected List<IResolutionTargetDecider> deciderList
-
-
Constructor Detail
-
ScopedTreeWalker
public ScopedTreeWalker(List<IResolutionTargetDecider> deciderList)
Initializes a new walker with a list of deciders.- Parameters:
deciderList
-
-
-
Method Detail
-
walk
public EObject walk(EObject startingPoint, String identifier, EObject container, EReference crossReference)
Main method.- Parameters:
startingPoint
- starting point of the search.identifier
- name of the target to resolve.container
- container of the target to resolve.crossReference
- reference in the container to the target.- Returns:
- the target if one was found.
-
-