Groovy 2.2.1

org.codehaus.groovy.transform.stc
[Java] Class DefaultTypeCheckingExtension

java.lang.Object
  org.codehaus.groovy.transform.stc.TypeCheckingExtension
      org.codehaus.groovy.transform.stc.DefaultTypeCheckingExtension

public class DefaultTypeCheckingExtension
extends TypeCheckingExtension

The default type checking handler is used by the standard type checker and doesn't handle any of the type checking errors by default. This just means that whenever a type checking error is detected, there's no additional information available to the type checker that could help it. The default handler is also capable of handling a collection of delegate handlers. If a list of delegates is set, then the type checker will try all the delegates until one is capable of handling an error.

Authors:
Cedric Champeau
Since:
2.1.0


Field Summary
protected List handlers

 
Fields inherited from class TypeCheckingExtension
typeCheckingVisitor
 
Constructor Summary
DefaultTypeCheckingExtension(StaticTypeCheckingVisitor typeCheckingVisitor)

 
Method Summary
void addHandler(TypeCheckingExtension handler)

void afterMethodCall(MethodCall call)

void afterVisitClass(ClassNode node)

void afterVisitMethod(MethodNode node)

boolean beforeMethodCall(MethodCall call)

boolean beforeVisitClass(ClassNode node)

boolean beforeVisitMethod(MethodNode node)

void finish()

List handleAmbiguousMethods(List nodes, Expression origin)

boolean handleIncompatibleAssignment(ClassNode lhsType, ClassNode rhsType, Expression assignmentExpression)

boolean handleIncompatibleReturnType(ReturnStatement returnStatement, ClassNode inferredReturnType)

List handleMissingMethod(ClassNode receiver, String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)

boolean handleUnresolvedAttribute(AttributeExpression aexp)

boolean handleUnresolvedProperty(PropertyExpression pexp)

boolean handleUnresolvedVariableExpression(VariableExpression vexp)

void onMethodSelection(Expression expression, MethodNode target)

void removeHandler(TypeCheckingExtension handler)

void setup()

 
Methods inherited from class 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, handleUnresolvedVariableExpression, isStaticMethodCallOnClass, lookupClassNodeFor, onMethodSelection, parameterizedType, setup, storeType
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

handlers

protected final List handlers


 
Constructor Detail

DefaultTypeCheckingExtension

public DefaultTypeCheckingExtension(StaticTypeCheckingVisitor typeCheckingVisitor)


 
Method Detail

addHandler

public void addHandler(TypeCheckingExtension handler)


afterMethodCall

@Override
public void afterMethodCall(MethodCall call)


afterVisitClass

@Override
public void afterVisitClass(ClassNode node)


afterVisitMethod

@Override
public void afterVisitMethod(MethodNode node)


beforeMethodCall

@Override
public boolean beforeMethodCall(MethodCall call)


beforeVisitClass

@Override
public boolean beforeVisitClass(ClassNode node)


beforeVisitMethod

@Override
public boolean beforeVisitMethod(MethodNode node)


finish

@Override
public void finish()


handleAmbiguousMethods

@Override
public List handleAmbiguousMethods(List nodes, Expression origin)


handleIncompatibleAssignment

@Override
public boolean handleIncompatibleAssignment(ClassNode lhsType, ClassNode rhsType, Expression assignmentExpression)


handleIncompatibleReturnType

@Override
public boolean handleIncompatibleReturnType(ReturnStatement returnStatement, ClassNode inferredReturnType)


handleMissingMethod

public List handleMissingMethod(ClassNode receiver, String name, ArgumentListExpression argumentList, ClassNode[] argumentTypes, MethodCall call)


handleUnresolvedAttribute

public boolean handleUnresolvedAttribute(AttributeExpression aexp)


handleUnresolvedProperty

public boolean handleUnresolvedProperty(PropertyExpression pexp)


handleUnresolvedVariableExpression

public boolean handleUnresolvedVariableExpression(VariableExpression vexp)


onMethodSelection

@Override
public void onMethodSelection(Expression expression, MethodNode target)


removeHandler

public void removeHandler(TypeCheckingExtension handler)


setup

@Override
public void setup()


 

Copyright © 2003-2013 The Codehaus. All rights reserved.