Interface Java.EnumDeclaration

All Superinterfaces:
Java.Annotatable, Java.ClassDeclaration, Java.DocCommentable, Java.Locatable, Java.NamedTypeDeclaration, Java.Scope, Java.TypeDeclaration
All Known Implementing Classes:
Java.MemberEnumDeclaration, Java.PackageMemberEnumDeclaration
Enclosing class:
Java

public static interface Java.EnumDeclaration extends Java.ClassDeclaration, Java.NamedTypeDeclaration, Java.DocCommentable
Base for package member (a.k.a. "top-level") enum declarations and nested enum declarations.
  • Method Details

    • getModifiers

      Java.Modifier[] getModifiers()
      Returns:
      The Java.Modifiers declared for this enum
    • getName

      String getName()
      Specified by:
      getName in interface Java.NamedTypeDeclaration
      Returns:
      The declared (not the fully qualified) name of the class or interface
    • getImplementedTypes

      Java.Type[] getImplementedTypes()
      Returns:
      The interfaces that this enum implements
    • getConstants

      List<Java.EnumConstant> getConstants()
      Returns:
      The constants that this enum declares
    • addConstant

      void addConstant(Java.EnumConstant ec)
      Adds another constant to this enum declaration.