|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.transform.stc.TypeCheckerPlugin
public abstract class TypeCheckerPlugin
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.
| Constructor Summary | |
|---|---|
TypeCheckerPlugin()
|
|
| Method Summary | |
|---|---|
java.util.List<MethodNode> |
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypeCheckerPlugin()
| Method Detail |
|---|
public java.util.List<MethodNode> 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||