net.sourceforge.nrl.parser.ast.constraints.impl
Class GlobalExistsStatementImpl
java.lang.Object
org.antlr.runtime.tree.BaseTree
org.antlr.runtime.tree.CommonTree
net.sourceforge.nrl.parser.ast.impl.Antlr3NRLBaseAst
net.sourceforge.nrl.parser.ast.constraints.impl.ConstraintImpl
net.sourceforge.nrl.parser.ast.constraints.impl.GlobalExistsStatementImpl
- All Implemented Interfaces:
- IConstraint, IGlobalExistsStatement, INRLAstNode, org.antlr.runtime.tree.Tree
public class GlobalExistsStatementImpl
- extends ConstraintImpl
- implements IGlobalExistsStatement
Fields inherited from class org.antlr.runtime.tree.CommonTree |
childIndex, parent, startIndex, stopIndex, token |
Fields inherited from class org.antlr.runtime.tree.BaseTree |
children |
Fields inherited from interface org.antlr.runtime.tree.Tree |
INVALID_NODE |
Methods inherited from class org.antlr.runtime.tree.CommonTree |
dupNode, getCharPositionInLine, getChildIndex, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString |
Methods inherited from class org.antlr.runtime.tree.BaseTree |
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, getAncestor, getAncestors, getChild, getChildCount, getChildren, getFirstChildWithType, hasAncestor, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree |
GlobalExistsStatementImpl
public GlobalExistsStatementImpl()
GlobalExistsStatementImpl
public GlobalExistsStatementImpl(org.antlr.runtime.Token token)
accept
public void accept(INRLAstVisitor visitor)
- Description copied from interface:
INRLAstNode
- Accept a visitor to this node.
- Specified by:
accept
in interface INRLAstNode
- Overrides:
accept
in class Antlr3NRLBaseAst
- Parameters:
visitor
- the visitor
dump
@Deprecated
public String dump(int indent)
- Deprecated.
- Description copied from interface:
INRLAstNode
- Dump the AST and its children for debugging purposes
- Specified by:
dump
in interface INRLAstNode
- Overrides:
dump
in class Antlr3NRLBaseAst
- Parameters:
indent
- the indentation count, 0 on first call
- Returns:
- the AST as a string
getConstraint
public IConstraint getConstraint()
- Description copied from interface:
IGlobalExistsStatement
- Return the constraint to check relative to the object being iterated
over. Use
IGlobalExistsStatement.hasConstraint()
to check if it exists first.
- Specified by:
getConstraint
in interface IGlobalExistsStatement
- Returns:
- the constraint or null
getCount
public int getCount()
- Description copied from interface:
IGlobalExistsStatement
- Return the cardinality constraint if there is one. This will always
return one or zero for the time being, zero indicating 'none'.
It never returns null.
- Specified by:
getCount
in interface IGlobalExistsStatement
- Returns:
- the cardinality constraint, as a number
getElement
public IModelElement getElement()
- Description copied from interface:
IGlobalExistsStatement
- Return the model element being checked for existence. Never returns
null.
- Specified by:
getElement
in interface IGlobalExistsStatement
- Returns:
- the model element
getVariable
public IVariable getVariable()
- Description copied from interface:
IGlobalExistsStatement
- If the statement is used to check for the existence (rather than absence)
of an element, the element can be assigned to a variable if found. If
a variable is assigned, it is returned here.
- Specified by:
getVariable
in interface IGlobalExistsStatement
- Returns:
- the variable or null if none was assigned
getVariableName
public String getVariableName()
hasConstraint
public boolean hasConstraint()
- Description copied from interface:
IGlobalExistsStatement
- Return true if there is a constraint attached that is to be executed
relative to the model element.
- Specified by:
hasConstraint
in interface IGlobalExistsStatement
- Returns:
- true if a constraint is attached
getModelReference
public IModelReference getModelReference()
getElementName
public String getElementName()
setModelElement
public void setModelElement(IModelElement element)
setVariable
public void setVariable(IVariable variable)
Copyright © 2006-2013. All Rights Reserved.