Enum Class ClassRole

java.lang.Object
java.lang.Enum<ClassRole>
edu.university.ecs.lab.common.models.enums.ClassRole
All Implemented Interfaces:
Serializable, Comparable<ClassRole>, Constable

public enum ClassRole extends Enum<ClassRole>
Enum to represent the role of a class in a system
  • Enum Constant Details

    • CONTROLLER

      public static final ClassRole CONTROLLER
    • SERVICE

      public static final ClassRole SERVICE
    • REPOSITORY

      public static final ClassRole REPOSITORY
    • ENTITY

      public static final ClassRole ENTITY
    • REP_REST_RSC

      public static final ClassRole REP_REST_RSC
    • FEIGN_CLIENT

      public static final ClassRole FEIGN_CLIENT
    • UNKNOWN

      public static final ClassRole UNKNOWN
  • Field Details

    • classType

      private final Class<? extends JClass> classType
      Get the associated class type for a role
  • Constructor Details

    • ClassRole

      private ClassRole(Class<? extends JClass> classType)
      Private constructor to link enum to class type
      Parameters:
      classType - the class type to associate with the role
  • Method Details

    • values

      public static ClassRole[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ClassRole valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • classFromRoleName

      public static Class<? extends JClass> classFromRoleName(String roleName)
      Get the class role from the class type
      Parameters:
      roleName - the name of the class role
      Returns:
      associated class type if it exists, else null (unknown or not found)