de.interactive_instruments.ShapeChange.Model
Class OclConstraintImpl

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Model.OclConstraintImpl
All Implemented Interfaces:
Constraint, OclConstraint
Direct Known Subclasses:
GenericOclConstraint, OclConstraintEA, OclConstraintGSIP, OclConstraintXmi10

public abstract class OclConstraintImpl
extends Object
implements OclConstraint

The OclConstraintImpl class is the common root of all OclConstraint interface implementations of the supported input models.


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.interactive_instruments.ShapeChange.Model.OclConstraint
OclConstraint.ConditionType
 
Nested classes/interfaces inherited from interface de.interactive_instruments.ShapeChange.Model.Constraint
Constraint.ModelElmtContextType
 
Field Summary
protected  String[] comments
          Comments contained in the constraint
protected  OclConstraint.ConditionType conditionType
          Condition Type - the nature of the condition
protected  String constraintName
          Name of the constraint
protected  String constraintStatus
          Constraint status.
protected  String constraintText
          The textual representation of the constraint
protected  ClassInfo contextClass
          Class Context - the class, which represents 'self'
protected  Info contextModelElmt
          Model Element Context - class, attribute, operation, etc.
protected  Constraint.ModelElmtContextType contextModelElmtType
          Model Element Context Type - the nature of the model context the OCL expression is specified in.
protected  OclNode.Expression syntaxTree
          Compiled representation
 
Constructor Summary
OclConstraintImpl()
           
 
Method Summary
 String[] comments()
          The comments contained in the OCL expression
 OclConstraint.ConditionType conditionType()
          Inquire the condition type.
 ClassInfo contextClass()
          Inquire the context class of the OCL constraint - the 'self'
 Info contextModelElmt()
          Inquire the model element context.
 Constraint.ModelElmtContextType contextModelElmtType()
          Find out about the type of the context model element.
 String name()
          Inquire name of the constraint.
 String status()
          Inquire status of the constraint.
 OclNode.Expression syntaxTree()
          If compilation went well, this returns the OCL syntax tree.
 String text()
          Inquire the textual representation of the OCL expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextClass

protected ClassInfo contextClass
Class Context - the class, which represents 'self'


contextModelElmt

protected Info contextModelElmt
Model Element Context - class, attribute, operation, etc. This has to be downcast to the proper xxxInfo as specified by contextModelElmtType.


contextModelElmtType

protected Constraint.ModelElmtContextType contextModelElmtType
Model Element Context Type - the nature of the model context the OCL expression is specified in.


conditionType

protected OclConstraint.ConditionType conditionType
Condition Type - the nature of the condition


constraintName

protected String constraintName
Name of the constraint


constraintText

protected String constraintText
The textual representation of the constraint


constraintStatus

protected String constraintStatus
Constraint status. A string reflecting the status of the constraint in conspiracy between the model source and the code generator.


syntaxTree

protected OclNode.Expression syntaxTree
Compiled representation


comments

protected String[] comments
Comments contained in the constraint

Constructor Detail

OclConstraintImpl

public OclConstraintImpl()
Method Detail

conditionType

public OclConstraint.ConditionType conditionType()
Inquire the condition type.

Specified by:
conditionType in interface OclConstraint

contextClass

public ClassInfo contextClass()
Inquire the context class of the OCL constraint - the 'self'

Specified by:
contextClass in interface OclConstraint

contextModelElmt

public Info contextModelElmt()
Inquire the model element context. Note the result must be downcast according to the value of the model element context type.

Specified by:
contextModelElmt in interface Constraint

contextModelElmtType

public Constraint.ModelElmtContextType contextModelElmtType()
Find out about the type of the context model element. Currently only CLASS and ATTRIBUTE are supported.

Specified by:
contextModelElmtType in interface Constraint

name

public String name()
Inquire name of the constraint.

Specified by:
name in interface Constraint

status

public String status()
Inquire status of the constraint.

Specified by:
status in interface Constraint

text

public String text()
Inquire the textual representation of the OCL expression. The text is supposed to start with condition type inv:, derive: or init:. The string may contain \n characters.

Specified by:
text in interface Constraint

syntaxTree

public OclNode.Expression syntaxTree()
If compilation went well, this returns the OCL syntax tree.

Specified by:
syntaxTree in interface OclConstraint

comments

public String[] comments()
The comments contained in the OCL expression

Specified by:
comments in interface OclConstraint


Copyright © 2015. All rights reserved.