Class PythonCodeEnum.PythonCodeEnumLiteral
java.lang.Object
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeElement
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeStmt
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeAssign
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeEnum.PythonCodeEnumLiteral
- All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider,net.ssehub.easy.instantiation.core.model.vilTypes.IVilType,IPythonCodeElement,Storable
- Enclosing class:
PythonCodeEnum
Represents an enum literal with comment.
- Author:
- Holger Eichelberger
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider
net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider.StringComparator -
Field Summary
FieldsFields inherited from interface net.ssehub.easy.instantiation.python.codeArtifacts.IPythonCodeElement
KEY_COMPARATOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePythonCodeEnumLiteral(IPythonCodeElement parent, String varName, String expr, String comment) Creates a literal. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this element is a (class) property/attribute.voidstore(net.ssehub.easy.instantiation.core.model.templateModel.CodeWriter out) Methods inherited from class net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeAssign
addCall, addCall, addConstructorCall, toAttributes, toAttributesMethods inherited from class net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeElement
getArtifact, getParent, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.ssehub.easy.instantiation.python.codeArtifacts.IPythonCodeElement
addAll, getSortKey, getStringValue, getTopClass, getTracerStringValue, hasPythondocComment, isBlock, isClass, isEmptyLine, moveToAttributes, moveToImportsMethods inherited from interface net.ssehub.easy.instantiation.python.codeArtifacts.Storable
getElementCount, toCode
-
Field Details
-
comment
-
-
Constructor Details
-
PythonCodeEnumLiteral
private PythonCodeEnumLiteral(IPythonCodeElement parent, String varName, String expr, String comment) Creates a literal.- Parameters:
parent- the parentvarName- the variable nameexpr- the value expressioncomment- optional comment, may be null or empty for none
-
-
Method Details
-
store
public void store(net.ssehub.easy.instantiation.core.model.templateModel.CodeWriter out) - Specified by:
storein interfaceStorable- Overrides:
storein classPythonCodeAssign
-
isAttribute
public boolean isAttribute()Description copied from interface:IPythonCodeElementReturns whether this element is a (class) property/attribute.- Specified by:
isAttributein interfaceIPythonCodeElement- Overrides:
isAttributein classPythonCodeAssign- Returns:
truefor attribute,falseelse
-