org.codehaus.groovy.ast.tools

## Class GeneralUtils

- java.lang.Object
- - org.codehaus.groovy.ast.tools.GeneralUtils

-     public class GeneralUtils
      extends java.lang.Object

  Handy methods when working with the Groovy AST

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Token` | `AND`
    `static Token` | `ASSIGN`
    `static Token` | `CMP`
    `static Token` | `EQ`
    `static Token` | `LT`
    `static Token` | `NE`
    `static Token` | `OR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeneralUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BinaryExpression` | `andX(Expression lhv, Expression rhv)`
    `static ArgumentListExpression` | `args(Expression... expressions)`
    `static ArgumentListExpression` | `args(java.util.List<Expression> expressions)`
    `static ArgumentListExpression` | `args(Parameter[] parameters)`
    `static ArgumentListExpression` | `args(java.lang.String... names)`
    `static Statement` | `assignS(Expression target, Expression value)`
    `static Expression` | `assignX(Expression target, Expression value)`
    `static Expression` | `attrX(Expression oe, Expression prop)`
    `static BinaryExpression` | `binX(Expression left, Token token, Expression right)`
    `static BlockStatement` | `block(Statement... stmts)`
    `static BlockStatement` | `block(VariableScope varScope, java.util.List<Statement> stmts)`
    `static BlockStatement` | `block(VariableScope varScope, Statement... stmts)`
    `static BooleanExpression` | `boolX(Expression boolExpr)`
    `static MethodCallExpression` | `callSuperX(java.lang.String methodName)`
    `static MethodCallExpression` | `callSuperX(java.lang.String methodName, Expression args)`
    `static MethodCallExpression` | `callThisX(java.lang.String methodName)`
    `static MethodCallExpression` | `callThisX(java.lang.String methodName, Expression args)`
    `static StaticMethodCallExpression` | `callX(ClassNode receiver, java.lang.String methodName)`
    `static StaticMethodCallExpression` | `callX(ClassNode receiver, java.lang.String methodName, Expression args)`
    `static MethodCallExpression` | `callX(Expression receiver, Expression method, Expression args)`
    `static MethodCallExpression` | `callX(Expression receiver, java.lang.String methodName)`
    `static MethodCallExpression` | `callX(Expression receiver, java.lang.String methodName, Expression args)`
    `static CastExpression` | `castX(ClassNode type, Expression expression)`
    `static CastExpression` | `castX(ClassNode type, Expression expression, boolean ignoreAutoboxing)`
    `static CatchStatement` | `catchS(Parameter variable, Statement code)`
    `static ListExpression` | `classList2args(java.util.List<java.lang.String> args)`
    `static ClassExpression` | `classX(java.lang.Class clazz)`
    `static ClassExpression` | `classX(ClassNode clazz)`
    `static Parameter[]` | `cloneParams(Parameter[] source)`
    `static ClosureExpression` | `closureX(Parameter[] params, Statement code)`
    `static ClosureExpression` | `closureX(Statement code)`
    `static BinaryExpression` | `cmpX(Expression lhv, Expression rhv)` Build a binary expression that compares two values
    `static ConstantExpression` | `constX(java.lang.Object val)`
    `static ConstantExpression` | `constX(java.lang.Object val, boolean keepPrimitive)`
    `static java.lang.String` | `convertASTToSource(ReaderSource readerSource, ASTNode expression)` Converts an expression into the String source.
    `static void` | `copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, java.util.List<AnnotationNode> copied, java.util.List<AnnotationNode> notCopied)` Copies all `candidateAnnotations` with retention policy `RetentionPolicy.RUNTIME` and `RetentionPolicy.CLASS`.
    `static boolean` | `copyStatementsWithSuperAdjustment(ClosureExpression pre, BlockStatement body)`
    `static Statement` | `createConstructorStatementDefault(FieldNode fNode)`
    `static Statement` | `ctorSuperS()`
    `static Statement` | `ctorSuperS(Expression args)`
    `static Statement` | `ctorThisS()`
    `static Statement` | `ctorThisS(Expression args)`
    `static ConstructorCallExpression` | `ctorX(ClassNode type)`
    `static ConstructorCallExpression` | `ctorX(ClassNode type, Expression args)`
    `static Statement` | `declS(Expression target, Expression init)`
    `static BooleanExpression` | `equalsNullX(Expression argExpr)`
    `static BinaryExpression` | `eqX(Expression lhv, Expression rhv)`
    `static FieldExpression` | `fieldX(ClassNode owner, java.lang.String fieldName)`
    `static FieldExpression` | `fieldX(FieldNode fieldNode)`
    `static ClassNode` | `findActualTypeByGenericsPlaceholderName(java.lang.String placeholderName, java.util.Map<GenericsType,GenericsType> genericsPlaceholderAndTypeMap)` Get the actual type according to the placeholder name
    `static Expression` | `findArg(java.lang.String argName)`
    `static java.util.List<MethodNode>` | `getAllMethods(ClassNode type)`
    `static java.util.List<PropertyNode>` | `getAllProperties(ClassNode type)`
    `static java.util.List<PropertyNode>` | `getAllProperties(java.util.Set<java.lang.String> names, ClassNode cNode, boolean includeProperties, boolean includeFields, boolean includePseudoGetters, boolean includePseudoSetters, boolean traverseSuperClasses, boolean skipReadonly)`
    `static java.util.List<PropertyNode>` | `getAllProperties(java.util.Set<java.lang.String> names, ClassNode origType, ClassNode cNode, boolean includeProperties, boolean includeFields, boolean includePseudoGetters, boolean includePseudoSetters, boolean traverseSuperClasses, boolean skipReadonly)`
    `static java.util.List<PropertyNode>` | `getAllProperties(java.util.Set<java.lang.String> names, ClassNode origType, ClassNode cNode, boolean includeProperties, boolean includeFields, boolean includePseudoGetters, boolean includePseudoSetters, boolean traverseSuperClasses, boolean skipReadonly, boolean reverse, boolean allNames, boolean includeStatic)`
    `static java.lang.String` | `getGetterName(PropertyNode pNode)`
    `static java.util.List<java.lang.String>` | `getInstanceNonPropertyFieldNames(ClassNode cNode)`
    `static java.util.List<FieldNode>` | `getInstanceNonPropertyFields(ClassNode cNode)`
    `static java.util.List<PropertyNode>` | `getInstanceProperties(ClassNode cNode)`
    `static java.util.List<FieldNode>` | `getInstancePropertyFields(ClassNode cNode)`
    `static java.util.List<java.lang.String>` | `getInstancePropertyNames(ClassNode cNode)`
    `static java.util.Set<ClassNode>` | `getInterfacesAndSuperInterfaces(ClassNode type)`
    `static java.lang.String` | `getSetterName(java.lang.String name)`
    `static java.util.List<FieldNode>` | `getSuperNonPropertyFields(ClassNode cNode)`
    `static java.util.List<FieldNode>` | `getSuperPropertyFields(ClassNode cNode)`
    `static Expression` | `getterThisX(ClassNode annotatedNode, PropertyNode pNode)` This method is similar to `propX(Expression, Expression)` but will make sure that if the property being accessed is defined inside the classnode provided as a parameter, then a getter call is generated instead of a field access.
    `static Expression` | `getterX(ClassNode annotatedNode, Expression receiver, PropertyNode pNode)` This method is similar to `propX(Expression, Expression)` but will make sure that if the property being accessed is defined inside the classnode provided as a parameter, then a getter call is generated instead of a field access.
    `static BinaryExpression` | `hasClassX(Expression instance, ClassNode cNode)`
    `static boolean` | `hasDeclaredMethod(ClassNode cNode, java.lang.String name, int argsCount)`
    `static BinaryExpression` | `hasEqualFieldX(FieldNode fNode, Expression other)`
    `static BinaryExpression` | `hasEqualPropertyX(ClassNode annotatedNode, PropertyNode pNode, VariableExpression other)`
    `static BinaryExpression` | `hasEqualPropertyX(PropertyNode pNode, Expression other)` Deprecated.
    `static BooleanExpression` | `hasSameFieldX(FieldNode fNode, Expression other)`
    `static BooleanExpression` | `hasSamePropertyX(PropertyNode pNode, Expression other)`
    `static Statement` | `ifElseS(Expression cond, Statement thenStmt, Statement elseStmt)`
    `static Statement` | `ifS(Expression cond, Expression trueExpr)`
    `static Statement` | `ifS(Expression cond, Statement trueStmt)`
    `static Expression` | `indexX(Expression target, Expression value)`
    `static boolean` | `inSamePackage(java.lang.Class first, java.lang.Class second)`
    `static boolean` | `inSamePackage(ClassNode first, ClassNode second)`
    `static boolean` | `isDefaultVisibility(int modifiers)`
    `static BooleanExpression` | `isInstanceOfX(Expression objectExpression, ClassNode cNode)`
    `static BooleanExpression` | `isOneX(Expression expr)`
    `static boolean` | `isOrImplements(ClassNode type, ClassNode interfaceType)`
    `static BooleanExpression` | `isTrueX(Expression argExpr)`
    `static BooleanExpression` | `isZeroX(Expression expr)`
    `static ListExpression` | `list2args(java.util.List args)`
    `static BinaryExpression` | `ltX(Expression lhv, Expression rhv)`
    `static java.util.Map<GenericsType,GenericsType>` | `makeDeclaringAndActualGenericsTypeMap(ClassNode declaringClass, ClassNode actualReceiver)` map declaring generics type to actual generics type, e.g.
    `static java.lang.String` | `makeDescriptorWithoutReturnType(MethodNode mn)` Deprecated. use MethodNodeUtils#methodDescriptorWithoutReturnType(MethodNode) instead
    `static BinaryExpression` | `neX(Expression lhv, Expression rhv)`
    `static BooleanExpression` | `notNullX(Expression argExpr)`
    `static NotExpression` | `notX(Expression expr)`
    `static BinaryExpression` | `orX(Expression lhv, Expression rhv)`
    `static Parameter` | `param(ClassNode type, java.lang.String name)`
    `static Parameter` | `param(ClassNode type, java.lang.String name, Expression initialExpression)`
    `static Parameter[]` | `params(Parameter... params)`
    `static BinaryExpression` | `plusX(Expression lhv, Expression rhv)`
    `static Expression` | `propX(Expression owner, Expression property)`
    `static Expression` | `propX(Expression owner, java.lang.String property)`
    `static Statement` | `returnS(Expression expr)`
    `static Statement` | `safeExpression(Expression fieldExpr, Expression expression)`
    `static BooleanExpression` | `sameX(Expression self, Expression other)`
    `static Statement` | `stmt(Expression expr)`
    `static TernaryExpression` | `ternaryX(Expression cond, Expression trueExpr, Expression elseExpr)`
    `static ThrowStatement` | `throwS(Expression expr)`
    `static VariableExpression` | `varX(java.lang.String name)`
    `static VariableExpression` | `varX(java.lang.String name, ClassNode type)`
    `static VariableExpression` | `varX(Variable variable)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ASSIGN

          public static final Token ASSIGN

    - #### EQ

          public static final Token EQ

    - #### NE

          public static final Token NE

    - #### LT

          public static final Token LT

    - #### AND

          public static final Token AND

    - #### OR

          public static final Token OR

    - #### CMP

          public static final Token CMP

  - ### Constructor Detail

    - #### GeneralUtils

          public GeneralUtils()

  - ### Method Detail

    - #### andX

          public static BinaryExpression andX(Expression lhv,
                                              Expression rhv)

    - #### args

          public static ArgumentListExpression args(Expression... expressions)

    - #### args

          public static ArgumentListExpression args(java.util.List<Expression> expressions)

    - #### args

          public static ArgumentListExpression args(Parameter[] parameters)

    - #### args

          public static ArgumentListExpression args(java.lang.String... names)

    - #### assignS

          public static Statement assignS(Expression target,
                                          Expression value)

    - #### assignX

          public static Expression assignX(Expression target,
                                           Expression value)

    - #### attrX

          public static Expression attrX(Expression oe,
                                         Expression prop)

    - #### binX

          public static BinaryExpression binX(Expression left,
                                              Token token,
                                              Expression right)

    - #### block

          public static BlockStatement block(VariableScope varScope,
                                             Statement... stmts)

    - #### block

          public static BlockStatement block(VariableScope varScope,
                                             java.util.List<Statement> stmts)

    - #### block

          public static BlockStatement block(Statement... stmts)

    - #### callSuperX

          public static MethodCallExpression callSuperX(java.lang.String methodName,
                                                        Expression args)

    - #### callSuperX

          public static MethodCallExpression callSuperX(java.lang.String methodName)

    - #### callThisX

          public static MethodCallExpression callThisX(java.lang.String methodName,
                                                       Expression args)

    - #### callThisX

          public static MethodCallExpression callThisX(java.lang.String methodName)

    - #### callX

          public static MethodCallExpression callX(Expression receiver,
                                                   java.lang.String methodName,
                                                   Expression args)

    - #### callX

          public static MethodCallExpression callX(Expression receiver,
                                                   Expression method,
                                                   Expression args)

    - #### callX

          public static MethodCallExpression callX(Expression receiver,
                                                   java.lang.String methodName)

    - #### callX

          public static StaticMethodCallExpression callX(ClassNode receiver,
                                                         java.lang.String methodName,
                                                         Expression args)

    - #### callX

          public static StaticMethodCallExpression callX(ClassNode receiver,
                                                         java.lang.String methodName)

    - #### castX

          public static CastExpression castX(ClassNode type,
                                             Expression expression)

    - #### boolX

          public static BooleanExpression boolX(Expression boolExpr)

    - #### castX

          public static CastExpression castX(ClassNode type,
                                             Expression expression,
                                             boolean ignoreAutoboxing)

    - #### classX

          public static ClassExpression classX(ClassNode clazz)

    - #### classX

          public static ClassExpression classX(java.lang.Class clazz)

    - #### closureX

          public static ClosureExpression closureX(Parameter[] params,
                                                   Statement code)

    - #### closureX

          public static ClosureExpression closureX(Statement code)

    - #### cloneParams

          public static Parameter[] cloneParams(Parameter[] source)

    - #### cmpX

          public static BinaryExpression cmpX(Expression lhv,
                                              Expression rhv)

      Build a binary expression that compares two values
      Parameters:
        `lhv` - expression for the value to compare from
        `rhv` - expression for the value value to compare to
      Returns:
        the expression comparing two values

    - #### constX

          public static ConstantExpression constX(java.lang.Object val)

    - #### constX

          public static ConstantExpression constX(java.lang.Object val,
                                                  boolean keepPrimitive)

    - #### copyAnnotatedNodeAnnotations

          public static void copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode,
                                                          java.util.List<AnnotationNode> copied,
                                                          java.util.List<AnnotationNode> notCopied)

      Copies all `candidateAnnotations` with retention policy `RetentionPolicy.RUNTIME` and `RetentionPolicy.CLASS`.

      Annotations with `GeneratedClosure` members are not supported at present.

    - #### createConstructorStatementDefault

          public static Statement createConstructorStatementDefault(FieldNode fNode)

    - #### ctorX

          public static ConstructorCallExpression ctorX(ClassNode type,
                                                        Expression args)

    - #### ctorX

          public static ConstructorCallExpression ctorX(ClassNode type)

    - #### ctorSuperS

          public static Statement ctorSuperS(Expression args)

    - #### ctorThisS

          public static Statement ctorThisS(Expression args)

    - #### ctorSuperS

          public static Statement ctorSuperS()

    - #### ctorThisS

          public static Statement ctorThisS()

    - #### declS

          public static Statement declS(Expression target,
                                        Expression init)

    - #### eqX

          public static BinaryExpression eqX(Expression lhv,
                                             Expression rhv)

    - #### equalsNullX

          public static BooleanExpression equalsNullX(Expression argExpr)

    - #### fieldX

          public static FieldExpression fieldX(FieldNode fieldNode)

    - #### fieldX

          public static FieldExpression fieldX(ClassNode owner,
                                               java.lang.String fieldName)

    - #### findArg

          public static Expression findArg(java.lang.String argName)

    - #### getAllMethods

          public static java.util.List<MethodNode> getAllMethods(ClassNode type)

    - #### getAllProperties

          public static java.util.List<PropertyNode> getAllProperties(ClassNode type)

    - #### getGetterName

          public static java.lang.String getGetterName(PropertyNode pNode)

    - #### getInstanceNonPropertyFields

          public static java.util.List<FieldNode> getInstanceNonPropertyFields(ClassNode cNode)

    - #### getInstanceNonPropertyFieldNames

          public static java.util.List<java.lang.String> getInstanceNonPropertyFieldNames(ClassNode cNode)

    - #### getInstanceProperties

          public static java.util.List<PropertyNode> getInstanceProperties(ClassNode cNode)

    - #### getInstancePropertyNames

          public static java.util.List<java.lang.String> getInstancePropertyNames(ClassNode cNode)

    - #### getInstancePropertyFields

          public static java.util.List<FieldNode> getInstancePropertyFields(ClassNode cNode)

    - #### getInterfacesAndSuperInterfaces

          public static java.util.Set<ClassNode> getInterfacesAndSuperInterfaces(ClassNode type)

    - #### getSuperNonPropertyFields

          public static java.util.List<FieldNode> getSuperNonPropertyFields(ClassNode cNode)

    - #### getSuperPropertyFields

          public static java.util.List<FieldNode> getSuperPropertyFields(ClassNode cNode)

    - #### getAllProperties

          public static java.util.List<PropertyNode> getAllProperties(java.util.Set<java.lang.String> names,
                                                                      ClassNode cNode,
                                                                      boolean includeProperties,
                                                                      boolean includeFields,
                                                                      boolean includePseudoGetters,
                                                                      boolean includePseudoSetters,
                                                                      boolean traverseSuperClasses,
                                                                      boolean skipReadonly)

    - #### getAllProperties

          public static java.util.List<PropertyNode> getAllProperties(java.util.Set<java.lang.String> names,
                                                                      ClassNode origType,
                                                                      ClassNode cNode,
                                                                      boolean includeProperties,
                                                                      boolean includeFields,
                                                                      boolean includePseudoGetters,
                                                                      boolean includePseudoSetters,
                                                                      boolean traverseSuperClasses,
                                                                      boolean skipReadonly)

    - #### getAllProperties

          public static java.util.List<PropertyNode> getAllProperties(java.util.Set<java.lang.String> names,
                                                                      ClassNode origType,
                                                                      ClassNode cNode,
                                                                      boolean includeProperties,
                                                                      boolean includeFields,
                                                                      boolean includePseudoGetters,
                                                                      boolean includePseudoSetters,
                                                                      boolean traverseSuperClasses,
                                                                      boolean skipReadonly,
                                                                      boolean reverse,
                                                                      boolean allNames,
                                                                      boolean includeStatic)

    - #### hasClassX

          public static BinaryExpression hasClassX(Expression instance,
                                                   ClassNode cNode)

    - #### hasDeclaredMethod

          public static boolean hasDeclaredMethod(ClassNode cNode,
                                                  java.lang.String name,
                                                  int argsCount)

    - #### hasEqualFieldX

          public static BinaryExpression hasEqualFieldX(FieldNode fNode,
                                                        Expression other)

    - #### hasEqualPropertyX

          public static BinaryExpression hasEqualPropertyX(ClassNode annotatedNode,
                                                           PropertyNode pNode,
                                                           VariableExpression other)

    - #### hasEqualPropertyX

          @Deprecated
          public static BinaryExpression hasEqualPropertyX(PropertyNode pNode,
                                                                        Expression other)

      Deprecated.

    - #### hasSameFieldX

          public static BooleanExpression hasSameFieldX(FieldNode fNode,
                                                        Expression other)

    - #### hasSamePropertyX

          public static BooleanExpression hasSamePropertyX(PropertyNode pNode,
                                                           Expression other)

    - #### ifElseS

          public static Statement ifElseS(Expression cond,
                                          Statement thenStmt,
                                          Statement elseStmt)

    - #### ifS

          public static Statement ifS(Expression cond,
                                      Expression trueExpr)

    - #### ifS

          public static Statement ifS(Expression cond,
                                      Statement trueStmt)

    - #### indexX

          public static Expression indexX(Expression target,
                                          Expression value)

    - #### isInstanceOfX

          public static BooleanExpression isInstanceOfX(Expression objectExpression,
                                                        ClassNode cNode)

    - #### isOneX

          public static BooleanExpression isOneX(Expression expr)

    - #### isOrImplements

          public static boolean isOrImplements(ClassNode type,
                                               ClassNode interfaceType)

    - #### isTrueX

          public static BooleanExpression isTrueX(Expression argExpr)

    - #### isZeroX

          public static BooleanExpression isZeroX(Expression expr)

    - #### list2args

          public static ListExpression list2args(java.util.List args)

    - #### classList2args

          public static ListExpression classList2args(java.util.List<java.lang.String> args)

    - #### ltX

          public static BinaryExpression ltX(Expression lhv,
                                             Expression rhv)

    - #### makeDescriptorWithoutReturnType

          @Deprecated
          public static java.lang.String makeDescriptorWithoutReturnType(MethodNode mn)

      Deprecated. use MethodNodeUtils#methodDescriptorWithoutReturnType(MethodNode) instead

    - #### neX

          public static BinaryExpression neX(Expression lhv,
                                             Expression rhv)

    - #### notNullX

          public static BooleanExpression notNullX(Expression argExpr)

    - #### notX

          public static NotExpression notX(Expression expr)

    - #### orX

          public static BinaryExpression orX(Expression lhv,
                                             Expression rhv)

    - #### param

          public static Parameter param(ClassNode type,
                                        java.lang.String name)

    - #### param

          public static Parameter param(ClassNode type,
                                        java.lang.String name,
                                        Expression initialExpression)

    - #### params

          public static Parameter[] params(Parameter... params)

    - #### plusX

          public static BinaryExpression plusX(Expression lhv,
                                               Expression rhv)

    - #### propX

          public static Expression propX(Expression owner,
                                         java.lang.String property)

    - #### propX

          public static Expression propX(Expression owner,
                                         Expression property)

    - #### returnS

          public static Statement returnS(Expression expr)

    - #### safeExpression

          public static Statement safeExpression(Expression fieldExpr,
                                                 Expression expression)

    - #### sameX

          public static BooleanExpression sameX(Expression self,
                                                Expression other)

    - #### stmt

          public static Statement stmt(Expression expr)

    - #### ternaryX

          public static TernaryExpression ternaryX(Expression cond,
                                                   Expression trueExpr,
                                                   Expression elseExpr)

    - #### varX

          public static VariableExpression varX(java.lang.String name)

    - #### varX

          public static VariableExpression varX(Variable variable)

    - #### varX

          public static VariableExpression varX(java.lang.String name,
                                                ClassNode type)

    - #### throwS

          public static ThrowStatement throwS(Expression expr)

    - #### catchS

          public static CatchStatement catchS(Parameter variable,
                                              Statement code)

    - #### getterThisX

          public static Expression getterThisX(ClassNode annotatedNode,
                                               PropertyNode pNode)

      This method is similar to `propX(Expression, Expression)` but will make sure that if the property being accessed is defined inside the classnode provided as a parameter, then a getter call is generated instead of a field access.
      Parameters:
        `annotatedNode` - the class node where the property node is accessed from
        `pNode` - the property being accessed
      Returns:
        a method call expression or a property expression

    - #### getterX

          public static Expression getterX(ClassNode annotatedNode,
                                           Expression receiver,
                                           PropertyNode pNode)

      This method is similar to `propX(Expression, Expression)` but will make sure that if the property being accessed is defined inside the classnode provided as a parameter, then a getter call is generated instead of a field access.
      Parameters:
        `annotatedNode` - the class node where the property node is accessed from
        `receiver` - the object having the property
        `pNode` - the property being accessed
      Returns:
        a method call expression or a property expression

    - #### convertASTToSource

          public static java.lang.String convertASTToSource(ReaderSource readerSource,
                                                            ASTNode expression)
                                                     throws java.lang.Exception

      Converts an expression into the String source. Only some specific expressions like closure expression support this.
      Parameters:
        `readerSource` - a source
        `expression` - an expression. Can't be null
      Returns:
        the source the closure was created from
      Throws:
        `java.lang.IllegalArgumentException` - when expression is null
        `java.lang.Exception` - when closure can't be read from source

    - #### copyStatementsWithSuperAdjustment

          public static boolean copyStatementsWithSuperAdjustment(ClosureExpression pre,
                                                                  BlockStatement body)

    - #### getSetterName

          public static java.lang.String getSetterName(java.lang.String name)

    - #### isDefaultVisibility

          public static boolean isDefaultVisibility(int modifiers)

    - #### inSamePackage

          public static boolean inSamePackage(ClassNode first,
                                              ClassNode second)

    - #### inSamePackage

          public static boolean inSamePackage(java.lang.Class first,
                                              java.lang.Class second)

    - #### makeDeclaringAndActualGenericsTypeMap

          public static java.util.Map<GenericsType,GenericsType> makeDeclaringAndActualGenericsTypeMap(ClassNode declaringClass,
                                                                                                       ClassNode actualReceiver)

      map declaring generics type to actual generics type, e.g. GROOVY-7204: declaring generics types: T, S extends Serializable actual generics types : String, Long the result map is [ T: String, S: Long ] The resolved types can not help us to choose methods correctly if the argument is a string: T: Object, S: Serializable so we need actual types: T: String, S: Long

    - #### findActualTypeByGenericsPlaceholderName

          public static ClassNode findActualTypeByGenericsPlaceholderName(java.lang.String placeholderName,
                                                                          java.util.Map<GenericsType,GenericsType> genericsPlaceholderAndTypeMap)

      Get the actual type according to the placeholder name
      Parameters:
        `placeholderName` - the placeholder name, e.g. T, E
        `genericsPlaceholderAndTypeMap` - the result of `#makeDeclaringAndActualGenericsTypeMap(ClassNode, ClassNode`
      Returns:
        the actual type