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

java.lang.Object
  extended by org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
      extended by org.eclipse.ocl.examples.codegen.java.types.AbstractCollectionDescriptor
All Implemented Interfaces:
TypeDescriptor, CollectionDescriptor, UnboxedDescriptor
Direct Known Subclasses:
EObjectsDescriptor, FutureEObjectsDescriptor, UnboxedElementsDescriptor

public abstract class AbstractCollectionDescriptor
extends AbstractDescriptor
implements CollectionDescriptor

An AbstractCollectionDescriptor extends an AbstractDescriptor to describe a collection type.


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.AbstractDescriptor
elementId
 
Constructor Summary
AbstractCollectionDescriptor(CollectionTypeId collectionTypeId)
           
 
Method Summary
 void append(JavaStream javaStream, boolean reClass)
           
 java.lang.Boolean appendBox(JavaStream js, JavaLocalContext localContext, CGBoxExp cgBoxExp, CGValuedElement unboxedValue)
           
 void appendElement(JavaStream javaStream, boolean reClass)
           
 CollectionDescriptor asCollectionDescriptor()
          Return a non-null Collection type descriptor if this type descriptor dedescribes a Collection.
 CollectionTypeId getElementId()
           
 boolean isAssignableTo(java.lang.Class<?> javaClass)
          Return true if an instance described by this typeDescriptor may be assigned to a javaClass.
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
appendCast, appendCastTerm, appendEqualsValue, appendNotEqualsTerm, appendUnboxStatements, getEClassifier, 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, appendCast, appendCastTerm, appendEqualsValue, appendNotEqualsTerm, appendUnboxStatements, getClassName, getEClassifier, getJavaClass, getPrimitiveDescriptor, getUnboxedDescriptor, hasJavaClass, isAssignableFrom
 

Constructor Detail

AbstractCollectionDescriptor

public AbstractCollectionDescriptor(@NonNull
                                    CollectionTypeId collectionTypeId)
Method Detail

append

public void append(@NonNull
                   JavaStream javaStream,
                   boolean reClass)
Specified by:
append in interface CollectionDescriptor

appendBox

@NonNull
public java.lang.Boolean appendBox(@NonNull
                                           JavaStream js,
                                           @NonNull
                                           JavaLocalContext localContext,
                                           @NonNull
                                           CGBoxExp cgBoxExp,
                                           @NonNull
                                           CGValuedElement unboxedValue)
Specified by:
appendBox in interface TypeDescriptor
Overrides:
appendBox in class AbstractDescriptor

appendElement

public void appendElement(@NonNull
                          JavaStream javaStream,
                          boolean reClass)
Specified by:
appendElement in interface CollectionDescriptor

asCollectionDescriptor

@Nullable
public CollectionDescriptor asCollectionDescriptor()
Description copied from interface: TypeDescriptor
Return a non-null Collection type descriptor if this type descriptor dedescribes a Collection.

Specified by:
asCollectionDescriptor in interface TypeDescriptor
Overrides:
asCollectionDescriptor in class AbstractDescriptor
Returns:

getElementId

@NonNull
public CollectionTypeId getElementId()
Specified by:
getElementId in interface CollectionDescriptor
Overrides:
getElementId in class AbstractDescriptor

isAssignableTo

public boolean isAssignableTo(@NonNull
                              java.lang.Class<?> javaClass)
Description copied from interface: TypeDescriptor
Return true if an instance described by this typeDescriptor may be assigned to a javaClass.

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

toString

@NonNull
public java.lang.String toString()
Overrides:
toString in class AbstractDescriptor