Custom type checking extensions may extend this method in order to benefit from a lot of support methods.
The methods found in this class are made directly available in type checking scripts through the org.codehaus.groovy.transform.stc.GroovyTypeCheckingExtensionSupport class.
Modifiers | Name | Description |
---|---|---|
protected TypeCheckingContext |
context |
|
protected boolean |
debug |
|
protected boolean |
handled |
Fields inherited from class | Fields |
---|---|
class TypeCheckingExtension |
typeCheckingVisitor |
Constructor and description |
---|
AbstractTypeCheckingExtension
(org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor typeCheckingVisitor) |
Type Params | Return Type | Name and description |
---|---|---|
|
boolean |
argTypeMatches(org.codehaus.groovy.ast.ClassNode[] argTypes, int index, Class clazz) |
|
boolean |
argTypeMatches(MethodCall call, int index, Class clazz) |
|
boolean |
argTypesMatches(org.codehaus.groovy.ast.ClassNode[] argTypes, Class... classes) |
|
boolean |
argTypesMatches(MethodCall call, Class... classes) |
|
void |
delegatesTo(org.codehaus.groovy.ast.ClassNode type) |
|
void |
delegatesTo(org.codehaus.groovy.ast.ClassNode type, int strategy) |
|
void |
delegatesTo(org.codehaus.groovy.ast.ClassNode type, int strategy, DelegationMetadata parent) |
|
boolean |
firstArgTypesMatches(org.codehaus.groovy.ast.ClassNode[] argTypes, Class... classes) |
|
boolean |
firstArgTypesMatches(MethodCall call, Class... classes) |
|
ArgumentListExpression |
getArguments(MethodCall call) |
|
AbstractTypeCheckingExtension.TypeCheckingScope |
getCurrentScope() |
|
BinaryExpression |
getEnclosingBinaryExpression() |
|
List<BinaryExpression> |
getEnclosingBinaryExpressionStack() |
|
org.codehaus.groovy.ast.ClassNode |
getEnclosingClassNode() |
|
List<org.codehaus.groovy.ast.ClassNode> |
getEnclosingClassNodes() |
|
EnclosingClosure |
getEnclosingClosure() |
|
List<TypeCheckingContext.EnclosingClosure> |
getEnclosingClosureStack() |
|
org.codehaus.groovy.ast.MethodNode |
getEnclosingMethod() |
|
Expression |
getEnclosingMethodCall() |
|
List<Expression> |
getEnclosingMethodCalls() |
|
List<org.codehaus.groovy.ast.MethodNode> |
getEnclosingMethods() |
|
Set<org.codehaus.groovy.ast.MethodNode> |
getGeneratedMethods() |
|
boolean |
isAnnotatedBy(ASTNode node, Class annotation) |
|
boolean |
isAnnotatedBy(ASTNode node, org.codehaus.groovy.ast.ClassNode annotation) |
|
boolean |
isDynamic(VariableExpression var) |
|
boolean |
isExtensionMethod(org.codehaus.groovy.ast.MethodNode node) |
|
boolean |
isGenerated(org.codehaus.groovy.ast.MethodNode node) |
|
boolean |
isMethodCall(Object o) |
|
void |
log(String message) |
|
org.codehaus.groovy.ast.MethodNode |
makeDynamic(MethodCall call) Used to instruct the type checker that the call is a dynamic method call. |
|
org.codehaus.groovy.ast.MethodNode |
makeDynamic(MethodCall call, org.codehaus.groovy.ast.ClassNode returnType) Used to instruct the type checker that the call is a dynamic method call. |
|
void |
makeDynamic(PropertyExpression pexp) Instructs the type checker that a property access is dynamic, returning an instance of an Object. |
|
void |
makeDynamic(PropertyExpression pexp, org.codehaus.groovy.ast.ClassNode returnType) Instructs the type checker that a property access is dynamic. |
|
void |
makeDynamic(VariableExpression vexp) Instructs the type checker that an unresolved variable is a dynamic variable of type Object. |
|
void |
makeDynamic(VariableExpression vexp, org.codehaus.groovy.ast.ClassNode returnType) Instructs the type checker that an unresolved variable is a dynamic variable. |
|
org.codehaus.groovy.ast.MethodNode |
newMethod(String name, Class returnType) |
|
org.codehaus.groovy.ast.MethodNode |
newMethod(String name, org.codehaus.groovy.ast.ClassNode returnType) |
|
org.codehaus.groovy.ast.MethodNode |
newMethod(String name, Callable<org.codehaus.groovy.ast.ClassNode> returnType) |
|
AbstractTypeCheckingExtension.TypeCheckingScope |
newScope() |
|
AbstractTypeCheckingExtension.TypeCheckingScope |
newScope(Closure code) |
|
BinaryExpression |
popEnclosingBinaryExpression() |
|
org.codehaus.groovy.ast.ClassNode |
popEnclosingClassNode() |
|
EnclosingClosure |
popEnclosingClosure() |
|
org.codehaus.groovy.ast.MethodNode |
popEnclosingMethod() |
|
Expression |
popEnclosingMethodCall() |
|
void |
popTemporaryTypeInfo() |
|
void |
pushEnclosingBinaryExpression(BinaryExpression binaryExpression) |
|
void |
pushEnclosingClassNode(org.codehaus.groovy.ast.ClassNode classNode) |
|
void |
pushEnclosingClosureExpression(ClosureExpression closureExpression) |
|
void |
pushEnclosingMethod(org.codehaus.groovy.ast.MethodNode methodNode) |
|
void |
pushEnclosingMethodCall(Expression call) |
|
void |
pushTemporaryTypeInfo() |
|
protected Object |
safeCall(Closure closure, Object... args) |
|
AbstractTypeCheckingExtension.TypeCheckingScope |
scopeExit() |
|
AbstractTypeCheckingExtension.TypeCheckingScope |
scopeExit(Closure code) |
|
void |
setHandled(boolean handled) |
|
List<org.codehaus.groovy.ast.MethodNode> |
unique(org.codehaus.groovy.ast.MethodNode node) |
<R> |
R |
withTypeChecker(Closure<R> code) |
Used to instruct the type checker that the call is a dynamic method call. Calling this method automatically sets the handled flag to true. The expected return type of the dynamic method call is Object.
call
- the method call which is a dynamic method callUsed to instruct the type checker that the call is a dynamic method call. Calling this method automatically sets the handled flag to true.
call
- the method call which is a dynamic method callreturnType
- the expected return type of the dynamic callInstructs the type checker that a property access is dynamic, returning an instance of an Object. Calling this method automatically sets the handled flag to true.
pexp
- the property or attribute expressionInstructs the type checker that a property access is dynamic. Calling this method automatically sets the handled flag to true.
pexp
- the property or attribute expressionreturnType
- the type of the propertyInstructs the type checker that an unresolved variable is a dynamic variable of type Object. Calling this method automatically sets the handled flag to true.
vexp
- the dynamic variableInstructs the type checker that an unresolved variable is a dynamic variable.
returnType
- the type of the dynamic variable
Calling this method automatically sets the handled flag to true.vexp
- the dynamic variableCopyright © 2003-2019 The Apache Software Foundation. All rights reserved.