public abstract class TraceMatch extends BasePatternMatch
TraceMatcher
.
Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. Each instance is a (possibly partial) substitution of pattern parameters, usable to represent a match of the pattern in the result of a query, or to specify the bound (fixed) input parameters when issuing a query.
TraceMatcher
,
TraceProcessor
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
get(java.lang.String parameterName)
Returns the value of the parameter with the given name, or null if name is invalid.
|
java.lang.String |
getId() |
java.lang.Object |
getSource() |
org.eclipse.emf.ecore.EObject |
getTarget() |
Trace |
getTrace() |
java.lang.String |
getTraceabilityId() |
int |
hashCode() |
static TraceMatch |
newEmptyMatch()
Returns an empty, mutable match.
|
static TraceMatch |
newMatch(java.lang.Object pSource,
java.lang.String pId,
org.eclipse.emf.ecore.EObject pTarget,
Trace pTrace,
java.lang.String pTraceabilityId)
Returns a new (partial) match.
|
static TraceMatch |
newMutableMatch(java.lang.Object pSource,
java.lang.String pId,
org.eclipse.emf.ecore.EObject pTarget,
Trace pTrace,
java.lang.String pTraceabilityId)
Returns a mutable (partial) match.
|
java.util.List<java.lang.String> |
parameterNames()
Returns the list of symbolic parameter names.
|
java.lang.String |
patternName()
Identifies the name of the pattern for which this is a match.
|
java.lang.String |
prettyPrint()
Prints the list of parameter-value pairs.
|
boolean |
set(java.lang.String parameterName,
java.lang.Object newValue)
Sets the parameter with the given name to the given value.
|
void |
setId(java.lang.String pId) |
void |
setSource(java.lang.Object pSource) |
void |
setTarget(org.eclipse.emf.ecore.EObject pTarget) |
void |
setTrace(Trace pTrace) |
void |
setTraceabilityId(java.lang.String pTraceabilityId) |
TraceQuerySpecification |
specification() |
java.lang.Object[] |
toArray()
Converts the match to an array representation, with each pattern parameter at their respective position.
|
TraceMatch |
toImmutable()
Takes an immutable snapshot of this match.
|
get, isCompatibleWith, prettyPrintFeature, prettyPrintValue, set, toString
isMutable
public java.lang.Object get(java.lang.String parameterName)
IPatternMatch
public java.lang.Object getSource()
public java.lang.String getId()
public org.eclipse.emf.ecore.EObject getTarget()
public Trace getTrace()
public java.lang.String getTraceabilityId()
public boolean set(java.lang.String parameterName, java.lang.Object newValue)
IPatternMatch
Works only if match is mutable. See IPatternMatch.isMutable()
.
public void setSource(java.lang.Object pSource)
public void setId(java.lang.String pId)
public void setTarget(org.eclipse.emf.ecore.EObject pTarget)
public void setTrace(Trace pTrace)
public void setTraceabilityId(java.lang.String pTraceabilityId)
public java.lang.String patternName()
IPatternMatch
patternName
in interface IPatternMatch
patternName
in class BasePatternMatch
public java.util.List<java.lang.String> parameterNames()
IPatternMatch
parameterNames
in interface IPatternMatch
parameterNames
in class BasePatternMatch
public java.lang.Object[] toArray()
IPatternMatch
public TraceMatch toImmutable()
IPatternMatch
public java.lang.String prettyPrint()
IPatternMatch
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public TraceQuerySpecification specification()
public static TraceMatch newEmptyMatch()
public static TraceMatch newMutableMatch(java.lang.Object pSource, java.lang.String pId, org.eclipse.emf.ecore.EObject pTarget, Trace pTrace, java.lang.String pTraceabilityId)
pSource
- the fixed value of pattern parameter source, or null if not bound.pId
- the fixed value of pattern parameter id, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pTraceabilityId
- the fixed value of pattern parameter traceabilityId, or null if not bound.public static TraceMatch newMatch(java.lang.Object pSource, java.lang.String pId, org.eclipse.emf.ecore.EObject pTarget, Trace pTrace, java.lang.String pTraceabilityId)
The returned match will be immutable. Use newEmptyMatch()
to obtain a mutable match object.
pSource
- the fixed value of pattern parameter source, or null if not bound.pId
- the fixed value of pattern parameter id, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pTraceabilityId
- the fixed value of pattern parameter traceabilityId, or null if not bound.