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

java.lang.Object
  extended by org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
      extended by org.eclipse.ocl.examples.codegen.java.types.FutureEObjectDescriptor
All Implemented Interfaces:
TypeDescriptor, BoxedDescriptor, SimpleDescriptor, UnboxedDescriptor

public class FutureEObjectDescriptor
extends AbstractDescriptor
implements SimpleDescriptor

A FutureEObjectDescriptor describes a yet-to-be-created type whose boxed and unboxed representations are the same. It has a pivot ElementId, and EClassifier and a Java class name.

The Java class is only known by name; it is not yet loadable, since genmodel has not yet generated it.

There is no EClassifier available to perform type conformance checks since thie Java class name was provided as an instanceClassName.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
AbstractDescriptor.NamedFuture
 
Field Summary
protected  java.lang.String className
           
protected  org.eclipse.emf.ecore.EClassifier eClassifier
           
 
Fields inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
elementId
 
Constructor Summary
FutureEObjectDescriptor(ElementId elementId, org.eclipse.emf.ecore.EClassifier eClassifier, java.lang.String className)
           
 
Method Summary
 void append(JavaStream js)
          Append the declaration of this type to a JavaStream.
 java.lang.String getClassName()
          Return the fully qualified Java class name described by this type.
 org.eclipse.emf.ecore.EClassifier getEClassifier()
          Return the Ecore EClassifier described by this type.
 java.lang.Class<?> getJavaClass()
          Return the basic Java class for this descriptor.
 UnboxedDescriptor getUnboxedDescriptor()
          Return the type descriptor for use when an unboxed type would be appropriate.
 java.lang.Class<?> hasJavaClass()
          Return the basic Java class for this descriptor.
 boolean isAssignableFrom(TypeDescriptor typeDescriptor)
          Return true if an instance described by typeDescriptor may be assigned to an instance described by this.
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
appendBox, appendCast, appendCastTerm, appendEqualsValue, appendNotEqualsTerm, appendUnboxStatements, asCollectionDescriptor, getElementId, getPrimitiveDescriptor, isAssignableTo, reClass, toString, 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, appendCast, appendCastTerm, appendEqualsValue, appendNotEqualsTerm, appendUnboxStatements, asCollectionDescriptor, getPrimitiveDescriptor, isAssignableTo
 

Field Detail

eClassifier

@NonNull
protected final org.eclipse.emf.ecore.EClassifier eClassifier

className

@NonNull
protected final java.lang.String className
Constructor Detail

FutureEObjectDescriptor

public FutureEObjectDescriptor(@NonNull
                               ElementId elementId,
                               @NonNull
                               org.eclipse.emf.ecore.EClassifier eClassifier,
                               @NonNull
                               java.lang.String className)
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

getClassName

@NonNull
public java.lang.String getClassName()
Description copied from interface: TypeDescriptor
Return the fully qualified Java class name described by this type. In the case of collection types, this method returns the class name of the collection elements.

Specified by:
getClassName in interface TypeDescriptor

getEClassifier

@Nullable
public org.eclipse.emf.ecore.EClassifier getEClassifier()
Description copied from interface: TypeDescriptor
Return the Ecore EClassifier described by this type. In the case of collection types, this method returns the EClassifier of the collection elements. May return null when no EClssifier available.

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

getJavaClass

@NonNull
public java.lang.Class<?> getJavaClass()
Description copied from interface: TypeDescriptor
Return the basic Java class for this descriptor. e.g. List for an unboxed collection.

Specified by:
getJavaClass in interface TypeDescriptor

getUnboxedDescriptor

@NonNull
public UnboxedDescriptor getUnboxedDescriptor()
Description copied from interface: TypeDescriptor
Return the type descriptor for use when an unboxed type would be appropriate. Returns this when this is an unboxed descriptor.

Specified by:
getUnboxedDescriptor in interface TypeDescriptor

hasJavaClass

@Nullable
public java.lang.Class<?> hasJavaClass()
Description copied from interface: TypeDescriptor
Return the basic Java class for this descriptor. e.g. List for an unboxed collection. Returns null for no Java class known.

Specified by:
hasJavaClass in interface TypeDescriptor

isAssignableFrom

public final boolean isAssignableFrom(@NonNull
                                      TypeDescriptor typeDescriptor)
Description copied from interface: TypeDescriptor
Return true if an instance described by typeDescriptor may be assigned to an instance described by this.

Specified by:
isAssignableFrom in interface TypeDescriptor