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

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.SimpleValueDescriptor
              extended by org.eclipse.ocl.examples.codegen.java.types.BooleanPrimitiveDescriptor
All Implemented Interfaces:
TypeDescriptor, BoxedDescriptor, SimpleDescriptor, UnboxedDescriptor

public class BooleanPrimitiveDescriptor
extends SimpleValueDescriptor
implements SimpleDescriptor

A BooleanPrimitiveDescriptor describes the boolean type and any associated irregular code generation patterns.


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.AbstractValueDescriptor
javaClass
 
Fields inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
elementId
 
Constructor Summary
BooleanPrimitiveDescriptor(ElementId elementId)
           
 
Method Summary
 void append(JavaStream js)
          Append the declaration of this type to a JavaStream.
 void appendCast(JavaStream js, java.lang.Class<?> actualJavaClass, JavaStream.SubStream subStream)
          Append the actualJavaClass subStream to js wrapped in a cast to this type.g.
 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.
 void appendNotEqualsTerm(JavaStream js, CGValuedElement thisValue, TypeDescriptor thatTypeDescriptor, java.lang.String thatName)
          Append an expression term that evaluates whether (this TypedDescriptor and) thisValue is not equal to thatTypeDescriptor and thatName.
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.SimpleValueDescriptor
getUnboxedDescriptor, isAssignableFrom
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractValueDescriptor
getClassName, getJavaClass, hasJavaClass, isAssignableTo, toString
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
appendBox, appendCastTerm, appendUnboxStatements, 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
appendBox, appendCastTerm, appendUnboxStatements, asCollectionDescriptor, getClassName, getEClassifier, getJavaClass, getPrimitiveDescriptor, getUnboxedDescriptor, hasJavaClass, isAssignableFrom, isAssignableTo
 

Constructor Detail

BooleanPrimitiveDescriptor

public BooleanPrimitiveDescriptor(@NonNull
                                  ElementId elementId)
Method Detail

append

public void append(@NonNull
                   JavaStream js)
Description copied from interface: TypeDescriptor
Append the declaration of this type to a JavaStream. e.g. "typename"

Specified by:
append in interface TypeDescriptor
Overrides:
append in class AbstractValueDescriptor

appendCast

public void appendCast(@NonNull
                       JavaStream js,
                       @Nullable
                       java.lang.Class<?> actualJavaClass,
                       @Nullable
                       JavaStream.SubStream subStream)
Description copied from interface: TypeDescriptor
Append the actualJavaClass subStream to js wrapped in a cast to this type.g. "(typename)subStream"

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

appendNotEqualsTerm

public void appendNotEqualsTerm(@NonNull
                                JavaStream js,
                                @NonNull
                                CGValuedElement thisValue,
                                @NonNull
                                TypeDescriptor thatTypeDescriptor,
                                @NonNull
                                java.lang.String thatName)
Description copied from interface: TypeDescriptor
Append an expression term that evaluates whether (this TypedDescriptor and) thisValue is not equal to thatTypeDescriptor and thatName.

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

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