org.codehaus.groovy.classgen.asm.sc

## Class StaticTypesTypeChooser

- java.lang.Object
- - org.codehaus.groovy.classgen.asm.StatementMetaTypeChooser
  - - org.codehaus.groovy.classgen.asm.sc.StaticTypesTypeChooser

- All Implemented Interfaces:
    TypeChooser

      public class StaticTypesTypeChooser
      extends StatementMetaTypeChooser

  A `TypeChooser` which reads type information from node metadata generated by the `CompileStatic` annotation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StaticTypesTypeChooser()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClassNode` | `resolveType(Expression exp, ClassNode current)` Resolve the type of an expression.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StaticTypesTypeChooser

          public StaticTypesTypeChooser()

  - ### Method Detail

    - #### resolveType

          public ClassNode resolveType(Expression exp,
                              ClassNode current)

      Description copied from interface: `TypeChooser`
      Resolve the type of an expression. Depending on the implementations, the returned type may be the declared type or an inferred type.
      Specified by:
        `resolveType` in interface `TypeChooser`
      Overrides:
        `resolveType` in class `StatementMetaTypeChooser`
      Parameters:
        `exp` - the expression for which the type must be returned.
        `current` - the classnode this expression belongs to
      Returns:
        the resolved type.