public abstract class AbstractDescriptor extends Object implements TypeDescriptor
| Constructor and Description |
|---|
AbstractDescriptor(ElementId elementId) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
appendBox(JavaStream js,
JavaLocalContext<?> localContext,
CGBoxExp cgBoxExp,
CGValuedElement unboxedValue)
Append the appropriate statements to js to create the boxed value for cgBboxExp from its unboxedValue.
|
void |
appendCast(JavaStream js,
Class<?> actualJavaClass,
JavaStream.SubStream subStream)
Append the actualJavaClass subStream to js wrapped in a cast to this type.g.
|
void |
appendCastTerm(JavaStream js,
CGValuedElement cgElement)
Append a cgElement to js wrapped in a cast to this type
|
Boolean |
appendEcore(JavaStream js,
JavaLocalContext<?> localContext,
CGEcoreExp cgEcoreExp,
CGValuedElement unboxedValue)
Append a conversion to an Ecore value.
|
Boolean |
appendEcoreStatements(JavaStream js,
JavaLocalContext<?> localContext,
CGEcoreExp cgEcoreExp,
CGValuedElement boxedValue)
Append the appropriate statements to js to create the ecore value for cgEcoreExp from its boxedValue.
|
void |
appendEcoreValue(JavaStream js,
String requiredClassName,
CGValuedElement cgValue)
Append cgValue to js casting an internally typed Ecore value to requiredClassName.
|
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,
String thatName)
Append an expression term that evaluates whether (this TypedDescriptor and) thisValue is not equal to thatTypeDescriptor and thatName.
|
Boolean |
appendUnboxStatements(JavaStream js,
JavaLocalContext<?> localContext,
CGUnboxExp cgUnboxExp,
CGValuedElement boxedValue)
Append the appropriate statements to js to create the unboxed value for cgUnboxExp from its boxedValue.
|
CollectionDescriptor |
asCollectionDescriptor()
Return a non-null Collection type descriptor if this type descriptor describes a Collection.
|
EClassifier |
getEClassifier()
Return the Ecore EClassifier described by this type.
|
ElementId |
getElementId() |
TypeDescriptor |
getPrimitiveDescriptor()
Return the type descriptor for use when a primitive type would be appropriate.
|
boolean |
isAssignableTo(Class<?> javaClass)
Return true if an instance described by this typeDescriptor may be assigned to a javaClass.
|
boolean |
isPrimitive()
Return true is this is a built-in primitive type such as boolean or int.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitappend, getClassName, getEcoreDescriptor, getJavaClass, getUnboxedDescriptor, hasJavaClass, isAssignableFrompublic AbstractDescriptor(ElementId elementId)
public Boolean appendBox(JavaStream js, JavaLocalContext<?> localContext, CGBoxExp cgBoxExp, CGValuedElement unboxedValue)
TypeDescriptorappendBox in interface TypeDescriptorpublic void appendCast(JavaStream js, Class<?> actualJavaClass, JavaStream.SubStream subStream)
TypeDescriptorappendCast in interface TypeDescriptorpublic void appendCastTerm(JavaStream js, CGValuedElement cgElement)
TypeDescriptorappendCastTerm in interface TypeDescriptorpublic Boolean appendEcore(JavaStream js, JavaLocalContext<?> localContext, CGEcoreExp cgEcoreExp, CGValuedElement unboxedValue)
TypeDescriptorappendEcore in interface TypeDescriptorpublic void appendEcoreValue(JavaStream js, String requiredClassName, CGValuedElement cgValue)
TypeDescriptorappendEcoreValue in interface TypeDescriptorpublic void appendNotEqualsTerm(JavaStream js, CGValuedElement thisValue, TypeDescriptor thatTypeDescriptor, String thatName)
TypeDescriptorappendNotEqualsTerm in interface TypeDescriptorpublic Boolean appendEcoreStatements(JavaStream js, JavaLocalContext<?> localContext, CGEcoreExp cgEcoreExp, CGValuedElement boxedValue)
TypeDescriptorappendEcoreStatements in interface TypeDescriptorpublic void appendEqualsValue(JavaStream js, CGValuedElement thisValue, CGValuedElement thatValue, boolean notEquals)
TypeDescriptorappendEqualsValue in interface TypeDescriptorpublic Boolean appendUnboxStatements(JavaStream js, JavaLocalContext<?> localContext, CGUnboxExp cgUnboxExp, CGValuedElement boxedValue)
TypeDescriptorappendUnboxStatements in interface TypeDescriptorpublic CollectionDescriptor asCollectionDescriptor()
TypeDescriptorasCollectionDescriptor in interface TypeDescriptorpublic EClassifier getEClassifier()
TypeDescriptorgetEClassifier in interface TypeDescriptorpublic ElementId getElementId()
public TypeDescriptor getPrimitiveDescriptor()
TypeDescriptorgetPrimitiveDescriptor in interface TypeDescriptorpublic boolean isAssignableTo(Class<?> javaClass)
TypeDescriptorisAssignableTo in interface TypeDescriptorpublic boolean isPrimitive()
TypeDescriptorisPrimitive in interface TypeDescriptorCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.