Dresden OCL Toolkit

tudresden.ocl.codegen
Class JavaCodeGenerator

java.lang.Object
  extended bytudresden.ocl.parser.analysis.AnalysisAdapter
      extended bytudresden.ocl.parser.analysis.DepthFirstAdapter
          extended bytudresden.ocl.codegen.ProceduralCodeGenerator
              extended bytudresden.ocl.codegen.JavaCodeGenerator
All Implemented Interfaces:
Analysis, CodeGenerator, Switch

public class JavaCodeGenerator
extends ProceduralCodeGenerator


Field Summary
(package private)  String instanceName
           
(package private)  String javaResult
           
(package private) static HashSet oclAnyOperations
          set of all OclAny property names
private  String oclLibPackage
          The package prefix for all classes of the ocl library in the generated code.
(package private)  NodeNameMap operatorCode
          maps Nodes for operators (ALogicalOperator, ARelationalOperator...) to the String containing their Java representation
(package private)  StringStringMap varMap
           
 
Fields inherited from class tudresden.ocl.codegen.ProceduralCodeGenerator
code, constrainedOperation, constrainedType, constraintKind, fragments, fragmentStack, indent, initialIndent, newLine, parameters, preCode, preCodeIsValid, preVariables, preVarTypes, topOfStack, tree, writeToPreCode, writeToStandardCode
 
Fields inherited from class tudresden.ocl.parser.analysis.AnalysisAdapter
 
Constructor Summary
JavaCodeGenerator()
           
JavaCodeGenerator(String instanceName)
           
JavaCodeGenerator(String instanceName, String resultName)
           
JavaCodeGenerator(String instanceName, String resultName, String oclLibPackage)
           
 
Method Summary
protected  void addExpressionToCollection(PExpression e, String collVar)
           
protected  void appendActualParameterList(AActualParameterList apl)
          append the Java code for an AActualParameterList, excluding the parentheses
protected  void appendAndOrLogExpr(PRelationalExpression[] relExprs, PLogicalOperator[] logOps, int from, int to)
          Append code for the part of a logical expression between the indexes of relational subexpression given as parameters from and to, both relational expressions included.
