org.eclipse.ocl.examples.codegen.java.types
Class UnboxedValueDescriptor
java.lang.Object
org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor
org.eclipse.ocl.examples.codegen.java.types.AbstractValueDescriptor
org.eclipse.ocl.examples.codegen.java.types.UnboxedValueDescriptor
- All Implemented Interfaces:
- TypeDescriptor, UnboxedDescriptor
- Direct Known Subclasses:
- EnumerationObjectDescriptor, RealObjectDescriptor, UnlimitedNaturalObjectDescriptor
public class UnboxedValueDescriptor
- extends AbstractValueDescriptor
- implements UnboxedDescriptor
An UnboxedValueDescriptor describes a type whose unboxed representation differs from its boxed representation. It has a pivot ElementId and a Java class.
Thus an Integer is a TypeId.INTEGER and a java.lang.Integer.
Methods inherited from class org.eclipse.ocl.examples.codegen.java.types.AbstractDescriptor |
appendBox, appendCast, appendCastTerm, appendEqualsValue, appendNotEqualsTerm, 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 |
append, appendBox, appendCast, appendCastTerm, appendEqualsValue, appendNotEqualsTerm, appendUnboxStatements, asCollectionDescriptor, getClassName, getEClassifier, getJavaClass, getPrimitiveDescriptor, hasJavaClass, isAssignableTo |
UnboxedValueDescriptor
public UnboxedValueDescriptor(@NonNull
ElementId elementId,
@NonNull
java.lang.Class<?> javaClass)
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
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