|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biomage.tools.generate_classes.CreateFile
org.biomage.tools.generate_classes.CreateClassFile
public class CreateClassFile
Description: Class that is resposible for generating a java file for the class represented by the class node passed into the constructor.
Nested Class Summary | |
---|---|
class |
CreateClassFile.DataTypeAttrInformation
Description: Inner class to hold datatype attribute information. |
class |
CreateClassFile.MethodInformation
Description: Inner class to hold method information. |
Nested classes/interfaces inherited from class org.biomage.tools.generate_classes.CreateFile |
---|
CreateFile.AssociationAttrInformation, CreateFile.AttrInformation, CreateFile.IdentifierAttrInformation, CreateFile.RoleInformation |
Field Summary |
---|
Fields inherited from class org.biomage.tools.generate_classes.CreateFile |
---|
associationInfo, baseClassCreateFile, baseClassID, baseClassName, classDoc, className, concreteSubClassNames, dataAttrInfo, importDate, importSerializable, importVector, interfaceInfo, isAbstract, isBaseClass, isIdentifiable, isIndependent, isInterface, isReferenced, JAVA_INTERFACE, methodInfo, NEWLINE, packageDoc, packageImports, packageName, roleNames, subClassNames, typeOwned, UML_CLASS, UML_MODEL, UML_PACKAGE, visibility |
Constructor Summary | |
---|---|
|
CreateClassFile()
Description: Default Constructor for the class file generator. |
protected |
CreateClassFile(org.w3c.dom.Element xmiNode,
org.w3c.dom.Element classNode,
java.util.Map id2classes,
java.util.Map id2extInfo,
java.util.Map id2packages,
java.util.Map id2dataType,
java.util.Map id2associations,
java.util.Map id2constraint)
Description: Constructor for the class file generator. |
|
CreateClassFile(java.lang.String name,
java.lang.String packageName,
java.lang.String comment,
int typeOwned)
Description: Constructor for the class file generator. |
Method Summary | |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String scope,
java.lang.String datatype,
java.lang.String comment,
java.lang.String initialValue,
boolean isRequired)
Description: Adds an attribute to this create file. |
protected java.util.Vector |
associationInformation(org.w3c.dom.Element classNode,
java.util.Map id2classes,
java.util.Map id2packages,
java.util.Map id2extInfo,
java.util.Map id2associations,
java.util.Map id2constraint)
Description: Puts together the information on the class associations. |
protected java.util.Vector |
dataAttributeInformation(org.w3c.dom.Element classNode,
java.util.Map id2extInfo,
java.util.Map id2dataType)
Description: Puts together the information on the simple datatypes. |
int |
getFileType()
Description: Returns what kind of model element this class is based on. |
java.lang.String |
getID()
Description: Obtains the XMI id. |
protected void |
headerInformation(org.w3c.dom.Element xmiNode,
org.w3c.dom.Element classNode,
java.util.Map id2classes,
java.util.Map id2extInfo,
java.util.Map id2packages)
Description: Obtains the information to generate the information for the package and the declaration of the class. |
protected java.util.Vector |
methodInformation(org.w3c.dom.Element classNode,
java.util.Map id2classes,
java.util.Map id2dataType,
java.util.Map id2packages,
java.util.Map id2extInfo)
Description: Puts together the information on the class methods. |
protected int |
typeAggregated(org.w3c.dom.Element endNode)
Description: returns the type of aggregation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CreateClassFile(org.w3c.dom.Element xmiNode, org.w3c.dom.Element classNode, java.util.Map id2classes, java.util.Map id2extInfo, java.util.Map id2packages, java.util.Map id2dataType, java.util.Map id2associations, java.util.Map id2constraint) throws java.lang.Exception
xmiNode:
- top node beneath which information for
the class can be found.classNode:
- node representing the class with the information
that can be used to find the attributes and associations.id2classes:
- map to class nodes for import, base class,
and other info.id2extInfo:
- map where documentation for the class can be
found.id2packages:
- map where the package for the class can be
found.id2dataType:
- map where the datatypes for the attributes
can be found.id2associations:
- map where the associations for a class
can be found.id2constraint:
- map where the constraints for an
association end can be found.
java.lang.Exception
public CreateClassFile(java.lang.String name, java.lang.String packageName, java.lang.String comment, int typeOwned) throws java.lang.Exception
name:
- name to give the class.comment:
- documentation for this class.
java.lang.Exception
public CreateClassFile() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public java.lang.String getID() throws java.lang.Exception
java.lang.Exception
protected void headerInformation(org.w3c.dom.Element xmiNode, org.w3c.dom.Element classNode, java.util.Map id2classes, java.util.Map id2extInfo, java.util.Map id2packages) throws java.lang.Exception
xmiNode:
- top node beneath which information for
the class can be foundclassNode:
- node representing the class with the information
that can be used to find the attributes and associations.id2classes:
- map to class nodes for import, base class,
and other info.id2extInfo:
- map where documentation for the class can be
foundid2packages:
- map where the package for the class can be
found
java.lang.Exception
public void addAttribute(java.lang.String name, java.lang.String scope, java.lang.String datatype, java.lang.String comment, java.lang.String initialValue, boolean isRequired) throws java.lang.Exception
name:
- name of the attribute.scope:
- visibility of the attribute.datatype:
- datatype or enumeration values.comment:
- optional comment.initialValue:
- initial value, if any, for this attribute.isRequired:
- true if the attribute is required.
java.lang.Exception
protected java.util.Vector dataAttributeInformation(org.w3c.dom.Element classNode, java.util.Map id2extInfo, java.util.Map id2dataType) throws java.lang.Exception
xmiNode:
- top node beneath which information for
the class can be foundclassNode:
- node representing the class with the information
that can be used to find the attributes and associations.id2extInfo:
- map where documentation for the class can be
found
java.lang.Exception
protected int typeAggregated(org.w3c.dom.Element endNode) throws java.lang.Exception
endNode:
- other end association node to check the aggregation
attibute.
java.lang.Exception
protected java.util.Vector associationInformation(org.w3c.dom.Element classNode, java.util.Map id2classes, java.util.Map id2packages, java.util.Map id2extInfo, java.util.Map id2associations, java.util.Map id2constraint) throws java.lang.Exception
classNode:
- node representing this class.id2classes:
- map to the classes for information for association.id2packages:
- map to the packages for import information.id2extInfo:
- map to the comments.id2associations:
- map to the comments.id2constraint:
- map to the constraints.
java.lang.Exception
protected java.util.Vector methodInformation(org.w3c.dom.Element classNode, java.util.Map id2classes, java.util.Map id2dataType, java.util.Map id2packages, java.util.Map id2extInfo) throws java.lang.Exception
classNode:
- node representing this class.id2classes:
- map to the classes for information for parameters.id2dataType:
- map to the datatypes for parameters.id2packages:
- map to the packages for import information.id2extInfo:
- map to the comments.
java.lang.Exception
public int getFileType()
getFileType
in class CreateFile
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |