de.interactive_instruments.ShapeChange.Ocl
Class OclNode.Declaration

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Ocl.OclNode
      extended by de.interactive_instruments.ShapeChange.Ocl.OclNode.Declaration
Enclosing class:
OclNode

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.


Nested Class Summary
 
Nested classes/interfaces inherited from class de.interactive_instruments.ShapeChange.Ocl.OclNode
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
 
Field Summary
 OclNode initialValue
           
 boolean isImplicit
           
 String name
           
 OclNode.Declaration nextOuter
           
 OclNode ownerNode
           
 
Fields inherited from class de.interactive_instruments.ShapeChange.Ocl.OclNode
dataType
 
Constructor Summary
OclNode.Declaration(String name, OclNode.DataType dt, OclNode ival, OclNode.Declaration declCtx, OclNode owner, boolean impl)
          Initialize a Declaration from all its constituents.
 
Method Summary
 void debugPrintContent(PrintWriter stream)
          This is for generating debug output out of OclNodes.
 
Methods inherited from class de.interactive_instruments.ShapeChange.Ocl.OclNode
debugPrint, getDataType, isBuiltInType, isMultiple, iso19103AssumedBuiltInType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name

initialValue

public OclNode initialValue

nextOuter

public OclNode.Declaration nextOuter

ownerNode

public OclNode ownerNode

isImplicit

public boolean isImplicit
Constructor Detail

OclNode.Declaration

public OclNode.Declaration(String name,
                           OclNode.DataType dt,
                           OclNode ival,
                           OclNode.Declaration declCtx,
                           OclNode owner,
                           boolean impl)
Initialize a Declaration from all its constituents.

Parameters:
name - The name, may be null
dt - The DateType of the declaration
ival - Initial value or null
declCtx - Context of next outer declaration
owner - The OclNode owning this Declaration (such as a LetExp)
impl - Is this implicitly generated?
Method Detail

debugPrintContent

public void debugPrintContent(PrintWriter stream)

This is for generating debug output out of OclNodes.

Overrides:
debugPrintContent in class OclNode
Parameters:
streamPrint - Writer onto which the debug output is to be directed.


Copyright © 2015. All rights reserved.