01: /*
02: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
03: *
04: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
05: *
06: * The contents of this file are subject to the terms of either the GNU
07: * General Public License Version 2 only ("GPL") or the Common Development
08: * and Distribution License("CDDL") (collectively, the "License"). You
09: * may not use this file except in compliance with the License. You can obtain
10: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
11: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
12: * language governing permissions and limitations under the License.
13: *
14: * When distributing the software, include this License Header Notice in each
15: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
16: * Sun designates this particular file as subject to the "Classpath" exception
17: * as provided by Sun in the GPL Version 2 section of the License file that
18: * accompanied this code. If applicable, add the following below the License
19: * Header, with the fields enclosed by brackets [] replaced by your own
20: * identifying information: "Portions Copyrighted [year]
21: * [name of copyright owner]"
22: *
23: * Contributor(s):
24: *
25: * If you wish your version of this file to be governed by only the CDDL or
26: * only the GPL Version 2, indicate your decision by adding "[Contributor]
27: * elects to include this software in this distribution under the [CDDL or GPL
28: * Version 2] license." If you don't indicate a single choice of license, a
29: * recipient has the option to distribute your version of this file under
30: * either the CDDL, the GPL Version 2 or to extend the choice of license to
31: * its licensees as provided above. However, if you add GPL Version 2 code
32: * and therefore, elected the GPL Version 2 license, then the option applies
33: * only if the new code is made subject to such option by the copyright
34: * holder.
35: */
36:
37: package com.sun.tools.xjc.reader.internalizer;
38:
39: import java.text.MessageFormat;
40: import java.util.ResourceBundle;
41:
42: /**
43: * Formats error messages.
44: */
45: class Messages {
46: /** Loads a string resource and formats it with specified arguments. */
47: static String format(String property, Object... args) {
48: String text = ResourceBundle.getBundle(
49: Messages.class.getPackage().getName()
50: + ".MessageBundle").getString(property);
51: return MessageFormat.format(text, args);
52: }
53:
54: static final String ERR_INCORRECT_SCHEMA_REFERENCE = // args:2
55: "Internalizer.IncorrectSchemaReference";
56: static final String ERR_XPATH_EVAL = // arg:1
57: "Internalizer.XPathEvaluationError";
58: static final String NO_XPATH_EVAL_TO_NO_TARGET = // arg:1
59: "Internalizer.XPathEvaluatesToNoTarget";
60: static final String NO_XPATH_EVAL_TOO_MANY_TARGETS = // arg:2
61: "Internalizer.XPathEvaulatesToTooManyTargets";
62: static final String NO_XPATH_EVAL_TO_NON_ELEMENT = // arg:1
63: "Internalizer.XPathEvaluatesToNonElement";
64: static final String XPATH_EVAL_TO_NON_SCHEMA_ELEMENT = // arg:2
65: "Internalizer.XPathEvaluatesToNonSchemaElement";
66: static final String SCD_NOT_ENABLED = // arg:0
67: "SCD_NOT_ENABLED";
68: static final String ERR_SCD_EVAL = // arg: 1
69: "ERR_SCD_EVAL";
70: static final String ERR_SCD_EVALUATED_EMPTY = // arg:1
71: "ERR_SCD_EVALUATED_EMPTY";
72: static final String ERR_SCD_MATCHED_MULTIPLE_NODES = // arg:2
73: "ERR_SCD_MATCHED_MULTIPLE_NODES";
74: static final String ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = // arg:1
75: "ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST";
76: static final String ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = // arg:1
77: "ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND";
78: static final String CONTEXT_NODE_IS_NOT_ELEMENT = // arg:0
79: "Internalizer.ContextNodeIsNotElement";
80: static final String ERR_INCORRECT_VERSION = // arg:0
81: "Internalizer.IncorrectVersion";
82: static final String ERR_VERSION_NOT_FOUND = // arg:0
83: "Internalizer.VersionNotPresent";
84: static final String TWO_VERSION_ATTRIBUTES = // arg:0
85: "Internalizer.TwoVersionAttributes";
86: static final String ORPHANED_CUSTOMIZATION = // arg:1
87: "Internalizer.OrphanedCustomization";
88: static final String ERR_UNABLE_TO_PARSE = // arg:2
89: "AbstractReferenceFinderImpl.UnableToParse";
90: static final String ERR_FILENAME_IS_NOT_URI = // arg:0
91: "ERR_FILENAME_IS_NOT_URI";
92: static final String ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = // arg:1
93: "ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR";
94: }
|