Class SandboxTypeCheckingExtension


  • public class SandboxTypeCheckingExtension
    extends org.codehaus.groovy.transform.stc.AbstractTypeCheckingExtension
    Inspired by work of C├ędric Champeau (http://melix.github.io/blog/2015/03/sandboxing.html)
    Author:
    Radovan Semancik
    • Field Summary

      • Fields inherited from class org.codehaus.groovy.transform.stc.AbstractTypeCheckingExtension

        context, debug, handled
      • Fields inherited from class org.codehaus.groovy.transform.stc.TypeCheckingExtension

        typeCheckingVisitor
    • Constructor Summary

      Constructors 
      Constructor Description
      SandboxTypeCheckingExtension​(org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor typeCheckingVisitor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean handleUnresolvedVariableExpression​(org.codehaus.groovy.ast.expr.VariableExpression vexp)  
      void onMethodSelection​(org.codehaus.groovy.ast.expr.Expression expression, org.codehaus.groovy.ast.MethodNode target)  
      • Methods inherited from class org.codehaus.groovy.transform.stc.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
      • Methods inherited from class org.codehaus.groovy.transform.stc.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, isStaticMethodCallOnClass, lookupClassNodeFor, parameterizedType, setup, storeType
    • Constructor Detail

      • SandboxTypeCheckingExtension

        public SandboxTypeCheckingExtension​(org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor typeCheckingVisitor)
    • Method Detail

      • onMethodSelection

        public void onMethodSelection​(org.codehaus.groovy.ast.expr.Expression expression,
                                      org.codehaus.groovy.ast.MethodNode target)
        Overrides:
        onMethodSelection in class org.codehaus.groovy.transform.stc.TypeCheckingExtension
      • handleUnresolvedVariableExpression

        public boolean handleUnresolvedVariableExpression​(org.codehaus.groovy.ast.expr.VariableExpression vexp)
        Overrides:
        handleUnresolvedVariableExpression in class org.codehaus.groovy.transform.stc.TypeCheckingExtension