Package cruise.umple.compiler
Class UmletGenerator
java.lang.Object
cruise.umple.compiler.UmletGenerator
- All Implemented Interfaces:
CodeGenerator
public class UmletGenerator extends java.lang.Object implements CodeGenerator
-
Constructor Summary
Constructors Constructor Description UmletGenerator()
-
Method Summary
Modifier and Type Method Description boolean
addAssociationElement(UmletElement aAssociationElement)
boolean
addAssociationElementAt(UmletElement aAssociationElement, int index)
boolean
addClassElement(UmletElement aClassElement)
boolean
addClassElementAt(UmletElement aClassElement, int index)
boolean
addOrMoveAssociationElementAt(UmletElement aAssociationElement, int index)
boolean
addOrMoveClassElementAt(UmletElement aClassElement, int index)
void
delete()
void
draw(UmpleModel model)
void
generate()
UmletElement
getAssociationElement(int index)
java.util.List<UmletElement>
getAssociationElements()
UmletElement
getClassElement(int index)
java.util.List<UmletElement>
getClassElements()
java.lang.String
getFilename()
UmpleModel
getModel()
double
getSuboptionValue(java.lang.String subopt, java.lang.Double defaultVal)
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.boolean
hasAssociationElements()
boolean
hasClassElements()
boolean
hasSuboption(java.lang.String subopt)
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.int
indexOfAssociationElement(UmletElement aAssociationElement)
int
indexOfClassElement(UmletElement aClassElement)
static int
minimumNumberOfAssociationElements()
static int
minimumNumberOfClassElements()
UmletElement
newAssociation(UmletElement firstClass, UmletElement secondClass, java.lang.String firstMultiplicity, java.lang.String secondMultiplicity, java.lang.String firstRole, java.lang.String secondRole)
UmletElement
newClass(java.lang.String name)
int
numberOfAssociationElements()
int
numberOfClassElements()
void
postpare()
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.void
prepare()
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.boolean
removeAssociationElement(UmletElement aAssociationElement)
boolean
removeClassElement(UmletElement aClassElement)
boolean
setFilename(java.lang.String aFilename)
boolean
setModel(UmpleModel aModel)
boolean
setOutput(java.lang.String aString)
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.boolean
setSuboption(java.lang.String subopt)
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.java.lang.String
toString()
java.lang.String
toXml()
-
Constructor Details
-
UmletGenerator
public UmletGenerator()
-
-
Method Details
-
setFilename
public boolean setFilename(java.lang.String aFilename) -
setModel
- Specified by:
setModel
in interfaceCodeGenerator
-
getFilename
public java.lang.String getFilename() -
getModel
-
getClassElement
-
getClassElements
-
numberOfClassElements
public int numberOfClassElements() -
hasClassElements
public boolean hasClassElements() -
indexOfClassElement
-
getAssociationElement
-
getAssociationElements
-
numberOfAssociationElements
public int numberOfAssociationElements() -
hasAssociationElements
public boolean hasAssociationElements() -
indexOfAssociationElement
-
minimumNumberOfClassElements
public static int minimumNumberOfClassElements() -
addClassElement
-
removeClassElement
-
addClassElementAt
-
addOrMoveClassElementAt
-
minimumNumberOfAssociationElements
public static int minimumNumberOfAssociationElements() -
addAssociationElement
-
removeAssociationElement
-
addAssociationElementAt
-
addOrMoveAssociationElementAt
-
delete
public void delete() -
generate
public void generate()- Specified by:
generate
in interfaceCodeGenerator
-
draw
-
newClass
-
newAssociation
public UmletElement newAssociation(UmletElement firstClass, UmletElement secondClass, java.lang.String firstMultiplicity, java.lang.String secondMultiplicity, java.lang.String firstRole, java.lang.String secondRole) -
toXml
public java.lang.String toXml() -
setOutput
public boolean setOutput(java.lang.String aString)Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
setOutput
in interfaceCodeGenerator
-
setSuboption
public boolean setSuboption(java.lang.String subopt)Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
setSuboption
in interfaceCodeGenerator
-
hasSuboption
public boolean hasSuboption(java.lang.String subopt)Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
hasSuboption
in interfaceCodeGenerator
-
getSuboptionValue
public double getSuboptionValue(java.lang.String subopt, java.lang.Double defaultVal)Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
getSuboptionValue
in interfaceCodeGenerator
-
prepare
public void prepare()Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
prepare
in interfaceCodeGenerator
-
postpare
public void postpare()Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
postpare
in interfaceCodeGenerator
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-