UML.Code
Class Class

java.lang.Object
  |
  +--UML.Code.Class
Direct Known Subclasses:
Interface

public class Class
extends java.lang.Object

This class represent a Java class for which code is generated. Information collected for code generation is: class name, visibility, if abstract, imported packages, supercalsses, implemented interfaces, fields, methods.


Field Summary
protected  java.util.Vector attributes
           
protected  java.lang.String header
           
protected  java.util.Vector methods
           
protected  java.lang.String name
           
protected  java.util.Vector packages
           
protected  java.lang.String visibility
           
 
Constructor Summary
Class()
          Constructor.
 
Method Summary
 void add(Attribute attribute)
          Adds an attribute to this class.
 void add(Generalization generalization)
          Adds a superclass or an implemented interface to this class.
 void add(Method method)
          Adds a method to this class.
 void add(Package pack)
          Adds an imported package to this class.
 java.lang.String getCode()
          Gets the code for this class.
protected  java.util.Vector getConstructors()
          Determines all the constructor for this class.
 java.lang.String getName()
          Gets the name of the class.
protected  java.lang.String getSupertypes()
          Determines supertypes (classes and interfaces) for this class.
 java.lang.String getXmiUuid()
          Gets the UUID (Universally Unique IDentifier) of the class.
 void setIsAbstract(boolean isAbstract)
          Determines if the class is abstract.
 void setName(java.lang.String name)
          Sets the name of the class.
 void setVisibility(java.lang.String visibility)
          Sets the visibility of the class (public, private, protected or nothing).
 void setXmiUuid(java.lang.String xmiUuid)
          Sets the UUID (Universally Unique IDentifier) of the class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

visibility

protected java.lang.String visibility

packages

protected java.util.Vector packages

attributes

protected java.util.Vector attributes

methods

protected java.util.Vector methods

header

protected java.lang.String header
Constructor Detail

Class

public Class()
Constructor.

Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the class.


getName

public java.lang.String getName()
Gets the name of the class.

Returns:
name the name of the class.

setXmiUuid

public void setXmiUuid(java.lang.String xmiUuid)
Sets the UUID (Universally Unique IDentifier) of the class. The UUID is taken from an XMI document (attribute xmi.uuid).


getXmiUuid

public java.lang.String getXmiUuid()
Gets the UUID (Universally Unique IDentifier) of the class. The UUID is taken from an XMI document (attribute xmi.uuid).

Returns:
xmiUuid the UUID of the class.

setVisibility

public void setVisibility(java.lang.String visibility)
Sets the visibility of the class (public, private, protected or nothing).


setIsAbstract

public void setIsAbstract(boolean isAbstract)
Determines if the class is abstract.


add

public void add(Package pack)
Adds an imported package to this class.


add

public void add(Generalization generalization)
Adds a superclass or an implemented interface to this class.


add

public void add(Attribute attribute)
Adds an attribute to this class.


add

public void add(Method method)
Adds a method to this class.


getCode

public java.lang.String getCode()
Gets the code for this class.

Returns:
code the generated code.

getSupertypes

protected java.lang.String getSupertypes()
Determines supertypes (classes and interfaces) for this class.

Returns:
supertypes code generated for all the supertypes.

getConstructors

protected java.util.Vector getConstructors()
Determines all the constructor for this class.

Returns:
constructor code generated for all the constructor.