|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents the type used in a pattern that is from a metamodel.
A pattern metatype is a transformation item. The pattern metatype has a name, a unique identifier,
and description attributes. A pattern metatype has an associated metamodel which is identified
at least by name (getMetamodelName
). If the metamodel is an EMF metamodel, then the
EPackage (getMetamodel
)
representing the metamodel and the EClass (getEClass
) defining the type are also provided.
A pattern metatype can be an enumeration whose values are a fixed set
of enumeration literals (getEnumerationLiterals
). Use the isEnumeration
method
to check whether the metatype is an enumeration. An enumeration type is typically defined
by a pattern library for use by one or more patterns in the library.
Method Summary | |
org.eclipse.emf.ecore.EClass |
getEClass()
Returns the EClass representing the metatype, if the associated metamodel is an EMF metamodel. |
IEnumerationLiteral[] |
getEnumerationLiterals()
Returns the array of enumeration literals for an enumeration metatype. |
String |
getImage(Object object)
Returns the human readable image of the given object. |
org.eclipse.emf.ecore.EPackage |
getMetamodel()
Returns the EPackage that is the root of the package hierarchy containing the EClass of the metatype, if the associated metamodel is an EMF metamodel. |
String |
getMetamodelName()
Returns the name of the metamodel of the metatype. |
boolean |
isAssignableFrom(IPatternMetatype metatype)
Indicates whether this metatype is either the same as, or a superclass of, the given metatype. |
boolean |
isEnumeration()
Indicates whether the metatype is an enumeration. |
boolean |
isValidValue(Object object)
Indicates whether the given object is a valid value of the metatype. |
Methods inherited from interface com.ibm.xtools.transform.core.ITransformationItem |
getDescription, getId, getName |
Method Detail |
public String getMetamodelName()
public org.eclipse.emf.ecore.EClass getEClass()
null
.public org.eclipse.emf.ecore.EPackage getMetamodel()
Use the getEClass
method to retrieve the EClass representing the metatype.
null
.public boolean isEnumeration()
The metatype is an enumeration if the values of the type are a fixed set
of enumeration literals. Use the getEnumerationLiterals
method to retrieve the array of enumeration literals.
true
if the metatype is an enumeration;
otherwise, it returns false
.public IEnumerationLiteral[] getEnumerationLiterals()
null
.public boolean isAssignableFrom(IPatternMetatype metatype)
Indicates whether this metatype is either the same as, or a superclass of, the given metatype.
metatype
- The object to be tested as a subtype
of this metatype.
true
if this metatype is the same as or
as supertype of the given metatype; otherwise, it returns false
.public boolean isValidValue(Object object)
object
- The object to be tested as a value of this metatype.
true
if the object is a valid value of the metatype;
otherwise, it returns false
.public String getImage(Object object)
If the object is not a valid value of the metatype the image will be empty.
object
- The object for which the image is to be returned.
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.