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

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.BooleanObjectDescriptor
All Implemented Interfaces:
TypeDescriptor, BoxedDescriptor, SimpleDescriptor, UnboxedDescriptor

public class BooleanObjectDescriptor
extends SimpleValueDescriptor
implements SimpleDescriptor

A BooleanObjectDescriptor 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
protected  BooleanPrimitiveDescriptor primitiveTypeDescriptor
           
 
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
BooleanObjectDescriptor(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.
 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.
 TypeDescriptor getPrimitiveDescriptor()
          Return the type descriptor for use when a primitive type would be appropriate.
 
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
append, getClassName, getJavaClass, hasJavaClass, isAssignableTo, toString
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
appendBox, appendCast, appendCastTerm, appendUnboxStatements, asCollectionDescriptor, getEClassifier, getElementId, 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, appendUnboxStatements, asCollectionDescriptor, getClassName, getEClassifier, getJavaClass, getUnboxedDescriptor, hasJavaClass, isAssignableFrom, isAssignableTo
 

Field Detail

primitiveTypeDescriptor

@NonNull
protected final BooleanPrimitiveDescriptor primitiveTypeDescriptor
Constructor Detail

BooleanObjectDescriptor

public BooleanObjectDescriptor(@NonNull
                               ElementId elementId)
Method Detail

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

getPrimitiveDescriptor

@NonNull
public TypeDescriptor getPrimitiveDescriptor()
Description copied from interface: TypeDescriptor
Return the type descriptor for use when a primitive type would be appropriate. Returns this when there is no distinction for primitive types.

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