Dresden OCL Toolkit

tudresden.ocl.codegen.decl
Class DeclarativeCodeFragment

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

public class DeclarativeCodeFragment
extends Object
implements CodeFragment

Objects of this class represent declarative code fragments.

Author:
Sten Loecher

Field Summary
protected  String[] additionalInfo
           
protected  String code
           
protected  String constraintName
           
protected  String constraintType
           
 
Fields inherited from interface tudresden.ocl.codegen.CodeFragment
INV, POST, PRE, PREPARATION, TRANSFER
 
Constructor Summary
DeclarativeCodeFragment(String name, String type, String code, String[] additionalInfo)
           
 
Method Summary
 String[] getAdditionalInfo()
           
 String getCode()
           
 String getConstrainedOperation()
           
 String getConstrainedType()
           
 int getKind()
           
 String getName()
           
 String getResultVariable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constraintName

protected String constraintName

constraintType

protected String constraintType

code

protected String code

additionalInfo

protected String[] additionalInfo
Constructor Detail

DeclarativeCodeFragment

public DeclarativeCodeFragment(String name,
                               String type,
                               String code,
                               String[] additionalInfo)
Method Detail

getConstrainedType

public String getConstrainedType()
Specified by:
getConstrainedType in interface CodeFragment
Returns:
the constrained type

getConstrainedOperation

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

getCode

public String getCode()
Specified by:
getCode in interface CodeFragment
Returns:
the generated code for the constraint

getName

public String getName()
Specified by:
getName in interface CodeFragment
Returns:
the name of the constraint

getKind

public int getKind()
Specified by:
getKind in interface CodeFragment
Returns:
always CodeFragment.INV

getResultVariable

public String getResultVariable()
Specified by:
getResultVariable in interface CodeFragment
Returns:
always null

getAdditionalInfo

public String[] getAdditionalInfo()
Returns:
additional Information about the code fragment

Dresden OCL Toolkit

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