|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeDescriptor
TypeDescriptor captures the characteristics of a Java type and supports serialization to a javaStream.
Derived classes support boxed/unboxed types, static/dynamic Ecore and collections.
Method Summary | |
---|---|
void |
append(JavaStream js)
Append the declaration of this type to a JavaStream. |
java.lang.Boolean |
appendBox(JavaStream js,
JavaLocalContext localContext,
CGBoxExp cgBoxExp,
CGValuedElement unboxedValue)
|
void |
appendCast(JavaStream js,
java.lang.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 |
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. |
java.lang.Boolean |
appendUnboxStatements(JavaStream js,
JavaLocalContext localContext,
CGUnboxExp cgUnboxExp,
CGValuedElement boxedValue)
|
CollectionDescriptor |
asCollectionDescriptor()
Return a non-null Collection type descriptor if this type descriptor dedescribes a Collection. |
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. |
TypeDescriptor |
getPrimitiveDescriptor()
Return the type descriptor for use when a primitive type would be appropriate. |
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. |
boolean |
isAssignableTo(java.lang.Class<?> javaClass)
Return true if an instance described by this typeDescriptor may be assigned to a javaClass. |
Method Detail |
---|
void append(@NonNull JavaStream js)
@NonNull java.lang.Boolean appendBox(@NonNull JavaStream js, @NonNull JavaLocalContext localContext, @NonNull CGBoxExp cgBoxExp, @NonNull CGValuedElement unboxedValue)
void appendCast(@NonNull JavaStream js, @Nullable java.lang.Class<?> actualJavaClass, @Nullable JavaStream.SubStream subStream)
void appendCastTerm(@NonNull JavaStream js, @NonNull CGValuedElement cgElement)
void appendNotEqualsTerm(@NonNull JavaStream js, @NonNull CGValuedElement thisValue, @NonNull TypeDescriptor thatTypeDescriptor, @NonNull java.lang.String thatName)
void appendEqualsValue(@NonNull JavaStream js, @NonNull CGValuedElement thisValue, @NonNull CGValuedElement thatValue, boolean notEquals)
@NonNull java.lang.Boolean appendUnboxStatements(@NonNull JavaStream js, @NonNull JavaLocalContext localContext, @NonNull CGUnboxExp cgUnboxExp, @NonNull CGValuedElement boxedValue)
@Nullable CollectionDescriptor asCollectionDescriptor()
@NonNull java.lang.String getClassName()
@Nullable org.eclipse.emf.ecore.EClassifier getEClassifier()
@NonNull java.lang.Class<?> getJavaClass()
@NonNull TypeDescriptor getPrimitiveDescriptor()
@NonNull UnboxedDescriptor getUnboxedDescriptor()
@Nullable java.lang.Class<?> hasJavaClass()
boolean isAssignableFrom(@NonNull TypeDescriptor typeDescriptor)
boolean isAssignableTo(@NonNull java.lang.Class<?> javaClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |