Enum AccessModifierOption

    • Method Detail

      • values

        public static AccessModifierOption[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AccessModifierOption c : AccessModifierOption.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AccessModifierOption valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • getName

        private String getName()
        Returns the access modifier name.
        Returns:
        the access modifier name
      • getInstance

        public static AccessModifierOption getInstance​(String modifierName)
        Factory method which returns an AccessModifier instance that corresponds to the given access modifier name represented as a String. The access modifier name can be formatted both as lower case or upper case string. For example, passing PACKAGE or package as a modifier name will return PACKAGE.
        Parameters:
        modifierName - access modifier name represented as a String.
        Returns:
        the AccessModifier associated with given access modifier name.