Package cruise.umple.compiler
Class PhpGenerator
java.lang.Object
cruise.umple.compiler.CodeGeneratorWithSubptions
cruise.umple.compiler.SuperCodeGenerator
cruise.umple.compiler.PhpGenerator
- All Implemented Interfaces:
CodeGenerator
,CodeTranslator
- Direct Known Subclasses:
Uigu2Generator
public class PhpGenerator extends SuperCodeGenerator implements CodeTranslator
-
Field Summary
Fields inherited from class cruise.umple.compiler.SuperCodeGenerator
ConstraintLookupMap, TraceLookupMap, UmpleToPrimitiveMap
-
Constructor Summary
Constructors Constructor Description PhpGenerator()
-
Method Summary
Modifier and Type Method Description void
delete()
void
generate()
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.ILang
getLanguageFor(UmpleElement aElement)
void
initializeLangaugeBasedVariables()
boolean
isNullable(UmpleVariable av)
java.lang.String
nameOf(java.lang.String name, boolean hasMultiple)
void
prepare()
Allows independent code generation tools Different generators will do different things regarding where the files are put, etc.java.lang.String
relatedTranslate(java.lang.String name, AssociationVariable av)
java.lang.String
translate(java.lang.String methodType)
java.lang.String
translate(java.lang.String keyName, Activity a)
java.lang.String
translate(java.lang.String keyName, AssociationVariable av)
java.lang.String
translate(java.lang.String keyName, Attribute av)
java.lang.String
translate(java.lang.String keyName, Event event)
java.lang.String
translate(java.lang.String keyName, State state)
java.lang.String
translate(java.lang.String keyName, StateMachine sm)
java.lang.String
translate(java.lang.String keyName, UmpleClass aClass)
java.lang.String
translate(java.lang.String name, UmpleInterface aInterface)
java.lang.String
translateInterfaceValue(java.lang.String value, java.lang.String type)
Translates Date and Time values, has to be used for interfaces as they do not use attributes.static java.lang.String
typeOf(java.lang.String aType)
java.lang.String
umpleCVarToLanguagePrimitive(java.lang.String name, ConstraintVariable expr)
Methods inherited from class cruise.umple.compiler.SuperCodeGenerator
getConstraintWithinConstructor, getDontDisplayNextAccessor, getModel, getOutput, getParameterConstraintName, getType, isConstraintWithinConstructor, isDontDisplayNextAccessor, postpare, prepareConstraint, prepareConstraints, setConstraintWithinConstructor, setDontDisplayNextAccessor, setModel, setOutput, setParameterConstraintName, toString, translate, translate, translate
Methods inherited from class cruise.umple.compiler.CodeGeneratorWithSubptions
addSuboption, getSuboption, getSuboptions, getSuboptionValue, hasSuboption, hasSuboptions, indexOfSuboption, numberOfSuboptions, removeSuboption, setSuboption
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface cruise.umple.compiler.CodeTranslator
translate, translate, translate
-
Constructor Details
-
PhpGenerator
public PhpGenerator()
-
-
Method Details
-
delete
public void delete()- Overrides:
delete
in classSuperCodeGenerator
-
prepare
public void prepare()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:
prepare
in interfaceCodeGenerator
- Overrides:
prepare
in classCodeGeneratorWithSubptions
-
isNullable
-
relatedTranslate
-
getLanguageFor
-
translate
-
translate
public java.lang.String translate(java.lang.String methodType) -
translate
-
translate
- Specified by:
translate
in interfaceCodeTranslator
-
translate
- Specified by:
translate
in interfaceCodeTranslator
-
translateInterfaceValue
public java.lang.String translateInterfaceValue(java.lang.String value, java.lang.String type)Translates Date and Time values, has to be used for interfaces as they do not use attributes. -
translate
- Specified by:
translate
in interfaceCodeTranslator
-
translate
- Specified by:
translate
in interfaceCodeTranslator
-
translate
- Specified by:
translate
in interfaceCodeTranslator
-
translate
- Specified by:
translate
in interfaceCodeTranslator
-
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
-
nameOf
public java.lang.String nameOf(java.lang.String name, boolean hasMultiple) -
typeOf
public static java.lang.String typeOf(java.lang.String aType) -
umpleCVarToLanguagePrimitive
public java.lang.String umpleCVarToLanguagePrimitive(java.lang.String name, ConstraintVariable expr)- Overrides:
umpleCVarToLanguagePrimitive
in classSuperCodeGenerator
-
initializeLangaugeBasedVariables
public void initializeLangaugeBasedVariables()- Specified by:
initializeLangaugeBasedVariables
in classSuperCodeGenerator
-