|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.autosemantix.Model
This class acts as a container for all information and methods related to the platform-specific Java model. Java code elements are stored using the ecore framework provided by the EMF library.
Constructor Summary | |
Model(Project project)
|
Method Summary | |
EClass |
addClass(java.lang.String name)
Add a class with the given name to the model. |
void |
clear()
Reset the model to its initial empty state. |
EAttribute |
createAttribute(java.lang.String name)
Create a new attribute with the given name. |
EOperation |
createOperation(java.lang.String name)
Create a new method with the given name. |
boolean |
exportXMI(java.lang.String uri)
Serializes a Model to disk as an XMI file. |
java.util.List |
getClasses()
Get a list of all classes in top level package of the current model. |
static java.util.List |
getDirectSuperTypes(EClass c)
Find a list of all suprclasses which are one level up in the inheritance hierarchy. |
EcoreFactory |
getFactory()
Get the current factory being used to create ecore objects. |
java.lang.String |
getJavaType(java.lang.String type)
A lookup function to convert ecore types to regular Java types. |
static java.util.List |
getLocalFeatures(EClass c)
Find a list of attributes which are not inherited from the super classes. |
Model |
importXMI(java.lang.String uri)
Deserialize an existing XMI file into an ecore Model. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Model(Project project)
Method Detail |
public EClass addClass(java.lang.String name)
name
- The class Name
public EAttribute createAttribute(java.lang.String name)
name
- The attribute name.
public EOperation createOperation(java.lang.String name)
name
- The method name.
public EcoreFactory getFactory()
public java.util.List getClasses()
public static java.util.List getDirectSuperTypes(EClass c)
c
- The class which we are querying.
public static java.util.List getLocalFeatures(EClass c)
c
- The class being queried.
public void clear()
public java.lang.String getJavaType(java.lang.String type)
type
- The ecore type to lookup.
public boolean exportXMI(java.lang.String uri)
uri
- The location to save the file.
public Model importXMI(java.lang.String uri)
uri
- The path to the existing XMI file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |