Package: org.codehaus.groovy.transform.stc

## [Java] Class GroovyTypeCheckingExtensionSupport

- org.codehaus.groovy.transform.stc.GroovyTypeCheckingExtensionSupport

- Base class for type checking extensions written in Groovy. Compared to its superclass, TypeCheckingExtension, this class adds a number of utility methods aimed at leveraging the syntax of the Groovy language to improve expressivity and conciseness.

  Since:
    2.1.0

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `GroovyTypeCheckingExtensionSupport.TypeCheckingDSL` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractTypeCheckingExtension` | `context, debug, handled`
    `class TypeCheckingExtension` | `typeCheckingVisitor`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovyTypeCheckingExtensionSupport (StaticTypeCheckingVisitor typeCheckingVisitor, String scriptPath, CompilationUnit compilationUnit)` Builds a type checking extension relying on a Groovy script (type checking DSL).

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `afterMethodCall(MethodCall call)`
    `` | `void` | `afterVisitClass(ClassNode node)`
    `` | `void` | `afterVisitMethod(MethodNode node)`
    `` | `boolean` | `beforeMethodCall(MethodCall call)`
    `` | `boolean` | `beforeVisitClass(ClassNode node)`
    `` | `boolean` | `beforeVisitMethod(MethodNode node)`
    `` | `void` | `finish()`
    `` | `List<MethodNode>` | `handleAmbiguousMethods(List<MethodNode> nodes, Expression origin)`
    `` | `boolean` | `handleIncompatibleAssignment(ClassNode lhsType, ClassNode rhsType, Expression assignmentExpression)`
    `` | `boolean` | `handleIncompatibleReturnType(ReturnStatement returnStatement, ClassNode inferredReturnType)`
    `` | `List<MethodNode>` | `handleMissingMethod(ClassNode receiver, String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)`
    `` | `boolean` | `handleUnresolvedAttribute(AttributeExpression aexp)`
    `` | `boolean` | `handleUnresolvedProperty(PropertyExpression pexp)`
    `` | `boolean` | `handleUnresolvedVariableExpression(VariableExpression vexp)`
    `` | `void` | `onMethodSelection(Expression expression, MethodNode target)`
    `` | `void` | `setDebug(boolean debug)`
    `` | `void` | `setup()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractTypeCheckingExtension` | `argTypeMatches, argTypeMatches, argTypesMatches, argTypesMatches, delegatesTo, delegatesTo, delegatesTo, firstArgTypesMatches, firstArgTypesMatches, getArguments, getCurrentScope, getEnclosingBinaryExpression, getEnclosingBinaryExpressionStack, getEnclosingClassNode, getEnclosingClassNodes, getEnclosingClosure, getEnclosingClosureStack, getEnclosingMethod, getEnclosingMethodCall, getEnclosingMethodCalls, getEnclosingMethods, getGeneratedMethods, getReturnType, isAnnotatedBy, isAnnotatedBy, isDynamic, isExtensionMethod, isGenerated, isMethodCall, log, makeDynamic, makeDynamic, makeDynamic, makeDynamic, makeDynamic, makeDynamic, newMethod, newMethod, newMethod, newScope, newScope, popEnclosingBinaryExpression, popEnclosingClassNode, popEnclosingClosure, popEnclosingMethod, popEnclosingMethodCall, popTemporaryTypeInfo, pushEnclosingBinaryExpression, pushEnclosingClassNode, pushEnclosingClosureExpression, pushEnclosingMethod, pushEnclosingMethodCall, pushTemporaryTypeInfo, safeCall, scopeExit, scopeExit, setHandled, unique, withTypeChecker`
    `class TypeCheckingExtension` | `addStaticTypeError, afterMethodCall, afterVisitClass, afterVisitMethod, beforeMethodCall, beforeVisitClass, beforeVisitMethod, buildListType, buildMapType, classNodeFor, classNodeFor, existsProperty, existsProperty, extractStaticReceiver, finish, getArgumentTypes, getTargetMethod, getType, handleAmbiguousMethods, handleIncompatibleAssignment, handleIncompatibleReturnType, handleMissingMethod, handleUnresolvedAttribute, handleUnresolvedProperty, handleUnresolvedVariableExpression, isStaticMethodCallOnClass, lookupClassNodeFor, onMethodSelection, parameterizedType, setup, storeType`

- - ### Constructor Detail

    - #### public GroovyTypeCheckingExtensionSupport(StaticTypeCheckingVisitor typeCheckingVisitor, String scriptPath, CompilationUnit compilationUnit)

      Builds a type checking extension relying on a Groovy script (type checking DSL).

      Parameters:
        `typeCheckingVisitor` - the type checking visitor
        `scriptPath` - the path to the type checking script (in classpath)
        compilationUnit

  - ### Method Detail

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void afterMethodCall(MethodCall call)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void afterVisitClass(ClassNode node)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void afterVisitMethod(MethodNode node)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean beforeMethodCall(MethodCall call)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean beforeVisitClass(ClassNode node)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean beforeVisitMethod(MethodNode node)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void finish()

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride @com.github.javaparser.ast.expr.SingleMemberAnnotationExprSuppressWarnings public List<MethodNode> handleAmbiguousMethods(List<MethodNode> nodes, Expression origin)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean handleIncompatibleAssignment(ClassNode lhsType, ClassNode rhsType, Expression assignmentExpression)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean handleIncompatibleReturnType(ReturnStatement returnStatement, ClassNode inferredReturnType)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride @com.github.javaparser.ast.expr.SingleMemberAnnotationExprSuppressWarnings public List<MethodNode> handleMissingMethod(ClassNode receiver, String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean handleUnresolvedAttribute(AttributeExpression aexp)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean handleUnresolvedProperty(PropertyExpression pexp)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean handleUnresolvedVariableExpression(VariableExpression vexp)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void onMethodSelection(Expression expression, MethodNode target)

    - #### public void setDebug(boolean debug)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void setup()