|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.icore.AbstractAnnotatedObject ix.icore.AbstractIXObject ix.icore.domain.Refinement
public class Refinement
A Refinement describes one way to carry out a possible activity in a process being modelled.
Nested Class Summary | |
---|---|
static class |
Refinement.NameComparator
A comparator that puts refinements in alphabetical order by name. |
Field Summary | |
---|---|
protected ix.icore.domain.ListOfConstraint |
constraints
|
protected ix.icore.ListOfIssue |
issues
|
protected java.lang.String |
name
|
protected ix.icore.domain.ListOfNodeSpec |
nodes
|
protected ix.icore.domain.ListOfOrdering |
orderings
|
protected LList |
pattern
|
static Symbol |
S_COMPUTE
|
static Symbol |
S_CONDITION
|
static Symbol |
S_EFFECT
|
static Symbol |
S_MULTIPLE_ANSWER
|
static Symbol |
S_SELF
|
static Symbol |
S_WORLD_STATE
|
protected ix.icore.domain.ListOfVariableDeclaration |
variableDeclarations
|
Fields inherited from class ix.icore.AbstractAnnotatedObject |
---|
annotationListeners, annotations |
Constructor Summary | |
---|---|
Refinement()
|
|
Refinement(java.lang.String name,
LList pattern)
|
Method Summary | |
---|---|
void |
checkConsistency()
Checks the consistency of this refinement. |
protected void |
checkInputsAndOutputs()
|
protected void |
checkNodeRefs()
Checks that every node mentioned in a constraint is defined in this refinement. |
protected void |
checkParametersAgainstConstraints(Symbol key,
java.util.List constraints)
|
protected void |
checkVariableRefs()
Checks that the set of variables declared in this refinement and the set of variables referred to (used) in this refinement are the same. |
java.lang.Object |
clone()
|
java.lang.String |
getComments()
|
ix.icore.domain.ListOfConstraint |
getConditionConstraints()
|
ix.icore.domain.ListOfPatternAssignment |
getConditions()
|
ix.icore.domain.ListOfConstraint |
getConstraints()
|
ix.icore.domain.ListOfConstraint |
getConstraints(Symbol type,
Symbol relation)
|
java.util.SortedSet |
getDeclaredVariables()
Returns a set containing the ItemVar s declared
with this refinement. |
ix.icore.domain.ListOfConstraint |
getEffectConstraints()
|
ix.icore.domain.ListOfPatternAssignment |
getEffects()
|
ix.icore.domain.ListOfConstraint |
getFilterConstraints()
|
ix.icore.ListOfIssue |
getIssues()
|
java.lang.String |
getName()
|
ix.icore.domain.ListOfNodeSpec |
getNodes()
|
ix.icore.domain.ListOfOrdering |
getOrderings()
|
ix.icore.domain.ListOfConstraint |
getOtherConstraints()
|
LList |
getPattern()
|
ix.icore.domain.ListOfVariableDeclaration |
getVariableDeclarations()
|
java.util.SortedSet |
getVariablesUsed()
Returns a set containing the ItemVar s used
within this refinement. |
Refinement |
instantiate(MatchEnv env)
Returns a copy of this refinement in which each ItemVar
that has a value in the MatchEnv has been replaced by
that value. |
Refinement |
instantiate(MatchEnv env,
Function1 ifUnbound)
Returns a copy of this refinement in which each ItemVar
that has a value in the MatchEnv has been replaced by
that value. |
protected boolean |
isDeclared(ItemVar v)
Returns true iff this specified variable is declared in this refinement. |
void |
setConstraints(java.util.List constraints)
|
void |
setConstraints(ix.icore.domain.ListOfConstraint cs)
|
void |
setIssues(java.util.List issues)
|
void |
setIssues(ix.icore.ListOfIssue issues)
|
void |
setName(java.lang.String name)
|
void |
setNodes(java.util.List nodes)
|
void |
setNodes(ix.icore.domain.ListOfNodeSpec nodes)
|
void |
setOrderings(java.util.List orderings)
|
void |
setOrderings(ix.icore.domain.ListOfOrdering orderings)
|
void |
setPattern(LList pattern)
|
void |
setVariableDeclarations(java.util.List dcls)
|
void |
setVariableDeclarations(ix.icore.domain.ListOfVariableDeclaration variableDeclarations)
|
java.lang.String |
toString()
|
Methods inherited from class ix.icore.AbstractAnnotatedObject |
---|
addAnnotationListener, annMap, clearAnnotations, fireSetAnnotation, getAnnotation, getAnnotations, makeAnnMap, removeAnnotation, setAnnotation, setAnnotations, setComments, takeAnnotations |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ix.icore.Annotated |
---|
addAnnotationListener, clearAnnotations, fireSetAnnotation, getAnnotation, getAnnotations, removeAnnotation, setAnnotation, setAnnotations, takeAnnotations |
Field Detail |
---|
protected java.lang.String name
protected LList pattern
protected ix.icore.domain.ListOfVariableDeclaration variableDeclarations
protected ix.icore.domain.ListOfNodeSpec nodes
protected ix.icore.domain.ListOfOrdering orderings
protected ix.icore.domain.ListOfConstraint constraints
protected ix.icore.ListOfIssue issues
public static final Symbol S_WORLD_STATE
public static final Symbol S_CONDITION
public static final Symbol S_EFFECT
public static final Symbol S_COMPUTE
public static final Symbol S_MULTIPLE_ANSWER
public static final Symbol S_SELF
Constructor Detail |
---|
public Refinement()
public Refinement(java.lang.String name, LList pattern)
Method Detail |
---|
public java.lang.String getName()
getName
in interface Named
public void setName(java.lang.String name)
public LList getPattern()
public void setPattern(LList pattern)
public ix.icore.domain.ListOfVariableDeclaration getVariableDeclarations()
public void setVariableDeclarations(ix.icore.domain.ListOfVariableDeclaration variableDeclarations)
public ix.icore.domain.ListOfNodeSpec getNodes()
public void setNodes(ix.icore.domain.ListOfNodeSpec nodes)
public ix.icore.domain.ListOfOrdering getOrderings()
public void setOrderings(ix.icore.domain.ListOfOrdering orderings)
public ix.icore.domain.ListOfConstraint getConstraints()
public void setConstraints(ix.icore.domain.ListOfConstraint cs)
public ix.icore.ListOfIssue getIssues()
public void setIssues(ix.icore.ListOfIssue issues)
public java.lang.String getComments()
getComments
in class AbstractAnnotatedObject
public void setVariableDeclarations(java.util.List dcls)
public void setNodes(java.util.List nodes)
public void setOrderings(java.util.List orderings)
public void setConstraints(java.util.List constraints)
public void setIssues(java.util.List issues)
public ix.icore.domain.ListOfConstraint getFilterConstraints()
public ix.icore.domain.ListOfPatternAssignment getConditions()
public ix.icore.domain.ListOfPatternAssignment getEffects()
public ix.icore.domain.ListOfConstraint getConstraints(Symbol type, Symbol relation)
public ix.icore.domain.ListOfConstraint getConditionConstraints()
public ix.icore.domain.ListOfConstraint getEffectConstraints()
public ix.icore.domain.ListOfConstraint getOtherConstraints()
public void checkConsistency()
SyntaxException
- if it finds an inconsistencyprotected void checkVariableRefs()
SyntaxException
- if the sets are different.public java.util.SortedSet getVariablesUsed()
ItemVar
s used
within this refinement.
public java.util.SortedSet getDeclaredVariables()
ItemVar
s declared
with this refinement.
protected boolean isDeclared(ItemVar v)
protected void checkNodeRefs()
SyntaxException
- if there is a reference to an undefined node.protected void checkInputsAndOutputs()
protected void checkParametersAgainstConstraints(Symbol key, java.util.List constraints)
public Refinement instantiate(MatchEnv env)
ItemVar
that has a value in the MatchEnv
has been replaced by
that value.
MissingValuesException
- if it encounters any variable that
is not given a value.public Refinement instantiate(MatchEnv env, Function1 ifUnbound)
ItemVar
that has a value in the MatchEnv
has been replaced by
that value. The ifUnbound function is called on any
variable that does not have a value in the environment.
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |