public class TraitTypeCheckingExtension extends AbstractTypeCheckingExtension
context, debug, handledtypeCheckingVisitor| Constructor and Description |
|---|
TraitTypeCheckingExtension(StaticTypeCheckingVisitor typeCheckingVisitor)
Builds a type checking extension relying on a Groovy script (type checking DSL).
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<MethodNode> |
handleMissingMethod(ClassNode receiver,
java.lang.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, withTypeCheckeraddStaticTypeError, 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, storeTypepublic TraitTypeCheckingExtension(StaticTypeCheckingVisitor typeCheckingVisitor)
typeCheckingVisitor - the type checking visitorpublic void setup()
TypeCheckingExtensionsetup in class TypeCheckingExtensionpublic java.util.List<MethodNode> handleMissingMethod(ClassNode receiver, java.lang.String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)
TypeCheckingExtensionhandleMissingMethod in class TypeCheckingExtensionreceiver - 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