Top Description Methods
org.codehaus.groovy.classgen.asm

public Interface TypeChooser

Known Direct Implementers
org.codehaus.groovy.classgen.asm.StatementMetaTypeChooser
Imports
org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.expr.Expression

Interface for modules which are capable of resolving the type of an expression. Several implementations are available, depending on whether you are in a dynamic or static compilation mode.

Method Summary

Modifier and TypeMethod and Description
public ClassNode

Returns:

the resolved type.
resolveType
(final Expression
the expression for which the type must be returned.
expression
,
ClassNode
the classnode this expression belongs to
classNode
)

Resolve the type of an expression.

Method Detail

resolveTypeback to summary
public ClassNode resolveType(final Expression expression, ClassNode classNode)

Resolve the type of an expression. Depending on the implementations, the returned type may be the declared type or an inferred type.

Parameters
expression:Expression

the expression for which the type must be returned.

classNode:ClassNode

the classnode this expression belongs to

Returns:ClassNode

the resolved type.