Enum Keywords

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Keywords>

    public enum Keywords
    extends java.lang.Enum<Keywords>
    The JavaScript keywords.
    • Field Detail

      • value

        public final java.lang.String value
    • Method Detail

      • values

        public static Keywords[] 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 (Keywords c : Keywords.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Keywords valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<Keywords>
      • isKeyword

        public static boolean isKeyword​(java.lang.String value,
                                        boolean includeTypeScriptKeywords)
      • isKeyword

        public static boolean isKeyword​(TokenType token)
      • isTypeScriptSpecificKeyword

        public static boolean isTypeScriptSpecificKeyword​(TokenType type)
      • isStrictKeyword

        public static boolean isStrictKeyword​(TokenType token)
        Returns true if token is a "future reserved word" which can be used as a variable identifier, but only in non-strict mode.
      • getTokenType

        public static TokenType getTokenType​(java.lang.String value)
      • get

        public static Keywords get​(java.lang.String value,
                                   boolean includeTypeScriptKeywords)