Class MethodDecider
- java.lang.Object
-
- org.emftext.language.java.resolver.decider.AbstractDecider
-
- org.emftext.language.java.resolver.decider.MethodDecider
-
- All Implemented Interfaces:
IResolutionTargetDecider
public class MethodDecider extends AbstractDecider
A decider that looks for methods.
-
-
Field Summary
Fields Modifier and Type Field Description protected MethodlastFoundprotected MethodCallmethodCall-
Fields inherited from class org.emftext.language.java.resolver.decider.AbstractDecider
active
-
-
Constructor Summary
Constructors Constructor Description MethodDecider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanFindTargetsFor(EObject referenceContainer, EReference containingReference)Determines if the decider is of any use for the given resolving procedure.booleancontainsCandidates(EObject container, EReference containingReference)Determines if the decider needs to look into the given reference.EList<? extends EObject>getAdditionalCandidates(String identifier, EObject container)Allows for the decider to provide additional target candidates that are not directly contained in the traversed model tree.booleanisPossibleTarget(String id, EObject element)Decides if the given element is a (possibly the final) target.booleanisSure()Should return true, if the last timeisPossibleTarget()returned true was the final decision (i.e., traversal can be stopped).voidreset()Resets the state of the decider before a complete new walk takes place.-
Methods inherited from class org.emftext.language.java.resolver.decider.AbstractDecider
activate, continueAfterReference, deactivate, isActive, walkInto
-
-
-
-
Field Detail
-
methodCall
protected MethodCall methodCall
-
lastFound
protected Method lastFound
-
-
Method Detail
-
canFindTargetsFor
public boolean canFindTargetsFor(EObject referenceContainer, EReference containingReference)
Description copied from interface:IResolutionTargetDeciderDetermines if the decider is of any use for the given resolving procedure.- Returns:
- decision
-
reset
public void reset()
Description copied from interface:IResolutionTargetDeciderResets the state of the decider before a complete new walk takes place.- Specified by:
resetin interfaceIResolutionTargetDecider- Overrides:
resetin classAbstractDecider
-
getAdditionalCandidates
public EList<? extends EObject> getAdditionalCandidates(String identifier, EObject container)
Description copied from interface:IResolutionTargetDeciderAllows for the decider to provide additional target candidates that are not directly contained in the traversed model tree. The additional candidates will be inserted into the scope behind the children of the given container.- Specified by:
getAdditionalCandidatesin interfaceIResolutionTargetDecider- Overrides:
getAdditionalCandidatesin classAbstractDecider- Returns:
- null (corresponds to empty list) by default
-
isPossibleTarget
public boolean isPossibleTarget(String id, EObject element)
Description copied from interface:IResolutionTargetDeciderDecides if the given element is a (possibly the final) target.- Returns:
- decision
-
isSure
public boolean isSure()
Description copied from interface:IResolutionTargetDeciderShould return true, if the last timeisPossibleTarget()returned true was the final decision (i.e., traversal can be stopped).- Specified by:
isSurein interfaceIResolutionTargetDecider- Overrides:
isSurein classAbstractDecider- Returns:
- true by default
-
containsCandidates
public boolean containsCandidates(EObject container, EReference containingReference)
Description copied from interface:IResolutionTargetDeciderDetermines if the decider needs to look into the given reference.- Returns:
- decision
-
-