Class EnumTypeCheckingExtension

java.lang.Object
org.codehaus.groovy.transform.stc.TypeCheckingExtension
org.codehaus.groovy.transform.stc.EnumTypeCheckingExtension

public class EnumTypeCheckingExtension extends TypeCheckingExtension
A type checking extension that will take care of handling errors which are specific to enums. In particular, it will handle the enum constants within switch-case statement.
Since:
3.0.0
  • Constructor Details

  • Method Details

    • handleUnresolvedVariableExpression

      public boolean handleUnresolvedVariableExpression(VariableExpression vexp)
      Description copied from class: TypeCheckingExtension
      This method is called by the type checker when a variable expression cannot be resolved. It gives the extension a chance to resolve it for the type checker.
      Overrides:
      handleUnresolvedVariableExpression in class TypeCheckingExtension
      Parameters:
      vexp - the unresolved variable extension
      Returns:
      boolean false if the extension doesn't handle it, true if the extension handles this variable.