Package: org.codehaus.groovy.transform.stc

## [Java] Class TraitTypeCheckingExtension

- org.codehaus.groovy.transform.stc.TraitTypeCheckingExtension

-     public class TraitTypeCheckingExtension
      extends AbstractTypeCheckingExtension

  An extension that handles field, super and static method calls within a trait.

  Since:
    2.3.0

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

  - ### Constructor Summary

    Constructors
    Constructor and description
    `TraitTypeCheckingExtension(StaticTypeCheckingVisitor typeCheckingVisitor)` Creates the trait-specific type-checking extension.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public List<MethodNode>` | `handleMissingMethod(ClassNode receiver, String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)` Resolves trait super calls and helper-backed trait method dispatch.
    `` | `public boolean` | `handleUnresolvedProperty(PropertyExpression pexp)` Resolves synthetic trait static-field accessor properties.

  - ### 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, 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, getOptions, getTargetMethod, getType, handleAmbiguousMethods, handleIncompatibleAssignment, handleIncompatibleReturnType, handleMissingMethod, handleUnresolvedAttribute, handleUnresolvedProperty, handleUnresolvedVariableExpression, isStaticMethodCallOnClass, lookupClassNodeFor, onMethodSelection, parameterizedType, setOptions, setup, storeType`

- - ### Constructor Detail

    - #### public TraitTypeCheckingExtension(StaticTypeCheckingVisitor typeCheckingVisitor)

      Creates the trait-specific type-checking extension.

  - ### Method Detail

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

      Resolves trait super calls and helper-backed trait method dispatch.

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

      Resolves synthetic trait static-field accessor properties.