Class MethodDecider
java.lang.Object
org.emftext.language.java.resolver.decider.AbstractDecider
org.emftext.language.java.resolver.decider.MethodDecider
- All Implemented Interfaces:
IResolutionTargetDecider
A decider that looks for methods.
-
Field Summary
Fields inherited from class org.emftext.language.java.resolver.decider.AbstractDecider
active
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canFindTargetsFor
(EObject referenceContainer, EReference containingReference) Determines if the decider is of any use for the given resolving procedure.boolean
containsCandidates
(EObject container, EReference containingReference) Determines if the decider needs to look into the given reference.getAdditionalCandidates
(String identifier, EObject container) Allows for the decider to provide additional target candidates that are not directly contained in the traversed model tree.boolean
isPossibleTarget
(String id, EObject element) Decides if the given element is a (possibly the final) target.boolean
isSure()
Should return true, if the last timeisPossibleTarget()
returned true was the final decision (i.e., traversal can be stopped).void
reset()
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 Details
-
methodCall
-
lastFound
-
-
Constructor Details
-
MethodDecider
public MethodDecider()
-
-
Method Details
-
canFindTargetsFor
Description copied from interface:IResolutionTargetDecider
Determines if the decider is of any use for the given resolving procedure.- Returns:
- decision
-
reset
public void reset()Description copied from interface:IResolutionTargetDecider
Resets the state of the decider before a complete new walk takes place.- Specified by:
reset
in interfaceIResolutionTargetDecider
- Overrides:
reset
in classAbstractDecider
-
getAdditionalCandidates
Description copied from interface:IResolutionTargetDecider
Allows 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:
getAdditionalCandidates
in interfaceIResolutionTargetDecider
- Overrides:
getAdditionalCandidates
in classAbstractDecider
- Returns:
- null (corresponds to empty list) by default
-
isPossibleTarget
Description copied from interface:IResolutionTargetDecider
Decides if the given element is a (possibly the final) target.- Returns:
- decision
-
isSure
public boolean isSure()Description copied from interface:IResolutionTargetDecider
Should return true, if the last timeisPossibleTarget()
returned true was the final decision (i.e., traversal can be stopped).- Specified by:
isSure
in interfaceIResolutionTargetDecider
- Overrides:
isSure
in classAbstractDecider
- Returns:
- true by default
-
containsCandidates
Description copied from interface:IResolutionTargetDecider
Determines if the decider needs to look into the given reference.- Returns:
- decision
-