org.eclipse.ocl.examples.codegen.java.types
Class EnumerationValueDescriptor

java.lang.Object
  extended by org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
      extended by org.eclipse.ocl.examples.codegen.java.types.AbstractValueDescriptor
          extended by org.eclipse.ocl.examples.codegen.java.types.BoxedValueDescriptor
              extended by org.eclipse.ocl.examples.codegen.java.types.EnumerationValueDescriptor
All Implemented Interfaces:
TypeDescriptor, BoxedDescriptor

public class EnumerationValueDescriptor
extends BoxedValueDescriptor


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
AbstractDescriptor.NamedFuture
 
Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.codegen.java.types.BoxedValueDescriptor
unboxedDescriptor
 
Fields inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractValueDescriptor
javaClass
 
Fields inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
elementId
 
Constructor Summary
EnumerationValueDescriptor(ElementId elementId)
           
 
Method Summary
 void appendEqualsValue(JavaStream js, CGValuedElement thisValue, CGValuedElement thatValue, boolean notEquals)
          Append an expression term that evaluates whether (this TypedDescriptor and) thisValue is not equals/ notEquals to thatValue.
 java.lang.Boolean appendUnboxStatements(JavaStream js, JavaLocalContext localContext, CGUnboxExp cgUnboxExp, CGValuedElement boxedValue)
           
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.BoxedValueDescriptor
getUnboxedDescriptor, isAssignableFrom
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractValueDescriptor
append, getClassName, getJavaClass, hasJavaClass, isAssignableTo, toString
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
appendBox, appendCast, appendCastTerm, appendNotEqualsTerm, asCollectionDescriptor, getEClassifier, getElementId, getPrimitiveDescriptor, reClass, zzisBoxedType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.codegen.generator.TypeDescriptor
append, appendBox, appendCast, appendCastTerm, appendNotEqualsTerm, asCollectionDescriptor, getClassName, getEClassifier, getJavaClass, getPrimitiveDescriptor, hasJavaClass, isAssignableTo
 

Constructor Detail

EnumerationValueDescriptor

public EnumerationValueDescriptor(@NonNull
                                  ElementId elementId)
Method Detail

appendEqualsValue

public void appendEqualsValue(@NonNull
                              JavaStream js,
                              @NonNull
                              CGValuedElement thisValue,
                              @NonNull
                              CGValuedElement thatValue,
                              boolean notEquals)
Description copied from interface: TypeDescriptor
Append an expression term that evaluates whether (this TypedDescriptor and) thisValue is not equals/ notEquals to thatValue.
It is assumed that all the degenerate constant cases have been optimzed away.

Specified by:
appendEqualsValue in interface TypeDescriptor
Overrides:
appendEqualsValue in class AbstractDescriptor

appendUnboxStatements

@NonNull
public java.lang.Boolean appendUnboxStatements(@NonNull
                                                       JavaStream js,
                                                       @NonNull
                                                       JavaLocalContext localContext,
                                                       @NonNull
                                                       CGUnboxExp cgUnboxExp,
                                                       @NonNull
                                                       CGValuedElement boxedValue)
Specified by:
appendUnboxStatements in interface TypeDescriptor
Overrides:
appendUnboxStatements in class AbstractDescriptor