langtools/make/tools/propertiesparser/parser/MessageType.java
changeset 45504 ea7475564d07
parent 36526 3b41f1c69604
equal deleted inserted replaced
45503:d23ae2d67a5d 45504:ea7475564d07
    69      * A predefined type. All common types mentioned in the resource file comments are meant to
    69      * A predefined type. All common types mentioned in the resource file comments are meant to
    70      * be included here.
    70      * be included here.
    71      */
    71      */
    72     public enum SimpleType implements MessageType {
    72     public enum SimpleType implements MessageType {
    73 
    73 
       
    74         ANNOTATION("annotation", "Compound", "com.sun.tools.javac.code.Attribute"),
    74         BOOLEAN("boolean", "boolean", null),
    75         BOOLEAN("boolean", "boolean", null),
       
    76         COLLECTION("collection", "Collection", "java.util"),
       
    77         FLAG("flag", "Flag", "com.sun.tools.javac.code.Flags"),
    75         FRAGMENT("fragment", "Fragment", null),
    78         FRAGMENT("fragment", "Fragment", null),
    76         DIAGNOSTIC("diagnostic", "JCDiagnostic", "com.sun.tools.javac.util"),
    79         DIAGNOSTIC("diagnostic", "JCDiagnostic", "com.sun.tools.javac.util"),
    77         MODIFIER("modifier", "Modifier", "javax.lang.model.element"),
    80         MODIFIER("modifier", "Modifier", "javax.lang.model.element"),
    78         FILE("file", "File", "java.io"),
    81         FILE("file", "File", "java.io"),
    79         FILE_OBJECT("file object", "JavaFileObject", "javax.tools"),
    82         FILE_OBJECT("file object", "JavaFileObject", "javax.tools"),
    80         PATH("path", "Path", "java.nio.file"),
    83         PATH("path", "Path", "java.nio.file"),
    81         NAME("name", "Name", "com.sun.tools.javac.util"),
    84         NAME("name", "Name", "com.sun.tools.javac.util"),
    82         NUMBER("number", "int", null),
    85         NUMBER("number", "int", null),
    83         OPTION_NAME("option name", "Option", "com.sun.tools.javac.main"),
    86         OPTION_NAME("option name", "Option", "com.sun.tools.javac.main"),
    84         SOURCE_VERSION("source version", "Source", "com.sun.tools.javac.code"),
    87         SOURCE_VERSION("source version", "SourceVersion", "javax.lang.model"),
    85         STRING("string", "String", null),
    88         STRING("string", "String", null),
    86         SYMBOL("symbol", "Symbol", "com.sun.tools.javac.code"),
    89         SYMBOL("symbol", "Symbol", "com.sun.tools.javac.code"),
    87         SYMBOL_KIND("symbol kind", "Kind", "com.sun.tools.javac.code.Kinds"),
    90         SYMBOL_KIND("symbol kind", "Kind", "com.sun.tools.javac.code.Kinds"),
    88         KIND_NAME("kind name", "KindName", "com.sun.tools.javac.code.Kinds"),
    91         KIND_NAME("kind name", "KindName", "com.sun.tools.javac.code.Kinds"),
    89         TOKEN("token", "TokenKind", "com.sun.tools.javac.parser.Tokens"),
    92         TOKEN("token", "TokenKind", "com.sun.tools.javac.parser.Tokens"),
   129 
   132 
   130         /**
   133         /**
   131          * Compound type kind.
   134          * Compound type kind.
   132          */
   135          */
   133         public enum Kind {
   136         public enum Kind {
       
   137             COLLECTION("collection of", SimpleType.COLLECTION),
   134             LIST("list of", SimpleType.LIST),
   138             LIST("list of", SimpleType.LIST),
   135             SET("set of", SimpleType.SET);
   139             SET("set of", SimpleType.SET);
   136 
   140 
   137             public final String kindName;
   141             public final String kindName;
   138             public final SimpleType clazz;
   142             public final SimpleType clazz;
   178         /**
   182         /**
   179          * Union type kind.
   183          * Union type kind.
   180          */
   184          */
   181         public enum Kind {
   185         public enum Kind {
   182             MESSAGE_SEGMENT("message segment", SimpleType.DIAGNOSTIC, SimpleType.FRAGMENT),
   186             MESSAGE_SEGMENT("message segment", SimpleType.DIAGNOSTIC, SimpleType.FRAGMENT),
   183             FILE_NAME("file name", SimpleType.FILE, SimpleType.FILE_OBJECT);
   187             FILE_NAME("file name", SimpleType.FILE, SimpleType.FILE_OBJECT, SimpleType.PATH);
   184 
   188 
   185             final String kindName;
   189             final String kindName;
   186             final SimpleType[] choices;
   190             final SimpleType[] choices;
   187 
   191 
   188             Kind(String kindName, SimpleType... choices) {
   192             Kind(String kindName, SimpleType... choices) {