|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ashridgetech.jamda.transform.UmlTypeCreator | +--com.ashridgetech.jamda.transform.UmlClassCreator
Generates a new ClassType
from a given source
StructuredType
.
Each instance may only be used to generate one element.
Subclasses must implement UmlTypeCreator.setup()
and UmlTypeCreator.standardElementDefClasses()
.
They may wish
to override makeNewClass()
, UmlTypeCreator.getNewName()
or UmlTypeCreator.getPackage()
.
Nested Class Summary |
Nested classes inherited from class com.ashridgetech.jamda.transform.UmlTypeCreator |
UmlTypeCreator.PropertyDetails |
Constructor Summary | |
UmlClassCreator()
Construct a UmlClassCreator
for a Java class . |
Method Summary | |
protected Attribute |
addAttribute(java.lang.String name,
Type type)
Make a new Attribute belonging to the new class. |
protected Constructor |
addConstructor()
Make a new Constructor belonging to the new class. |
protected UmlTypeCreator.PropertyDetails |
addProperty(Property property)
Make a new single or pair of Operation s belonging to the new type,
which are getter and setter (if writable) for a property. |
protected UmlTypeCreator.PropertyDetails |
addProperty(Property property,
boolean createAttribute)
Make a new single or pair of Operation s belonging to the new type,
which are getter and setter (if writable) for a property. |
ClassType |
getNewClass()
Get the new ClassType being created. |
protected ClassType |
makeNewClass()
Make a new ClassType element. |
protected StructuredType |
makeNewType()
{@inheritDoc} |
java.lang.String |
toString()
|
Methods inherited from class com.ashridgetech.jamda.transform.UmlTypeCreator |
addOperation, addOperation, addOperation, checkReadyToCreate, extraStandardDefClasses, getModel, getNewName, getNewType, getPackage, getPackageName, getSource, getSuffix, logChange, logCreate, logger, setModel, setPackageName, setSource, setSuffix, setup, standardElementDefClasses, transform |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UmlClassCreator()
UmlClassCreator
for a Java class
.
Method Detail |
public ClassType getNewClass()
ClassType
being created. Only valid
after UmlTypeCreator.transform(com.ashridgetech.jamda.uml.ModelElement)
has called makeNewType()
.
protected final StructuredType makeNewType()
makeNewType
in class UmlTypeCreator
protected ClassType makeNewClass()
ClassType
element. This implementation
creates a new ClassType
belonging to the package
returned by UmlTypeCreator.getPackage()
, with the name returned by UmlTypeCreator.getNewName()
.
protected Attribute addAttribute(java.lang.String name, Type type)
Attribute
belonging to the new class.
The new Attribute
is returned so
further characteristics can be set.
name
- the name of this Attribute
type
- the type of this Attribute
Attribute
protected Constructor addConstructor()
Constructor
belonging to the new class.
The new Constructor
is returned so
further characteristics can be set.
Constructor
public java.lang.String toString()
toString
in class UmlTypeCreator
protected UmlTypeCreator.PropertyDetails addProperty(Property property, boolean createAttribute)
Operation
s belonging to the new type,
which are getter and setter (if writable) for a property.
The new Operation
s are returned in a UmlTypeCreator.PropertyDetails
so
further characteristics can be set if required.
Also create an Attribute
if createAttribute
is true
property
- the Property
from which the features are createdcreateAttribute
- if true, an attribute is created for this property
protected UmlTypeCreator.PropertyDetails addProperty(Property property)
Operation
s belonging to the new type,
which are getter and setter (if writable) for a property.
The new Operation
s are returned in a UmlTypeCreator.PropertyDetails
so
further characteristics can be set if required.
Also create an Attribute
.
addProperty
in class UmlTypeCreator
property
- the Property
from which the features are created
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |