|
Groovy Documentation | |||||||
| 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 java.lang.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 | |
|---|---|
java.util.List
|
findMethod(ClassNode receiver, java.lang.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, java.lang.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 java.lang.Object | |
|---|---|
| java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
| Method Detail |
|---|
public java.util.List findMethod(ClassNode receiver, java.lang.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, java.lang.String propertyName)
receiver - a class node for which a property wasn't foundpropertyName - the name of the property
protected static Parameter[] toParameterArray(ClassNode[] types)
Groovy Documentation