Dresden OCL Toolkit

tudresden.ocl.codegen
Class ProceduralCodeFragment

java.lang.Object
  extended bytudresden.ocl.codegen.ProceduralCodeFragment
All Implemented Interfaces:
CodeFragment

public class ProceduralCodeFragment
extends Object
implements CodeFragment


Field Summary
protected  String code
           
protected  String constrainedOperation
           
protected  String constrainedType
           
protected  int constraintKind
          one of CodeFragment.PRE, CodeFragment.POST, CodeFragement.INV, CodeFragment.PREPARATION, CodeFragment.TRANSFER
protected  String constraintName
           
protected  String resultVariable
           
 
Fields inherited from interface tudresden.ocl.codegen.CodeFragment
INV, POST, PRE, PREPARATION, TRANSFER
 
Constructor Summary
ProceduralCodeFragment(String constraintName, String constrainedType, String constrainedOperation, int constraintKind, String resultVariable)
           
 
Method Summary
 String getCode()
           
 String getConstrainedOperation()
           
 String getConstrainedType()
           
 int getKind()
           
 String getName()
           
 String getOperation()
           
 String getResultVariable()
           
 String getType()
           
 void setCode(String code)
           
 void setResultVariable(String var)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constraintName

protected String constraintName

constrainedType

protected String constrainedType

constrainedOperation

protected String constrainedOperation

constraintKind

protected int constraintKind
one of CodeFragment.PRE, CodeFragment.POST, CodeFragement.INV, CodeFragment.PREPARATION, CodeFragment.TRANSFER


code

protected String code

resultVariable

protected String resultVariable
Constructor Detail

ProceduralCodeFragment

public ProceduralCodeFragment(String constraintName,
                              String constrainedType,
                              String constrainedOperation,
                              int constraintKind,
                              String resultVariable)
Parameters:
constrainedOperation - is null for invariants
constraintKind - one of CodeFragment.PRE, CodeFragment.POST, CodeFragement.INV, CodeFragment.PREPARATION, CodeFragment.TRANSFER
Method Detail

getConstrainedType

public String getConstrainedType()
Specified by:
getConstrainedType in interface CodeFragment

getConstrainedOperation

public String getConstrainedOperation()
Specified by:
getConstrainedOperation in interface CodeFragment
Returns:
null for invariants

getCode

public String getCode()
Specified by:
getCode in interface CodeFragment

setCode

public void setCode(String code)

getName

public String getName()
Specified by:
getName in interface CodeFragment

getType

public String getType()

getOperation

public String getOperation()

getKind

public int getKind()
Specified by:
getKind in interface CodeFragment

getResultVariable

public String getResultVariable()
Specified by:
getResultVariable in interface CodeFragment
Returns:
the variable that holds the evaluation result

setResultVariable

public void setResultVariable(String var)

Dresden OCL Toolkit

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