Class EnumConstantClassNode

All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>, NodeMetaDataHandler

public class EnumConstantClassNode extends InnerClassNode
Represents the anonymous inner class for an enum constant. This subtype is needed so that EnumVisitor can differentiate between the scenarios when an InnerClassNode represents anonymous inner class for an enum constant versus an enum class defined within another class.
  • Constructor Details

    • EnumConstantClassNode

      public EnumConstantClassNode(ClassNode outerClass, String name, ClassNode superClass)
      Creates the anonymous class of an enum constant. The class is ACC_ENUM | ACC_FINAL and extends superClass.
      Parameters:
      outerClass - the enum that declares the constant
      name - the binary name of the anonymous class
      superClass - the enum type this constant class extends
    • EnumConstantClassNode

      @Deprecated(forRemoval=true, since="4.0.0") public EnumConstantClassNode(ClassNode outerClass, String name, int modifiers, ClassNode superClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 4.0.0, for removal
      Creates the anonymous class of an enum constant with caller-supplied modifiers. Unlike EnumConstantClassNode(ClassNode, String, ClassNode), the modifiers are passed through unchanged.
      Parameters:
      outerClass - the enum that declares the constant
      name - the binary name of the anonymous class
      modifiers - the access flags stored on the class
      superClass - the enum type this constant class extends