|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttudresden.ocl.parser.analysis.AnalysisAdapter
tudresden.ocl.parser.analysis.DepthFirstAdapter
tudresden.ocl.check.NameBinder
This class supplies name binding information as defined by the interface NameBoundQueryable. It is not used in the standard compiler configuration.
Field Summary | |
protected Start |
ast
the AST that's name binding is of interest, represented by it's root node |
protected HashMap |
defaultContexts
|
protected HashMap |
nodes
maps AST nodes to HashSets containing NameSpaceEntries; if a node doesn't change it's parent's environment there is NO entry in this map for the node |
Fields inherited from class tudresden.ocl.parser.analysis.AnalysisAdapter |
|
Constructor Summary | |
NameBinder(Start s)
create a new NameBinder for the AST given through it's root node; the tree will be examined instantly |
Method Summary | |
void |
changeNotify(Node subtree)
An operation that does ... |
HashSet |
getBoundNames(Node n)
|
protected HashSet |
getCopy(Node n)
|
String |
getDefaultContext(Node n)
|
protected HashSet |
getEnvironment(Node n)
may return null |
void |
inAConstraint(AConstraint c)
|
void |
inAExpression(AExpression e)
|
void |
inAFeatureCall(AFeatureCall fc)
This method is implemented to update the default context for the FeatureCall's FeatureCallParameter node if the feature call is a call to an iterating method. |
void |
inAFeatureCallParameters(AFeatureCallParameters fcp)
This method adds iterator variables to the node's set of bound names. |
void |
inStart(Start s)
|
boolean |
isNameBound(String name,
Node node)
|
protected void |
update(Node n)
|
Methods inherited from class tudresden.ocl.parser.analysis.AnalysisAdapter |
caseEOF, caseTAnd, caseTApostroph, caseTArrow, caseTAt, caseTBar, caseTBlank, caseTBool, caseTChannel, caseTColon, caseTComma, caseTComment, caseTContext, caseTDcolon, caseTDdot, caseTDiv, caseTDot, caseTEndif, caseTEnum, caseTEqual, caseTGt, caseTGteq, caseTImplies, caseTInt, caseTLBrace, caseTLBracket, caseTLPar, caseTLt, caseTLteq, caseTMinus, caseTMult, caseTName, caseTNEqual, caseTNewLine, caseTNot, caseTOr, caseTPlus, caseTRBrace, caseTRBracket, caseTReal, caseTRPar, caseTSemicolon, caseTSimpleTypeName, caseTStringLit, caseTTab, caseTTBag, caseTTCollection, caseTTElse, caseTTIf, caseTTIn, caseTTInv, caseTTLet, caseTTPost, caseTTPre, caseTTSequence, caseTTSet, caseTTThen, caseTXor, defaultCase, getIn, getOut, setIn, setOut |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Start ast
protected HashMap nodes
protected HashMap defaultContexts
Constructor Detail |
public NameBinder(Start s)
Method Detail |
protected void update(Node n)
public void inStart(Start s)
inStart
in class DepthFirstAdapter
public void inAConstraint(AConstraint c)
inAConstraint
in class DepthFirstAdapter
public void inAFeatureCall(AFeatureCall fc)
inAFeatureCall
in class DepthFirstAdapter
public void inAFeatureCallParameters(AFeatureCallParameters fcp)
inAFeatureCallParameters
in class DepthFirstAdapter
public void inAExpression(AExpression e)
inAExpression
in class DepthFirstAdapter
protected HashSet getCopy(Node n)
protected HashSet getEnvironment(Node n)
public boolean isNameBound(String name, Node node)
isNameBound
in interface NameBoundQueryable
public HashSet getBoundNames(Node n)
getBoundNames
in interface NameBoundQueryable
public String getDefaultContext(Node n)
getDefaultContext
in interface NameBoundQueryable
public void changeNotify(Node subtree)
changeNotify
in interface NameBoundQueryable
|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |