java.lang.Object
org.jenkinsci.plugins.pipeline.modeldefinition.parser.ASTParserUtils
All Implemented Interfaces:
groovy.lang.GroovyObject

public class ASTParserUtils extends Object implements groovy.lang.GroovyObject
  • Constructor Details

    • ASTParserUtils

      public ASTParserUtils()
  • Method Details

    • prettyPrint

      public static String prettyPrint(org.codehaus.groovy.ast.ASTNode n)
    • isDeclarativePipelineStep

      public static boolean isDeclarativePipelineStep(org.codehaus.groovy.ast.stmt.Statement stmt)
    • getMetaClass

      public groovy.lang.MetaClass getMetaClass()
      Specified by:
      getMetaClass in interface groovy.lang.GroovyObject
    • setMetaClass

      public void setMetaClass(groovy.lang.MetaClass mc)
      Specified by:
      setMetaClass in interface groovy.lang.GroovyObject
    • invokeMethod

      public Object invokeMethod(String method, Object arguments)
      Specified by:
      invokeMethod in interface groovy.lang.GroovyObject
    • getProperty

      public Object getProperty(String property)
      Specified by:
      getProperty in interface groovy.lang.GroovyObject
    • setProperty

      public void setProperty(String property, Object value)
      Specified by:
      setProperty in interface groovy.lang.GroovyObject
    • matchMethodName

      @CheckForNull public static String matchMethodName(org.codehaus.groovy.ast.expr.MethodCallExpression exp)
    • printer

      public static String printer(String s, int ind)
    • prettyPrint

      public static String prettyPrint(org.codehaus.groovy.ast.ASTNode n, int ind)
    • blockStatementFromExpression

      @CheckForNull public static BlockStatementMatch blockStatementFromExpression(@NonNull org.codehaus.groovy.ast.expr.MethodCallExpression exp)
    • asBlock

      public static org.codehaus.groovy.ast.stmt.BlockStatement asBlock(org.codehaus.groovy.ast.stmt.Statement st)
    • matchMethodCall

      @CheckForNull public static org.codehaus.groovy.ast.expr.MethodCallExpression matchMethodCall(org.codehaus.groovy.ast.stmt.Statement st)
    • eachStatement

      public static <T> List<T> eachStatement(org.codehaus.groovy.ast.stmt.Statement st, groovy.lang.Closure<T> c)
    • matchBlockStatement

      @CheckForNull public static BlockStatementMatch matchBlockStatement(org.codehaus.groovy.ast.stmt.Statement st)
    • transformListOfDescribables

      @NonNull public static org.codehaus.groovy.ast.expr.Expression transformListOfDescribables(@CheckForNull List<org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTElement> children, Class<? extends Describable> descClass)
    • transformDescribableContainer

      public static org.codehaus.groovy.ast.expr.Expression transformDescribableContainer(@CheckForNull org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTElement original, @CheckForNull List<org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTElement> children, @NonNull Class containerClass, @NonNull Class<? extends Describable> descClass)
    • transformWhenContentToRuntimeAST

      public static org.codehaus.groovy.ast.expr.Expression transformWhenContentToRuntimeAST(@CheckForNull org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTWhenContent original)
    • recurseAndTransformMappedClosure

      @CheckForNull public static org.codehaus.groovy.ast.expr.MapExpression recurseAndTransformMappedClosure(@CheckForNull org.codehaus.groovy.ast.expr.ClosureExpression original)
    • argsMap

      @CheckForNull public static org.codehaus.groovy.ast.expr.Expression argsMap(List<org.codehaus.groovy.ast.expr.Expression> args)
    • methodCallArgs

      @NonNull public static List<org.codehaus.groovy.ast.expr.Expression> methodCallArgs(@NonNull org.codehaus.groovy.ast.expr.MethodCallExpression expr)
    • methodCallToDescribable

      @CheckForNull public static org.codehaus.groovy.ast.expr.Expression methodCallToDescribable(org.codehaus.groovy.ast.expr.MethodCallExpression expr, Class<? extends Describable> descClass)
    • isGroovyAST

      public static boolean isGroovyAST(org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTElement original)
    • blockHasMethod

      public static boolean blockHasMethod(org.codehaus.groovy.ast.stmt.BlockStatement block, String methodName)
    • isDeclarativePipelineStep

      public static boolean isDeclarativePipelineStep(org.codehaus.groovy.ast.stmt.Statement stmt, boolean topLevel)