Package: org.codehaus.groovy.transform.stc

## [Java] Class GroovyTypeCheckingExtensionSupport

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

-     public class GroovyTypeCheckingExtensionSupport
      extends AbstractTypeCheckingExtension

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

    - #### @Override public void afterMethodCall(MethodCall call)

    - #### @Override public void afterVisitClass(ClassNode node)

    - #### @Override public void afterVisitMethod(MethodNode node)

    - #### @Override public boolean beforeMethodCall(MethodCall call)

    - #### @Override public boolean beforeVisitClass(ClassNode node)

    - #### @Override public boolean beforeVisitMethod(MethodNode node)

    - #### @Override public void finish()

    - #### @Override @SuppressWarnings("unchecked") public List<MethodNode> handleAmbiguousMethods(List<MethodNode> nodes, Expression origin)

    - #### @Override public boolean handleIncompatibleAssignment(ClassNode lhsType, ClassNode rhsType, Expression assignmentExpression)

    - #### @Override public boolean handleIncompatibleReturnType(ReturnStatement returnStatement, ClassNode inferredReturnType)

    - #### @Override @SuppressWarnings("unchecked") public List<MethodNode> handleMissingMethod(ClassNode receiver, String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)

    - #### @Override public boolean handleUnresolvedAttribute(AttributeExpression aexp)

    - #### @Override public boolean handleUnresolvedProperty(PropertyExpression pexp)

    - #### @Override public boolean handleUnresolvedVariableExpression(VariableExpression vexp)

    - #### @Override public void onMethodSelection(Expression expression, MethodNode target)

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

    - #### @Override public void setup()