Package cruise.umple.compiler
Class SuperCodeGenerator
java.lang.Object
cruise.umple.compiler.CodeGeneratorWithSubptions
cruise.umple.compiler.SuperCodeGenerator
- All Implemented Interfaces:
CodeGenerator
,CodeTranslator
- Direct Known Subclasses:
JavaGenerator
,PhpGenerator
,RubyGenerator
,SqlGenerator
,UmpleGenerator
public abstract class SuperCodeGenerator extends CodeGeneratorWithSubptions implements CodeTranslator
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>
ConstraintLookupMap
protected java.util.Map<java.lang.String,java.lang.String>
TraceLookupMap
protected java.util.Map<java.lang.String,java.lang.String>
UmpleToPrimitiveMap
-
Constructor Summary
Constructors Constructor Description SuperCodeGenerator()
-
Method Summary
Modifier and Type Method Description void
delete()
boolean
getConstraintWithinConstructor()
boolean
getDontDisplayNextAccessor()
UmpleModel
getModel()
java.lang.String
getOutput()
java.lang.String
getParameterConstraintName()
java.lang.String
getType(UmpleVariable av)
abstract void
initializeLangaugeBasedVariables()
boolean
isConstraintWithinConstructor()
boolean
isDontDisplayNextAccessor()
void
postpare()
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.void
prepareConstraint(ConstraintVariable cur, ConstraintTree ac, ConstraintTree head, java.util.Map<java.lang.String,ConstraintTree> setters, java.util.Map<java.lang.String,UmpleClassifier> uClassifiers, int constraintNum)
void
prepareConstraints(UmpleClass aClass)
boolean
setConstraintWithinConstructor(boolean aConstraintWithinConstructor)
boolean
setDontDisplayNextAccessor(boolean aDontDisplayNextAccessor)
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.boolean
setParameterConstraintName(java.lang.String aParameterConstraintName)
java.lang.String
toString()
java.lang.String
translate(java.lang.String format, ConstraintTree constraint)
java.lang.String
translate(java.lang.String id, ConstraintVariable cv)
java.lang.String
translate(java.lang.String keyName, TraceItem ti)
java.lang.String
umpleCVarToLanguagePrimitive(java.lang.String name, ConstraintVariable expr)
Methods inherited from class cruise.umple.compiler.CodeGeneratorWithSubptions
addSuboption, generate, getSuboption, getSuboptions, getSuboptionValue, hasSuboption, hasSuboptions, indexOfSuboption, numberOfSuboptions, prepare, removeSuboption, setSuboption
-
Field Details
-
UmpleToPrimitiveMap
protected java.util.Map<java.lang.String,java.lang.String> UmpleToPrimitiveMap -
TraceLookupMap
protected java.util.Map<java.lang.String,java.lang.String> TraceLookupMap -
ConstraintLookupMap
protected java.util.Map<java.lang.String,java.lang.String> ConstraintLookupMap
-
-
Constructor Details
-
SuperCodeGenerator
public SuperCodeGenerator()
-
-
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
-
setParameterConstraintName
public boolean setParameterConstraintName(java.lang.String aParameterConstraintName) -
setDontDisplayNextAccessor
public boolean setDontDisplayNextAccessor(boolean aDontDisplayNextAccessor) -
setConstraintWithinConstructor
public boolean setConstraintWithinConstructor(boolean aConstraintWithinConstructor) -
getModel
-
getOutput
public java.lang.String getOutput() -
getParameterConstraintName
public java.lang.String getParameterConstraintName() -
getDontDisplayNextAccessor
public boolean getDontDisplayNextAccessor() -
getConstraintWithinConstructor
public boolean getConstraintWithinConstructor() -
isDontDisplayNextAccessor
public boolean isDontDisplayNextAccessor() -
isConstraintWithinConstructor
public boolean isConstraintWithinConstructor() -
delete
public void delete()- Overrides:
delete
in classCodeGeneratorWithSubptions
-
postpare
public void postpare()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:
postpare
in interfaceCodeGenerator
- Overrides:
postpare
in classCodeGeneratorWithSubptions
-
initializeLangaugeBasedVariables
public abstract void initializeLangaugeBasedVariables() -
getType
-
translate
- Specified by:
translate
in interfaceCodeTranslator
-
translate
- Specified by:
translate
in interfaceCodeTranslator
-
umpleCVarToLanguagePrimitive
public java.lang.String umpleCVarToLanguagePrimitive(java.lang.String name, ConstraintVariable expr) -
translate
- Specified by:
translate
in interfaceCodeTranslator
-
prepareConstraint
public void prepareConstraint(ConstraintVariable cur, ConstraintTree ac, ConstraintTree head, java.util.Map<java.lang.String,ConstraintTree> setters, java.util.Map<java.lang.String,UmpleClassifier> uClassifiers, int constraintNum) -
prepareConstraints
-
toString
public java.lang.String toString()- Overrides:
toString
in classCodeGeneratorWithSubptions
-