001: /*
002: * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package com.sun.tools.internal.xjc;
027:
028: import java.text.MessageFormat;
029: import java.util.ResourceBundle;
030:
031: /**
032: * Formats error messages.
033: */
034: class Messages {
035: /** Loads a string resource and formats it with specified arguments. */
036: static String format(String property, Object... args) {
037: String text = ResourceBundle.getBundle(
038: Messages.class.getPackage().getName()
039: + ".MessageBundle").getString(property);
040: return MessageFormat.format(text, args);
041: }
042:
043: //
044: //
045: // Message resources
046: //
047: //
048: static final String UNKNOWN_LOCATION = // 0 args
049: "ConsoleErrorReporter.UnknownLocation";
050:
051: static final String LINE_X_OF_Y = // 2 args
052: "ConsoleErrorReporter.LineXOfY";
053:
054: static final String UNKNOWN_FILE = // 0 args
055: "ConsoleErrorReporter.UnknownFile";
056:
057: static final String DRIVER_PUBLIC_USAGE = // 0 args
058: "Driver.Public.Usage";
059:
060: static final String DRIVER_PRIVATE_USAGE = // 0 args
061: "Driver.Private.Usage";
062:
063: static final String ADDON_USAGE = // 0 args
064: "Driver.AddonUsage";
065:
066: static final String EXPERIMENTAL_LANGUAGE_WARNING = // 2 arg
067: "Driver.ExperimentalLanguageWarning";
068:
069: static final String MISSING_CLASSPATH = // 0 args
070: "Driver.MissingClassPath";
071:
072: static final String MISSING_DIR = // 0 args
073: "Driver.MissingDir";
074:
075: static final String NON_EXISTENT_DIR = // 1 arg
076: "Driver.NonExistentDir";
077:
078: static final String MISSING_FILENAME = // 0 args
079: "Driver.MissingFileName";
080:
081: static final String MISSING_PACKAGENAME = // 0 args
082: "Driver.MissingPackageName";
083:
084: static final String MISSING_RUNTIME_PACKAGENAME = // 0 args
085: "Driver.MissingRuntimePackageName";
086:
087: static final String MISSING_MODE_OPERAND = // 0 args
088: "Driver.MissingModeOperand";
089:
090: static final String MISSING_CATALOG = // 0 args
091: "Driver.MissingCatalog";
092:
093: static final String MISSING_COMPATIBILITY_OPERAND = // 0 args
094: "Driver.MissingCompatibilityOperand";
095:
096: static final String MISSING_PROXY = // 0 args
097: "Driver.MISSING_PROXY";
098:
099: static final String MISSING_PROXYFILE = // 0 args
100: "Driver.MISSING_PROXYFILE";
101:
102: static final String NO_SUCH_FILE = // 1 arg
103: "Driver.NO_SUCH_FILE";
104:
105: static final String ILLEGAL_PROXY = // 1 arg
106: "Driver.ILLEGAL_PROXY";
107:
108: static final String MISSING_PROXYHOST = // 0 args
109: "Driver.MissingProxyHost";
110:
111: static final String MISSING_PROXYPORT = // 0 args
112: "Driver.MissingProxyPort";
113:
114: static final String STACK_OVERFLOW = // 0 arg
115: "Driver.StackOverflow";
116:
117: static final String UNRECOGNIZED_MODE = // 1 arg
118: "Driver.UnrecognizedMode";
119:
120: static final String UNRECOGNIZED_PARAMETER = // 1 arg
121: "Driver.UnrecognizedParameter";
122:
123: static final String MISSING_GRAMMAR = // 0 args
124: "Driver.MissingGrammar";
125:
126: static final String PARSING_SCHEMA = // 0 args
127: "Driver.ParsingSchema";
128:
129: static final String PARSE_FAILED = // 0 args
130: "Driver.ParseFailed";
131:
132: static final String COMPILING_SCHEMA = // 0 args
133: "Driver.CompilingSchema";
134:
135: static final String FAILED_TO_GENERATE_CODE = // 0 args
136: "Driver.FailedToGenerateCode";
137:
138: static final String FILE_PROLOG_COMMENT = // 1 arg
139: "Driver.FilePrologComment";
140:
141: static final String DATE_FORMAT = // 0 args
142: "Driver.DateFormat";
143:
144: static final String TIME_FORMAT = // 0 args
145: "Driver.TimeFormat";
146:
147: static final String AT = // 0 args
148: "Driver.At";
149:
150: static final String VERSION = // 0 args
151: "Driver.Version";
152:
153: static final String BUILD_ID = // 0 args
154: "Driver.BuildID";
155:
156: static final String ERROR_MSG = // 1:arg
157: "Driver.ErrorMessage";
158:
159: static final String WARNING_MSG = // 1:arg
160: "Driver.WarningMessage";
161:
162: static final String INFO_MSG = // 1:arg
163: "Driver.InfoMessage";
164:
165: static final String ERR_NOT_A_BINDING_FILE = // 2 arg
166: "Driver.NotABindingFile";
167:
168: static final String ERR_TOO_MANY_SCHEMA = // 0 args
169: "ModelLoader.TooManySchema";
170:
171: static final String ERR_BINDING_FILE_NOT_SUPPORTED_FOR_RNC = // 0 args
172: "ModelLoader.BindingFileNotSupportedForRNC";
173:
174: static final String MISSING_VERSION = // 0 args
175: "Driver.MissingVersion";
176:
177: static final String DEFAULT_VERSION = // 0 args
178: "Driver.DefaultVersion";
179:
180: static final String DEFAULT_PACKAGE_WARNING = // 0 args
181: "Driver.DefaultPackageWarning";
182:
183: static final String NOT_A_VALID_FILENAME = // 2 args
184: "Driver.NotAValidFileName";
185: static final String FAILED_TO_PARSE = // 2 args
186: "Driver.FailedToParse";
187: static final String NOT_A_FILE_NOR_URL = // 1 arg
188: "Driver.NotAFileNorURL";
189:
190: static final String FIELD_RENDERER_CONFLICT = // 2 args
191: "FIELD_RENDERER_CONFLICT";
192:
193: static final String NAME_CONVERTER_CONFLICT = // 2 args
194: "NAME_CONVERTER_CONFLICT";
195: }
|