Class AbstractModelASTCodeBlock
- java.lang.Object
-
- org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTElement
-
- org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTStep
-
- org.jenkinsci.plugins.pipeline.modeldefinition.ast.AbstractModelASTCodeBlock
-
- All Implemented Interfaces:
ModelASTMarkerInterface
- Direct Known Subclasses:
ModelASTScriptBlock
,ModelASTWhenExpression
public abstract class AbstractModelASTCodeBlock extends ModelASTStep
Represents the special step which are executed without validation against the declarative subset.- See Also:
ModelASTScriptBlock
,ModelASTWhenExpression
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractModelASTCodeBlock(Object sourceLocation, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
codeBlockAsString()
boolean
equals(Object o)
protected ModelASTValue
getSingleValue()
protected boolean
isLiteralSingleArg()
String
toGroovy()
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.String
toString()
-
Methods inherited from class org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTStep
blockedStepsBase, getArgs, getBlockedSteps, getName, hashCode, removeSourceLocation, setArgs, setName, toJSON, validate
-
Methods inherited from class org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTElement
getSourceLocation, nullIfEmpty, removeSourceLocationsFrom, removeSourceLocationsFrom, removeSourceLocationsFrom, removeSourceLocationsFrom, setSourceLocation, toGroovy, toGroovy, toGroovyArgList, toGroovyArgList, toGroovyBlock, toGroovyBlock, toGroovyBlock, toGroovyCheckEmpty, toJSON, toJSONArray, toJSONArray, toJSONCheckEmpty, toJSONObject, validate, validate, validate
-
-
-
-
Method Detail
-
toGroovy
@NonNull public String toGroovy()
Description copied from class:ModelASTElement
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.- Specified by:
toGroovy
in interfaceModelASTMarkerInterface
- Overrides:
toGroovy
in classModelASTStep
- Returns:
- A simple
String
of Groovy code for this element and its children.
-
codeBlockAsString
public String codeBlockAsString()
-
getSingleValue
protected ModelASTValue getSingleValue()
-
isLiteralSingleArg
protected boolean isLiteralSingleArg()
-
equals
public boolean equals(Object o)
Description copied from class:ModelASTElement
- Overrides:
equals
in classModelASTStep
-
toString
public String toString()
Description copied from class:ModelASTElement
- Overrides:
toString
in classModelASTStep
-
-