Class PythonCodeFunction
java.lang.Object
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeElement
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeStmt
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeBlock
net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeFunction
- All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider,net.ssehub.easy.instantiation.core.model.vilTypes.IVilType,IPythonCodeElement,Storable
Represents a Python function in VTL.
- 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
FieldsModifier and TypeFieldDescriptionprivate PythonCodeDocCommentprivate List<PythonCodeDecorator> private Stringprivate List<PythonCodeParamSpec> private PythonCodeTypeSpecFields inherited from interface net.ssehub.easy.instantiation.python.codeArtifacts.IPythonCodeElement
KEY_COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionPythonCodeFunction(IPythonCodeElement parent, String name) PythonCodeFunction(IPythonCodeElement parent, String name, String comment) -
Method Summary
Modifier and TypeMethodDescriptionaddDecorator(String name) addDecorator(String name, PythonCodeImportScope scope) addParameter(String name) addParameter(String name, String type) addParameter(String name, String type, String comment) addParameter(String name, PythonCodeTypeSpec type) addParameter(String name, PythonCodeTypeSpec type, String comment) Adds raising a NotImplementedError.addRetType(String type) addRetType(String type, String comment) Returns the comment object.setClass()voidstore(net.ssehub.easy.instantiation.core.model.templateModel.CodeWriter out) Methods inherited from class net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeBlock
add, addAssert, addAssert, addAssign, addAssign, addBreak, addCall, addCall, addClass, addClass, addComment, addContinue, addDelete, addElt, addElt, addEmptyLine, addEnum, addEnum, addFor, addFor, addFor, addFunc, addFunc, addGlobal, addIf, addMatch, addNonLocal, addPass, addPrint, addRaise, addRaw, addReturn, addSelfCall, addSLComment, addSLComment, addSuperCall, addSuperConstructorCall, addTry, addTypeAlias, addWhile, addWith, addWith, getArtifact, getElementCount, getParentClass, isBlock, moveToImports, setBlockMethods inherited from class net.ssehub.easy.instantiation.python.codeArtifacts.PythonCodeElement
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, isAttribute, isClass, isEmptyLine, moveToAttributes
-
Field Details
-
name
-
retType
-
comment
-
decorators
-
params
-
-
Constructor Details
-
PythonCodeFunction
-
PythonCodeFunction
-
-
Method Details
-
addParameter
-
addParameter
-
addParameter
-
addParameter
-
addParameter
-
addReturn
-
addRetType
-
addRetType
-
addDecorator
-
addDecorator
-
addRaiseNotImplementedError
Adds raising a NotImplementedError.- Returns:
- the raise statement (for chaining)
-
setClass
-
setStatic
-
getComment
Returns the comment object.- Returns:
- the comment object, may be null
-
store
public void store(net.ssehub.easy.instantiation.core.model.templateModel.CodeWriter out) - Specified by:
storein interfaceStorable- Overrides:
storein classPythonCodeBlock
-