JavaKeywords.java


//  JavaKeywords.java

//  Interface JavaKeywords
//  ------------------------------------------------------------------
/**
  *   Names and hashcodes for Java keywords.
  *
  *   @author   C. Vickery
  *   @version  1.0 - Spring, 2000
  */
  public interface JavaKeywords
  {

    //  Manifest Constants.
    //  --------------------------------------------------------------

    /** Manifest constant for no keyword.                           */
    int K_undefined =                "".hashCode();
   
    /** Manifest constant for the keyword "abstract."               */
    int K_abstract =         "abstract".hashCode();
   
    /** Manifest constant for the keyword "boolean."                */
    int K_boolean =           "boolean".hashCode();
   
    /** Manifest constant for the keyword "break."                  */
    int K_break =               "break".hashCode();
   
    /** Manifest constant for the keyword "byte."                   */
    int K_byte =                 "byte".hashCode();
   
    /** Manifest constant for the keyword "case."                   */
    int K_case =                 "case".hashCode();
   
    /** Manifest constant for the keyword "catch."                  */
    int K_catch =               "catch".hashCode();
   
    /** Manifest constant for the keyword "char."                   */
    int K_char =                 "char".hashCode();
   
    /** Manifest constant for the keyword "class."                  */
    int K_class =               "class".hashCode();
   
    /** Manifest constant for the keyword "const."                  */
    int K_const =               "const".hashCode();
   
    /** Manifest constant for the keyword "continue."               */
    int K_continue =         "continue".hashCode();
   
    /** Manifest constant for the keyword "default."                */
    int K_default =           "default".hashCode();
   
    /** Manifest constant for the keyword "do."                     */
    int K_do =                     "do".hashCode();
   
    /** Manifest constant for the keyword "double."                 */
    int K_double =             "double".hashCode();
   
    /** Manifest constant for the keyword "else."                   */
    int K_else =                 "else".hashCode();
   
    /** Manifest constant for the keyword "extends."                */
    int K_extends =           "extends".hashCode();
   
    /** Manifest constant for the keyword "final."                  */
    int K_final =               "final".hashCode();
   
    /** Manifest constant for the keyword "finally."                */
    int K_finally =           "finally".hashCode();
   
    /** Manifest constant for the keyword "float."                  */
    int K_float =               "float".hashCode();
   
    /** Manifest constant for the keyword "for."                    */
    int K_for =                   "for".hashCode();
   
    /** Manifest constant for the keyword "goto."                   */
    int K_goto =                 "goto".hashCode();
   
    /** Manifest constant for the keyword "if."                     */
    int K_if =                     "if".hashCode();
   
    /** Manifest constant for the keyword "implements."             */
    int K_implements =     "implements".hashCode();
   
    /** Manifest constant for the keyword "import."                 */
    int K_import =             "import".hashCode();
   
    /** Manifest constant for the keyword "instanceof."             */
    int K_instanceof =     "instanceof".hashCode();
   
    /** Manifest constant for the keyword "int."                    */
    int K_int =                   "int".hashCode();
  
    /** Manifest constant for the keyword "interface."              */
    int K_interface =       "interface".hashCode();
   
    /** Manifest constant for the keyword "long."                   */
    int K_long =                 "long".hashCode();
  
    /** Manifest constant for the keyword "native."                 */
    int K_native =             "native".hashCode();
   
    /** Manifest constant for the keyword "new."                    */
    int K_new =                   "new".hashCode();
   
    /** Manifest constant for the keyword "package."                */
    int K_package =           "package".hashCode();
   
    /** Manifest constant for the keyword "private."                */
    int K_private =           "private".hashCode();
   
    /** Manifest constant for the keyword "protected."              */
    int K_protected =       "protected".hashCode();
   
    /** Manifest constant for the keyword "public."                 */
    int K_public =             "public".hashCode();
   
    /** Manifest constant for the keyword "return."                 */
    int K_return =             "return".hashCode();
   
    /** Manifest constant for the keyword "short."                  */
    int K_short =               "short".hashCode();
   
    /** Manifest constant for the keyword "static."                 */
    int K_static =             "static".hashCode();
   
    /** Manifest constant for the keyword "super."                  */
    int K_super =               "super".hashCode();
   
    /** Manifest constant for the keyword "switch."                 */
    int K_switch =             "switch".hashCode();
   
    /** Manifest constant for the keyword "synchronized."           */
    int K_synchronized = "synchronized".hashCode();
  
    /** Manifest constant for the keyword "this."                   */
    int K_this =                 "this".hashCode();
  
    /** Manifest constant for the keyword "throw."                  */
    int K_throw =               "throw".hashCode();
   
    /** Manifest constant for the keyword "throws."                 */
    int K_throws =             "throws".hashCode();
   
    /** Manifest constant for the keyword "transient."              */
    int K_transient =       "transient".hashCode();
   
    /** Manifest constant for the keyword "try."                    */
    int K_try =                   "try".hashCode();
   
    /** Manifest constant for the keyword "void."                   */
    int K_void =                 "void".hashCode();
   
    /** Manifest constant for the keyword "volatile."               */
    int K_volatile =         "volatile".hashCode();
   
    /** Manifest constant for the keyword "while."                  */
    int K_while =               "while".hashCode();

    /** List of keyword names.                                      */
    String[] keywordNames =
    {
       "abstract",     "boolean",      "break",          "byte",
       "case",         "catch",        "char",           "class",
       "const",        "continue",     "default",        "do",
       "double",       "else",         "extends",        "final",
       "finally",      "float",        "for",            "goto",
       "if",           "implements",   "import",         "instanceof",
       "int",          "interface",    "long",           "native",
       "new",          "package",      "private",        "protected",
       "public",       "return",       "short",          "static",
       "super",        "switch",       "synchronized",   "this",
       "throw",        "throws",       "transient",      "try",
       "void",         "volatile",     "while"
     };

    /** List of keyword hashcodes.                                  */
    int[] keywordHashCodes =
    {
      K_abstract,    K_boolean,     K_break,         K_byte,
      K_case,        K_catch,       K_char,          K_class,
      K_const,       K_continue,    K_default,       K_do,
      K_double,      K_else,        K_extends,       K_final,
      K_finally,     K_float,       K_for,           K_goto,
      K_if,          K_implements,  K_import,        K_instanceof,
      K_int,         K_interface,   K_long,          K_native,
      K_new,         K_package,     K_private,       K_protected,
      K_public,      K_return,      K_short,         K_static,
      K_super,       K_switch,      K_synchronized,  K_this,
      K_throw,       K_throws,      K_transient,     K_try,
      K_void,        K_volatile,    K_while,
    };

  }