public static class OclNode.Declaration extends OclNode
Objects of this class represent the declaration of variables in some context, such as a let-expression or an iterator reference. Declaration objects are also created implicitly, for example to represent the non-explicitly declared binding variable of an iterator.
There will always be an implicitly created Declaration object for the self variable, which is attached to the outmost expression scope. Declaration objects have a reference to their surrounding Declaration. By walking this queue all variables explicitly or implicitly in effect for a place in the syntax tree, can always be determined.
OclNode.AttributeCallExp, OclNode.BooleanLiteralExp, OclNode.BuiltInDescr, OclNode.BuiltInType, OclNode.ClassLiteralExp, OclNode.DataType, OclNode.DateTimeLiteralExp, OclNode.Declaration, OclNode.EnumerationLiteralExp, OclNode.Expression, OclNode.IfExp, OclNode.IntegerLiteralExp, OclNode.IterationCallExp, OclNode.LetExp, OclNode.LiteralExp, OclNode.MultiplicityMapping, OclNode.OclVoidLiteralExp, OclNode.OperationCallExp, OclNode.PackageLiteralExp, OclNode.PropertyCallExp, OclNode.PropertyCategory, OclNode.PropertySelector, OclNode.RealLiteralExp, OclNode.StringLiteralExp, OclNode.VariableExp
Modifier and Type | Field and Description |
---|---|
OclNode |
initialValue |
boolean |
isImplicit |
String |
name |
OclNode.Declaration |
nextOuter |
OclNode |
ownerNode |
Constructor and Description |
---|
Declaration(String name,
OclNode.DataType dt,
OclNode ival,
OclNode.Declaration declCtx,
OclNode owner,
boolean impl)
Initialize a Declaration from all its constituents.
|
Modifier and Type | Method and Description |
---|---|
void |
debugPrintContent(PrintWriter stream)
This is for generating debug output out of OclNodes.
|
debugPrint, getDataType, isBuiltInType, isMultiple, iso19103AssumedBuiltInType
public String name
public OclNode initialValue
public OclNode.Declaration nextOuter
public OclNode ownerNode
public boolean isImplicit
public Declaration(String name, OclNode.DataType dt, OclNode ival, OclNode.Declaration declCtx, OclNode owner, boolean impl)
name
- The name, may be nulldt
- The DateType of the declarationival
- Initial value or nulldeclCtx
- Context of next outer declarationowner
- The OclNode owning this Declaration (such as a LetExp)impl
- Is this implicitly generated?public void debugPrintContent(PrintWriter stream)
This is for generating debug output out of OclNodes.
debugPrintContent
in class OclNode
streamPrint
- Writer onto which the debug output is to be directed.Copyright © 2017. All rights reserved.