|
Groovy 2.0.0-rc-3 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.transform.stc.TypeCheckerPlugin
public abstract class TypeCheckerPlugin extends Object
Type checking plugins can be used to extend the type checker capabilities. For example, when a method is not found or a dynamic variable is recognized, a plugin may return the type of the expression. This is an expert and experimental feature. APIs may change without notice.
Method Summary | |
---|---|
List
|
findMethod(ClassNode receiver, String name, ClassNode... args)
This method is called by the type checker whenever it fails to find a method on a receiver. |
ClassNode
|
resolveDynamicVariableType(DynamicVariable variable)
This method is called when the type checker finds a dynamic variable which is not supposed to be allowed. |
PropertyNode
|
resolveProperty(ClassNode receiver, String propertyName)
This method is called when the type checker cannot find a property on a receiver. |
protected static Parameter[]
|
toParameterArray(ClassNode[] types)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail |
---|
public List findMethod(ClassNode receiver, String name, ClassNode... args)
receiver
- a class node for with an undefined method is calledname
- the name of the methodargs
- the inferred arguments types of the method.
public ClassNode resolveDynamicVariableType(DynamicVariable variable)
variable
- the dynamic variable for which we want the plugin to resolve the type
public PropertyNode resolveProperty(ClassNode receiver, String propertyName)
receiver
- a class node for which a property wasn't foundpropertyName
- the name of the property
protected static Parameter[] toParameterArray(ClassNode[] types)
Copyright © 2003-2012 The Codehaus. All rights reserved.