[Java] Class GroovyTypeCheckingExtensionSupport
- org.codehaus.groovy.transform.stc.GroovyTypeCheckingExtensionSupport
Base class for type checking extensions written in Groovy. Compared to its superclass, TypeCheckingExtension, this class adds a number of utility methods aimed at leveraging the syntax of the Groovy language to improve expressivity and conciseness.
- Authors:
- Cedric Champeau
- Since:
- 2.1.0
Nested Class Summary
Modifiers | Name | Description |
---|---|---|
static class | GroovyTypeCheckingExtensionSupport.TypeCheckingDSL |
Fields inherited from class | Fields |
---|---|
class AbstractTypeCheckingExtension | context, debug, handled |
class TypeCheckingExtension | typeCheckingVisitor |
Constructor Summary
Constructor and description |
---|
GroovyTypeCheckingExtensionSupport
(StaticTypeCheckingVisitor typeCheckingVisitor, String scriptPath, CompilationUnit compilationUnit) Builds a type checking extension relying on a Groovy script (type checking DSL). |
Methods Summary
Inherited Methods Summary
Constructor Detail
public GroovyTypeCheckingExtensionSupport(StaticTypeCheckingVisitor typeCheckingVisitor, String scriptPath, CompilationUnit compilationUnit)
Builds a type checking extension relying on a Groovy script (type checking DSL).
- Parameters:
-
typeCheckingVisitor
- the type checking visitor -
scriptPath
- the path to the type checking script (in classpath) - compilationUnit
Method Detail
@Override public void afterMethodCall(MethodCall call)
@Override public void afterVisitClass(ClassNode node)
@Override public void afterVisitMethod(MethodNode node)
@Override public boolean beforeMethodCall(MethodCall call)
@Override public boolean beforeVisitClass(ClassNode node)
@Override public boolean beforeVisitMethod(MethodNode node)
@Override public void finish()
@Override @SuppressWarnings("unchecked") public List<MethodNode> handleAmbiguousMethods(List<MethodNode> nodes, Expression origin)
@Override public boolean handleIncompatibleAssignment(ClassNode lhsType, ClassNode rhsType, Expression assignmentExpression)
@Override public boolean handleIncompatibleReturnType(ReturnStatement returnStatement, ClassNode inferredReturnType)
@Override @SuppressWarnings("unchecked") public List<MethodNode> handleMissingMethod(ClassNode receiver, String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)
@Override public boolean handleUnresolvedAttribute(AttributeExpression aexp)
@Override public boolean handleUnresolvedProperty(PropertyExpression pexp)
@Override public boolean handleUnresolvedVariableExpression(VariableExpression vexp)
@Override public void onMethodSelection(Expression expression, MethodNode target)
public void setDebug(boolean debug)
@Override public void setup()
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/org/codehaus/groovy/transform/stc/GroovyTypeCheckingExtensionSupport.html