Class Modifier.ModifierKeyword

  • Enclosing class:
    Modifier

    public static class Modifier.ModifierKeyword
    extends java.lang.Object
    Modifier keywords (typesafe enumeration).
    Since:
    3.0
    • Method Detail

      • fromFlagValue

        public static Modifier.ModifierKeyword fromFlagValue​(int flagValue)
        Returns the modifier corresponding to the given single-bit flag value, or null if none or if more than one bit is set.

        fromFlagValue is the converse of toFlagValue: that is, ModifierKind.fromFlagValue(k.toFlagValue()) == k for all modifier keywords k.

        Parameters:
        flagValue - the single-bit flag value for the modifier
        Returns:
        the modifier keyword, or null if none
        See Also:
        toFlagValue()
      • toKeyword

        public static Modifier.ModifierKeyword toKeyword​(java.lang.String keyword)
        Returns the modifier corresponding to the given string, or null if none.

        toKeyword is the converse of toString: that is, ModifierKind.toKeyword(k.toString()) == k for all modifier keywords k.

        Parameters:
        keyword - the lowercase string name for the modifier
        Returns:
        the modifier keyword, or null if none
        See Also:
        toString()
      • toFlagValue

        public int toFlagValue()
        Returns the modifier flag value corresponding to this modifier keyword. These flag values are as described in the Java Virtual Machine Specification.
        Returns:
        one of the Modifier constants
        See Also:
        fromFlagValue(int)
      • toString

        public java.lang.String toString()
        Returns the keyword for the modifier.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the keyword for the modifier
        See Also:
        toKeyword(String)