Class PythonCodeText
java.lang.Object
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeText
- All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider,net.ssehub.easy.instantiation.core.model.vilTypes.IVilType,IPythonCodeElement,Storable
Represents a not further refined/refinable text Python expression/statement in VTL. The raw text may consist of
multiple lines. If no indentation is requested, the raw text is emitted as given. Applies
PseudoString.content(String) to handle empty content expressions.- Author:
- Kevin Schaperjahn
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturns whether this element is an empty line.voidsetParent(IPythonCodeElement parent) voidstore(net.ssehub.easy.instantiation.core.model.templateModel.CodeWriter out) Methods 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, isAttribute, isBlock, isClass, moveToAttributes, moveToImports
-
Field Details
-
rawText
-
indent
private boolean indent -
endWithNewline
private boolean endWithNewline
-
-
Constructor Details
-
PythonCodeText
-
-
Method Details
-
store
public void store(net.ssehub.easy.instantiation.core.model.templateModel.CodeWriter out) -
getArtifact
- Specified by:
getArtifactin interfaceIPythonCodeElement
-
getParent
- Specified by:
getParentin interfaceIPythonCodeElement
-
setParent
- Specified by:
setParentin interfaceIPythonCodeElement
-
getElementCount
public int getElementCount()- Specified by:
getElementCountin interfaceStorable
-
isEmptyLine
public boolean isEmptyLine()Description copied from interface:IPythonCodeElementReturns whether this element is an empty line.- Specified by:
isEmptyLinein interfaceIPythonCodeElement- Returns:
truefor empty line,falseelse
-