protected  void appendPostfixArrowOp(APostfixExpressionTail pet, Node appliedTo, Type appliedType)
          The APostfixExpressionTail begins with '->' and is therefore a collection operation applied either to a collection or to a single, possible undefined element (as in context Person inv: ...
protected  void appendPostfixBasic(APostfixExpressionTail pet, Node appliedTo, Type appliedType)
           
protected  void appendPostfixDotOp(APostfixExpressionTail pet, Node appliedTo, Type appliedType)
          The APostfixExpressionTail has a '.' begin and is not applied to basic type.
 void caseAPostfixExpressionTail(APostfixExpressionTail pet)
          Iterating methods parameters must be inserted into an inner class, therefore it is not possible to translate APostfixExpressionTail postfix.
protected  String convertToCollection(Node appliedTo)
           
private  String createDecl(String type, String variable)
          This method generates the declaration prefix of a node.
protected  String[] getEvaluatableTypes(String featureName)
           
protected  String getJavaType(Type t)
           
protected  Node getPreviousNode(APostfixExpressionTail pet)
           
protected  String getTransferCode(String var, String type)
           
 void inAAndLogicalOperator(AAndLogicalOperator lo)
           
 void inAConstraintBody(AConstraintBody cb)
          the variable for the AConstraintBody node is the variable for "self"
 void inADivMultiplyOperator(ADivMultiplyOperator dmo)
           
 void inAEqualRelationalOperator(AEqualRelationalOperator ero)
           
 void inAGteqRelationalOperator(AGteqRelationalOperator ro)
           
 void inAGtRelationalOperator(AGtRelationalOperator ro)
           
 void inAImpliesLogicalOperator(AImpliesLogicalOperator lo)
           
 void inALitColPrimaryExpression(ALitColPrimaryExpression lcpe)
          This method breaks the usual pattern of generating Java code postfix since the collection must be declared and instanciated prior to setting its contents (in outAExpressionListOrRange).
 void inALteqRelationalOperator(ALteqRelationalOperator ro)
           
 void inALtRelationalOperator(ALtRelationalOperator ro)
           
 void inAMinusAddOperator(AMinusAddOperator mao)
           
 void inAMinusUnaryOperator(AMinusUnaryOperator muo)
           
 void inAMultMultiplyOperator(AMultMultiplyOperator mmo)
           
 void inANEqualRelationalOperator(ANEqualRelationalOperator nero)
           
 void inANotUnaryOperator(ANotUnaryOperator nuo)
           
 void inAOrLogicalOperator(AOrLogicalOperator lo)
           
 void inAPlusAddOperator(APlusAddOperator pao)
           
 void inAXorLogicalOperator(AXorLogicalOperator lo)
           
 void outAAdditiveExpression(AAdditiveExpression ae)
          a + b
Ocl? result=Ocl.toOcl?(a).add(Ocl.toOcl?(b));
with Ocl? = OclReal | OclInteger | OclSet
 void outABooleanLiteral(ABooleanLiteral bl)
           
 void outAEnumLiteral(AEnumLiteral el)
           
 void outAExpression(AExpression e)
           
 void outAExpressionListOrRange(AExpressionListOrRange elor)
           
 void outAFeaturePrimaryExpression(AFeaturePrimaryExpression pe)
           
 void outAIfExpression(AIfExpression ie)
          if a then b else c endif
Ocl? result=(a.isTrue()) ? (b) : (c);
 void outAIfPrimaryExpression(AIfPrimaryExpression ipe)
           
 void outAIntegerLiteral(AIntegerLiteral il)
           
 void outALetExpression(ALetExpression le)
           
 void outALiteralPrimaryExpression(ALiteralPrimaryExpression lpe)
           
 void outALogicalExpression(ALogicalExpression le)
          and, or and xor have precedence over implies (and binds as strongly as or)
 void outAMultiplicativeExpression(AMultiplicativeExpression me)
          a * b
Ocl? result=Ocl.toOcl?(a).multiply(Ocl.toOcl?(b));
with Ocl? = OclReal | OclInteger
 void outAParenthesesPrimaryExpression(AParenthesesPrimaryExpression lpe)
           
 void outAPostfixExpression(APostfixExpression pe)
           
 void outAPostfixUnaryExpression(APostfixUnaryExpression pue)
           
 void outARealLiteral(ARealLiteral rl)
           
 void outARelationalExpression(ARelationalExpression re)
          a<b = c>d is not allowed by the OCL grammar, therefore we need not care about precedence
 void outAStringLiteral(AStringLiteral sl)
           
 void outAUnaryUnaryExpression(AUnaryUnaryExpression uue)
          not a
OclBoolean result=a.not();
private  String qualifyType(String type)
           
protected  void requireTreeInvariants()
          gives subclasses the opportunity to check if the OclTree requires some invariants, using OclTree's requireInvariant() method
 
Methods inherited from class tudresden.ocl.codegen.ProceduralCodeGenerator
addPreVariable, appendCode, assurePreCode, beginNewFragment, caseAConstraintBody, decreaseIndent, endFragment, getCode, getVariable, inAClassifierContext, inAInvStereotype, inAOperationContext, inAPostStereotype, inAPreStereotype, increaseIndent, reachThrough, setInitialIndent, setVariable, writeToBothCodes, writeToPreCodeOnly, writeToStandardCodeOnly
 
Methods inherited from class tudresden.ocl.parser.analysis.DepthFirstAdapter
caseAActualParameterList, caseAActualParameterListTail, caseAAdditiveExpression, caseAAdditiveExpressionTail, caseAAndLogicalOperator, caseAArrowPostfixExpressionTailBegin, caseABagCollectionKind, caseABagCollectionType, caseABarFcpHelper, caseABooleanLiteral, caseAClassifierContext, caseAClassifierContextBody, caseAClassifierHead, caseACollectionCollectionKind, caseACollectionCollectionType, caseACollectionTypeName, caseAColonFcpHelper, caseACommaFcpHelper, caseAConcreteFeatureCallParameters, caseAConstraint, caseAContextDeclaration, caseADeclaratorTail, caseADeclaratorTypeDeclaration, caseADivMultiplyOperator, caseADotPostfixExpressionTailBegin, caseAEmptyFeatureCallParameters, caseAEnumerationType, caseAEnumerationTypeTail, caseAEnumLiteral, caseAEnumSimpleTypeSpecifier, caseAEqualRelationalOperator, caseAExpression, caseAExpressionListOrRange, caseAExpressionListTail, caseAFeatureCall, caseAFeatureCallParameters, caseAFeaturePrimaryExpression, caseAFormalParameter, caseAFormalParameterList, caseAFormalParameterListTail, caseAGteqRelationalOperator, caseAGtRelationalOperator, caseAIfExpression, caseAIfPrimaryExpression, caseAImpliesLogicalOperator, caseAIntegerLiteral, caseAInvStereotype, caseAIterateDeclarator, caseAIterateFcpHelper, caseALetExpression, caseALetExpressionTypeDeclaration, caseAListExpressionListOrRangeTail, caseALitColPrimaryExpression, caseALiteralCollection, caseALiteralPrimaryExpression, caseALogicalExpression, caseALogicalExpressionTail, caseALteqRelationalOperator, caseALtRelationalOperator, caseAMinusAddOperator, caseAMinusUnaryOperator, caseAMultiplicativeExpression, caseAMultiplicativeExpressionTail, caseAMultMultiplyOperator, caseANamePathNameBegin, caseANamePathNameEnd, caseANEqualRelationalOperator, caseANonCollectionTypeName, caseANotUnaryOperator, caseAOperationContext, caseAOperationContextBody, caseAOrLogicalOperator, caseAParenthesesPrimaryExpression, caseAPathName, caseAPathNameTail, caseAPathSimpleTypeSpecifier, caseAPathTypeName, caseAPathTypeNameTail, caseAPlusAddOperator, caseAPostfixExpression, caseAPostfixUnaryExpression, caseAPostStereotype, caseAPreStereotype, caseAQualifiers, caseARangeExpressionListOrRangeTail, caseARealLiteral, caseARelationalExpression, caseARelationalExpressionTail, caseAReturnTypeDeclaration, caseASequenceCollectionKind, caseASequenceCollectionType, caseASetCollectionKind, caseASetCollectionType, caseAStandardDeclarator, caseAStringLiteral, caseATimeExpression, caseATypeNamePathNameBegin, caseATypeNamePathNameEnd, caseAUnaryUnaryExpression, caseAXorLogicalOperator, caseStart, defaultIn, defaultOut, inAActualParameterList, inAActualParameterListTail, inAAdditiveExpression, inAAdditiveExpressionTail, inAArrowPostfixExpressionTailBegin, inABagCollectionKind, inABagCollectionType, inABarFcpHelper, inABooleanLiteral, inAClassifierContextBody, inAClassifierHead, inACollectionCollectionKind, inACollectionCollectionType, inACollectionTypeName, inAColonFcpHelper, inACommaFcpHelper, inAConcreteFeatureCallParameters, inAConstraint, inAContextDeclaration, inADeclaratorTail, inADeclaratorTypeDeclaration, inADotPostfixExpressionTailBegin, inAEmptyFeatureCallParameters, inAEnumerationType, inAEnumerationTypeTail, inAEnumLiteral, inAEnumSimpleTypeSpecifier, inAExpression, inAExpressionListOrRange, inAExpressionListTail, inAFeatureCall, inAFeatureCallParameters, inAFeaturePrimaryExpression, inAFormalParameter, inAFormalParameterList, inAFormalParameterListTail, inAIfExpression, inAIfPrimaryExpression, inAIntegerLiteral, inAIterateDeclarator, inAIterateFcpHelper, inALetExpression, inALetExpressionTypeDeclaration, inAListExpressionListOrRangeTail, inALiteralCollection, inALiteralPrimaryExpression, inALogicalExpression, inALogicalExpressionTail, inAMultiplicativeExpression, inAMultiplicativeExpressionTail, inANamePathNameBegin, inANamePathNameEnd, inANonCollectionTypeName, inAOperationContextBody, inAParenthesesPrimaryExpression, inAPathName, inAPathNameTail, inAPathSimpleTypeSpecifier, inAPathTypeName, inAPathTypeNameTail, inAPostfixExpression, inAPostfixExpressionTail, inAPostfixUnaryExpression, inAQualifiers, inARangeExpressionListOrRangeTail, inARealLiteral, inARelationalExpression, inARelationalExpressionTail, inAReturnTypeDeclaration, inASequenceCollectionKind, inASequenceCollectionType, inASetCollectionKind, inASetCollectionType, inAStandardDeclarator, inAStringLiteral, inATimeExpression, inATypeNamePathNameBegin, inATypeNamePathNameEnd, inAUnaryUnaryExpression, inStart, outAActualParameterList, outAActualParameterListTail, outAAdditiveExpressionTail, outAAndLogicalOperator, outAArrowPostfixExpressionTailBegin, outABagCollectionKind, outABagCollectionType, outABarFcpHelper, outAClassifierContext, outAClassifierContextBody, outAClassifierHead, outACollectionCollectionKind, outACollectionCollectionType, outACollectionTypeName, outAColonFcpHelper, outACommaFcpHelper, outAConcreteFeatureCallParameters, outAConstraint, outAConstraintBody, outAContextDeclaration, outADeclaratorTail, outADeclaratorTypeDeclaration, outADivMultiplyOperator, outADotPostfixExpressionTailBegin, outAEmptyFeatureCallParameters, outAEnumerationType, outAEnumerationTypeTail, outAEnumSimpleTypeSpecifier, outAEqualRelationalOperator, outAExpressionListTail, outAFeatureCall, outAFeatureCallParameters, outAFormalParameter, outAFormalParameterList, outAFormalParameterListTail, outAGteqRelationalOperator, outAGtRelationalOperator, outAImpliesLogicalOperator, outAInvStereotype, outAIterateDeclarator, outAIterateFcpHelper, outALetExpressionTypeDeclaration, outAListExpressionListOrRangeTail, outALitColPrimaryExpression, outALiteralCollection, outALogicalExpressionTail, outALteqRelationalOperator, outALtRelationalOperator, outAMinusAddOperator, outAMinusUnaryOperator, outAMultiplicativeExpressionTail, outAMultMultiplyOperator, outANamePathNameBegin, outANamePathNameEnd, outANEqualRelationalOperator, outANonCollectionTypeName, outANotUnaryOperator, outAOperationContext, outAOperationContextBody, outAOrLogicalOperator, outAPathName, outAPathNameTail, outAPathSimpleTypeSpecifier, outAPathTypeName, outAPathTypeNameTail, outAPlusAddOperator, outAPostfixExpressionTail, outAPostStereotype, outAPreStereotype, outAQualifiers, outARangeExpressionListOrRangeTail, outARelationalExpressionTail, outAReturnTypeDeclaration, outASequenceCollectionKind, outASequenceCollectionType, outASetCollectionKind, outASetCollectionType, outAStandardDeclarator, outATimeExpression, outATypeNamePathNameBegin, outATypeNamePathNameEnd, outAXorLogicalOperator, outStart
 
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

instanceName

String instanceName

javaResult

String javaResult

oclLibPackage

private String oclLibPackage
The package prefix for all classes of the ocl library in the generated code. Contains the trailing dot, if not empty. May be empty, if an appropriate import statement is generated. Must not be null.


operatorCode

NodeNameMap operatorCode
maps Nodes for operators (ALogicalOperator, ARelationalOperator...) to the String containing their Java representation


varMap

StringStringMap varMap

oclAnyOperations

static HashSet oclAnyOperations
set of all OclAny property names

Constructor Detail

JavaCodeGenerator

public JavaCodeGenerator(String instanceName,
                         String resultName)
Parameters:
instanceName - a Java expression that will be evaluated to the instance that is checked for constraint conformance
resultName - a Java expression that will be evaluated to the result of constrained operation (can be null for other constraints than post conditions

JavaCodeGenerator

public JavaCodeGenerator(String instanceName,
                         String resultName,
                         String oclLibPackage)

JavaCodeGenerator

public JavaCodeGenerator(String instanceName)
Parameters:
instanceName - a Java expression that will be evaluated to the instance that is checked for constraint conformance

JavaCodeGenerator

public JavaCodeGenerator()
Method Detail

getTransferCode

protected String getTransferCode(String var,
                                 String type)
Specified by:
getTransferCode in class ProceduralCodeGenerator

requireTreeInvariants

protected void requireTreeInvariants()
Description copied from class: ProceduralCodeGenerator
gives subclasses the opportunity to check if the OclTree requires some invariants, using OclTree's requireInvariant() method

Specified by:
requireTreeInvariants in class ProceduralCodeGenerator

createDecl

private String createDecl(String type,
                          String variable)
This method generates the declaration prefix of a node. Is looks like this:
        final tudresden.ocl.lib.<type> <variable> =
     
The type is ommited, if the variable is one of the transfer variables.


qualifyType

private String qualifyType(String type)

inAConstraintBody

public void inAConstraintBody(AConstraintBody cb)
the variable for the AConstraintBody node is the variable for "self"

Overrides:
inAConstraintBody in class DepthFirstAdapter

outAExpression

public void outAExpression(AExpression e)
Overrides:
outAExpression in class DepthFirstAdapter

outAIfExpression

public void outAIfExpression(AIfExpression ie)
if a then b else c endif
Ocl? result=(a.isTrue()) ? (b) : (c);

For each if expression a new variable is generated.

Overrides:
outAIfExpression in class DepthFirstAdapter

outALogicalExpression

public void outALogicalExpression(ALogicalExpression le)
and, or and xor have precedence over implies (and binds as strongly as or)

a and b or c
OclBoolean result = a.and(b).or(c);

A variable is generated for each ALogicalExpression with tail (not for a ALogicalExpressionTail).

Overrides:
outALogicalExpression in class DepthFirstAdapter

appendAndOrLogExpr

protected void appendAndOrLogExpr(PRelationalExpression[] relExprs,
                                  PLogicalOperator[] logOps,
                                  int from,
                                  int to)
Append code for the part of a logical expression between the indexes of relational subexpression given as parameters from and to, both relational expressions included. The part must not contain an implies operator. from may be equal to to.


outARelationalExpression

public void outARelationalExpression(ARelationalExpression re)
a<b = c>d is not allowed by the OCL grammar, therefore we need not care about precedence

a = b
OclBoolean result=a.isEqualTo(b);
a > b
OclBoolean result=Ocl.toOclComparable(a).isGreaterThan(Ocl.toOclComparable(b));

A variable is generated for each ARelationalExpression if it has a ARelationalExpressionTail subnode.

Overrides:
outARelationalExpression in class DepthFirstAdapter

outAAdditiveExpression

public void outAAdditiveExpression(AAdditiveExpression ae)
a + b
Ocl? result=Ocl.toOcl?(a).add(Ocl.toOcl?(b));
with Ocl? = OclReal | OclInteger | OclSet

A variable is generated for each AAdditiveExpression with tail.

Overrides:
outAAdditiveExpression in class DepthFirstAdapter

outAMultiplicativeExpression

public void outAMultiplicativeExpression(AMultiplicativeExpression me)
a * b
Ocl? result=Ocl.toOcl?(a).multiply(Ocl.toOcl?(b));
with Ocl? = OclReal | OclInteger

A variable is generated for each AMultiplicativeExpression with tail.

Overrides:
outAMultiplicativeExpression in class DepthFirstAdapter

outAUnaryUnaryExpression

public void outAUnaryUnaryExpression(AUnaryUnaryExpression uue)
not a
OclBoolean result=a.not();

A variable is generated for each AUnaryUnaryExpression.

Overrides:
outAUnaryUnaryExpression in class DepthFirstAdapter

outAPostfixUnaryExpression

public void outAPostfixUnaryExpression(APostfixUnaryExpression pue)
Overrides:
outAPostfixUnaryExpression in class DepthFirstAdapter

outAPostfixExpression

public void outAPostfixExpression(APostfixExpression pe)
Overrides:
outAPostfixExpression in class DepthFirstAdapter

outAFeaturePrimaryExpression

public void outAFeaturePrimaryExpression(AFeaturePrimaryExpression pe)
Overrides:
outAFeaturePrimaryExpression in class DepthFirstAdapter

inALitColPrimaryExpression

public void inALitColPrimaryExpression(ALitColPrimaryExpression lcpe)
This method breaks the usual pattern of generating Java code postfix since the collection must be declared and instanciated prior to setting its contents (in outAExpressionListOrRange).

Overrides:
inALitColPrimaryExpression in class DepthFirstAdapter

outALiteralPrimaryExpression

public void outALiteralPrimaryExpression(ALiteralPrimaryExpression lpe)
Overrides:
outALiteralPrimaryExpression in class DepthFirstAdapter

outAParenthesesPrimaryExpression

public void outAParenthesesPrimaryExpression(AParenthesesPrimaryExpression lpe)
Overrides:
outAParenthesesPrimaryExpression in class DepthFirstAdapter

outAIfPrimaryExpression

public void outAIfPrimaryExpression(AIfPrimaryExpression ipe)
Overrides:
outAIfPrimaryExpression in class DepthFirstAdapter

outAExpressionListOrRange

public void outAExpressionListOrRange(AExpressionListOrRange elor)
Overrides:
outAExpressionListOrRange in class DepthFirstAdapter

caseAPostfixExpressionTail

public void caseAPostfixExpressionTail(APostfixExpressionTail pet)
Iterating methods parameters must be inserted into an inner class, therefore it is not possible to translate APostfixExpressionTail postfix. Hence, the case method is overwritten.

Specified by:
caseAPostfixExpressionTail in interface Analysis
Overrides:
caseAPostfixExpressionTail in class DepthFirstAdapter

appendPostfixBasic

protected void appendPostfixBasic(APostfixExpressionTail pet,
                                  Node appliedTo,
                                  Type appliedType)

appendPostfixArrowOp

protected void appendPostfixArrowOp(APostfixExpressionTail pet,
                                    Node appliedTo,
                                    Type appliedType)
The APostfixExpressionTail begins with '->' and is therefore a collection operation applied either to a collection or to a single, possible undefined element (as in context Person inv: ... husband->isEmpty ...).


convertToCollection

protected String convertToCollection(Node appliedTo)

getEvaluatableTypes

protected String[] getEvaluatableTypes(String featureName)
Parameters:
featureName - one of the iterating method names, excluding iterate
Returns:
an String array containing the types connected to the iterating method with the given name; the returned array has length 3, with the name of the evaluatable interface at index 0, the name of the evaluate() methods return type at index 1, and the return type of the iterating method at index 2.

appendPostfixDotOp

protected void appendPostfixDotOp(APostfixExpressionTail pet,
                                  Node appliedTo,
                                  Type appliedType)
The APostfixExpressionTail has a '.' begin and is not applied to basic type. Hence it must be a simple feature call on an application object or the shorthand for collect.


appendActualParameterList

protected void appendActualParameterList(AActualParameterList apl)
append the Java code for an AActualParameterList, excluding the parentheses

Parameters:
apl - may be null, then nothing is done

outALetExpression

public void outALetExpression(ALetExpression le)
Overrides:
outALetExpression in class DepthFirstAdapter

outAStringLiteral

public void outAStringLiteral(AStringLiteral sl)
Overrides:
outAStringLiteral in class DepthFirstAdapter

outARealLiteral

public void outARealLiteral(ARealLiteral rl)
Overrides:
outARealLiteral in class DepthFirstAdapter

outAIntegerLiteral

public void outAIntegerLiteral(AIntegerLiteral il)
Overrides:
outAIntegerLiteral in class DepthFirstAdapter

outABooleanLiteral

public void outABooleanLiteral(ABooleanLiteral bl)
Overrides:
outABooleanLiteral in class DepthFirstAdapter

outAEnumLiteral

public void outAEnumLiteral(AEnumLiteral el)
Overrides:
outAEnumLiteral in class DepthFirstAdapter

getPreviousNode

protected Node getPreviousNode(APostfixExpressionTail pet)
Returns:
the node that the APostfixExpressionTail is applied to, which must be either an PPrimaryExpression or another APostfixExpressionTail node

addExpressionToCollection

protected void addExpressionToCollection(PExpression e,
                                         String collVar)

getJavaType

protected String getJavaType(Type t)

inAAndLogicalOperator

public void inAAndLogicalOperator(AAndLogicalOperator lo)
Overrides:
inAAndLogicalOperator in class DepthFirstAdapter

inAOrLogicalOperator

public void inAOrLogicalOperator(AOrLogicalOperator lo)
Overrides:
inAOrLogicalOperator in class DepthFirstAdapter

inAXorLogicalOperator

public void inAXorLogicalOperator(AXorLogicalOperator lo)
Overrides:
inAXorLogicalOperator in class DepthFirstAdapter

inAImpliesLogicalOperator

public void inAImpliesLogicalOperator(AImpliesLogicalOperator lo)
Overrides:
inAImpliesLogicalOperator in class DepthFirstAdapter

inAEqualRelationalOperator

public void inAEqualRelationalOperator(AEqualRelationalOperator ero)
Overrides:
inAEqualRelationalOperator in class DepthFirstAdapter

inANEqualRelationalOperator

public void inANEqualRelationalOperator(ANEqualRelationalOperator nero)
Overrides:
inANEqualRelationalOperator in class DepthFirstAdapter

inAGtRelationalOperator

public void inAGtRelationalOperator(AGtRelationalOperator ro)
Overrides:
inAGtRelationalOperator in class DepthFirstAdapter

inALtRelationalOperator

public void inALtRelationalOperator(ALtRelationalOperator ro)
Overrides:
inALtRelationalOperator in class DepthFirstAdapter

inAGteqRelationalOperator

public void inAGteqRelationalOperator(AGteqRelationalOperator ro)
Overrides:
inAGteqRelationalOperator in class DepthFirstAdapter

inALteqRelationalOperator

public void inALteqRelationalOperator(ALteqRelationalOperator ro)
Overrides:
inALteqRelationalOperator in class DepthFirstAdapter

inAPlusAddOperator

public void inAPlusAddOperator(APlusAddOperator pao)
Overrides:
inAPlusAddOperator in class DepthFirstAdapter

inAMinusAddOperator

public void inAMinusAddOperator(AMinusAddOperator mao)
Overrides:
inAMinusAddOperator in class DepthFirstAdapter

inAMultMultiplyOperator

public void inAMultMultiplyOperator(AMultMultiplyOperator mmo)
Overrides:
inAMultMultiplyOperator in class DepthFirstAdapter

inADivMultiplyOperator

public void inADivMultiplyOperator(ADivMultiplyOperator dmo)
Overrides:
inADivMultiplyOperator in class DepthFirstAdapter

inAMinusUnaryOperator

public void inAMinusUnaryOperator(AMinusUnaryOperator muo)
Overrides:
inAMinusUnaryOperator in class DepthFirstAdapter

inANotUnaryOperator

public void inANotUnaryOperator(ANotUnaryOperator nuo)
Overrides:
inANotUnaryOperator in class DepthFirstAdapter

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.