Class SandboxTypeCheckingExtension

java.lang.Object
org.codehaus.groovy.transform.stc.TypeCheckingExtension
org.codehaus.groovy.transform.stc.AbstractTypeCheckingExtension
com.evolveum.midpoint.model.common.expression.script.groovy.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

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SandboxTypeCheckingExtension

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

    • 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