Package cruise.umple.compiler
Class SimpleMetricsGenerator
java.lang.Object
cruise.umple.compiler.CodeGeneratorWithSubptions
cruise.umple.compiler.SimpleMetricsGenerator
- All Implemented Interfaces:
CodeGenerator
- Direct Known Subclasses:
ClassMetrics
,CodeMetrics
,StateMachineMetrics
public class SimpleMetricsGenerator extends CodeGeneratorWithSubptions
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SimpleMetricsGenerator()
-
Method Summary
Modifier and Type Method Description java.lang.StringBuilder
_genCell(java.lang.Integer numSpaces, java.lang.StringBuilder sb, java.lang.String content)
java.lang.StringBuilder
_genTopHeader(java.lang.Integer numSpaces, java.lang.StringBuilder sb, java.lang.String fn)
void
delete()
java.lang.String
genCell(java.lang.String content)
java.lang.StringBuilder
genCellFloat(java.lang.StringBuilder code, java.lang.Float f)
java.lang.StringBuilder
genCellInt(java.lang.StringBuilder code, int i)
java.lang.StringBuilder
genCellString(java.lang.StringBuilder code, java.lang.String s)
void
generate()
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.java.lang.String
genTopHeader(java.lang.String fn)
java.lang.StringBuilder
getCode()
UmpleModel
getModel()
Contains various aspects from an Umple file (.ump), such as classes, attributes, associations and methods.java.lang.String
getOutput()
boolean
setCode(java.lang.StringBuilder aCode)
boolean
setModel(UmpleModel aModel)
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.boolean
setOutput(java.lang.String aOutput)
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.java.lang.String
toString()
void
writeModel()
Output the metrics to a fileMethods inherited from class cruise.umple.compiler.CodeGeneratorWithSubptions
addSuboption, getSuboption, getSuboptions, getSuboptionValue, hasSuboption, hasSuboptions, indexOfSuboption, numberOfSuboptions, postpare, prepare, removeSuboption, setSuboption
-
Field Details
-
NL
public static final java.lang.String NL -
TEXT_0
public static final java.lang.String TEXT_0- See Also:
- Constant Field Values
-
TEXT_1
public static final java.lang.String TEXT_1- See Also:
- Constant Field Values
-
TEXT_2
public static final java.lang.String TEXT_2- See Also:
- Constant Field Values
-
TEXT_3
public static final java.lang.String TEXT_3- See Also:
- Constant Field Values
-
TEXT_4
public static final java.lang.String TEXT_4
-
-
Constructor Details
-
SimpleMetricsGenerator
public SimpleMetricsGenerator()
-
-
Method Details
-
setModel
Description copied from class:CodeGeneratorWithSubptions
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
setModel
in interfaceCodeGenerator
- Overrides:
setModel
in classCodeGeneratorWithSubptions
-
setOutput
public boolean setOutput(java.lang.String aOutput)Description copied from class:CodeGeneratorWithSubptions
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
setOutput
in interfaceCodeGenerator
- Overrides:
setOutput
in classCodeGeneratorWithSubptions
-
setCode
public boolean setCode(java.lang.StringBuilder aCode) -
getModel
Contains various aspects from an Umple file (.ump), such as classes, attributes, associations and methods. Generated output is based off of what's contained in here. -
getOutput
public java.lang.String getOutput() -
getCode
public java.lang.StringBuilder getCode() -
delete
public void delete()- Overrides:
delete
in classCodeGeneratorWithSubptions
-
genCellInt
public java.lang.StringBuilder genCellInt(java.lang.StringBuilder code, int i) -
genCellString
public java.lang.StringBuilder genCellString(java.lang.StringBuilder code, java.lang.String s) -
genCellFloat
public java.lang.StringBuilder genCellFloat(java.lang.StringBuilder code, java.lang.Float f) -
generate
public void generate()Description copied from class:CodeGeneratorWithSubptions
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.- Specified by:
generate
in interfaceCodeGenerator
- Overrides:
generate
in classCodeGeneratorWithSubptions
-
writeModel
public void writeModel()Output the metrics to a file -
_genTopHeader
public java.lang.StringBuilder _genTopHeader(java.lang.Integer numSpaces, java.lang.StringBuilder sb, java.lang.String fn) -
genTopHeader
public java.lang.String genTopHeader(java.lang.String fn) -
_genCell
public java.lang.StringBuilder _genCell(java.lang.Integer numSpaces, java.lang.StringBuilder sb, java.lang.String content) -
genCell
public java.lang.String genCell(java.lang.String content) -
toString
public java.lang.String toString()- Overrides:
toString
in classCodeGeneratorWithSubptions
-