public class TraitTypeCheckingExtension extends AbstractTypeCheckingExtension
context, debug, handled
typeCheckingVisitor
Constructor | Description |
---|---|
TraitTypeCheckingExtension(StaticTypeCheckingVisitor typeCheckingVisitor) |
Builds a type checking extension relying on a Groovy script (type checking DSL).
|
Modifier and Type | Method | Description |
---|---|---|
List<MethodNode> |
handleMissingMethod(ClassNode receiver,
String name,
ArgumentListExpression argumentList,
ClassNode[] argumentTypes,
MethodCall call) |
This method is called by the type checker when a method call cannot be resolved.
|
void |
setup() |
Subclasses should implement this method whenever they need to perform
special checks before the type checker starts working.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStaticTypeError, afterMethodCall, afterVisitClass, afterVisitMethod, beforeMethodCall, beforeVisitClass, beforeVisitMethod, buildListType, buildMapType, classNodeFor, classNodeFor, existsProperty, existsProperty, extractStaticReceiver, finish, getArgumentTypes, getTargetMethod, getType, handleAmbiguousMethods, handleIncompatibleAssignment, handleIncompatibleReturnType, handleUnresolvedAttribute, handleUnresolvedProperty, handleUnresolvedVariableExpression, isStaticMethodCallOnClass, lookupClassNodeFor, onMethodSelection, parameterizedType, storeType
public TraitTypeCheckingExtension(StaticTypeCheckingVisitor typeCheckingVisitor)
typeCheckingVisitor
- the type checking visitorpublic void setup()
TypeCheckingExtension
setup
in class TypeCheckingExtension
public List<MethodNode> handleMissingMethod(ClassNode receiver, String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)
TypeCheckingExtension
handleMissingMethod
in class TypeCheckingExtension
receiver
- the type of the receivername
- the name of the called methodargumentList
- the list of arguments of the callargumentTypes
- the types of the arguments of the callcall
- the method call itself, if needed