|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.henshin.interpreter.impl.AssignmentImpl org.eclipse.emf.henshin.interpreter.impl.MatchImpl
public class MatchImpl
Default Match
implementation.
Field Summary | |
---|---|
protected List<Node> |
nodes
|
Fields inherited from class org.eclipse.emf.henshin.interpreter.impl.AssignmentImpl |
---|
isResult, unit, values |
Constructor Summary | |
---|---|
MatchImpl(Assignment assignment,
boolean isResultMatch)
Constructor. |
|
MatchImpl(Rule rule)
Default constructor. |
|
MatchImpl(Rule rule,
boolean isResultMatch)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
List<Match> |
getMultiMatches(Rule multiRule)
Get the nested matches for a multi-rule. |
EObject |
getNodeTarget(Node node)
Get the match target for a node. |
List<EObject> |
getNodeTargets()
Get all node targets of this match. |
Rule |
getRule()
Get the rule that this match is used for. |
boolean |
isComplete()
Checks if all nodes have a target and all nested matches are also complete. |
boolean |
isValid()
Checks whether this match is complete, whether the typing of the matched objects is correct with respect to the node types, and whether all edges are present. |
boolean |
overlapsWith(Match match)
Checks whether this match overlaps with another match. |
void |
setNodeTarget(Node node,
EObject target)
Set the match target for a node. |
void |
setParameterValue(Parameter param,
Object value)
Set the assigned value for a parameter. |
protected void |
setUnit(Unit unit)
|
String |
toString()
|
protected String |
toStringWithIndent(String indent)
|
Methods inherited from class org.eclipse.emf.henshin.interpreter.impl.AssignmentImpl |
---|
clear, copyParameterValues, getParameterValue, getParameterValues, getUnit, hashCode, isEmpty, isResult, setValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.henshin.interpreter.Assignment |
---|
clear, getParameterValue, getParameterValues, getUnit, isEmpty, isResult |
Field Detail |
---|
protected List<Node> nodes
Constructor Detail |
---|
public MatchImpl(Rule rule)
rule
- Rule to be matched.public MatchImpl(Rule rule, boolean isResultMatch)
rule
- The rule that this match is used for.isResultMatch
- Determines whether this is a result match.public MatchImpl(Assignment assignment, boolean isResultMatch)
assignment
- The assignment or match to be copied.isResultMatch
- Determines whether this is a result match.Method Detail |
---|
protected void setUnit(Unit unit)
setUnit
in class AssignmentImpl
public Rule getRule()
Match
getRule
in interface Match
public EObject getNodeTarget(Node node)
Match
getNodeTarget
in interface Match
node
- The node.
public void setNodeTarget(Node node, EObject target)
Match
setNodeTarget
in interface Match
node
- The node.target
- The match target.public void setParameterValue(Parameter param, Object value)
Assignment
setParameterValue
in interface Assignment
setParameterValue
in class AssignmentImpl
param
- The parameter.value
- The value to be assigned with the parameter.public List<EObject> getNodeTargets()
Match
getNodeTargets
in interface Match
public List<Match> getMultiMatches(Rule multiRule)
Match
getMultiMatches
in interface Match
multiRule
- The multi-rule.
public boolean overlapsWith(Match match)
Match
Match.getNodeTargets()
contain shared elements.
overlapsWith
in interface Match
match
- A second match to check against.
true
if both matches have common targets.public boolean isComplete()
Match
isComplete
in interface Match
true
if all nodes are matched.public boolean isValid()
Match
isValid
in interface Match
true
if the match is valid.public boolean equals(Object obj)
equals
in class AssignmentImpl
public String toString()
toString
in class AssignmentImpl
protected String toStringWithIndent(String indent)
toStringWithIndent
in class AssignmentImpl
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |