jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/NullLocalizable.java
author alanb
Tue, 09 Apr 2013 14:51:13 +0100
changeset 16791 fe5141eabb0e
child 22679 d785acd84a14
permissions -rw-r--r--
8010393: Update JAX-WS RI to 2.2.9-b12941 Reviewed-by: alanb, erikj Contributed-by: miroslav.kos@oracle.com, martin.grebac@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16791
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     1
/*
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     2
 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     4
 *
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    10
 *
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    15
 * accompanied this code).
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    16
 *
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    20
 *
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    23
 * questions.
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    24
 */
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    25
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    26
package com.sun.istack.internal.localization;
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    27
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    28
/**
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    29
 * {@link Localizable} that wraps a non-localizable string.
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    30
 *
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    31
 * @author WS Development Team
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    32
 */
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    33
public final class NullLocalizable implements Localizable {
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    34
    private final String msg;
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    35
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    36
    public NullLocalizable(String msg) {
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    37
        if(msg==null)
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    38
            throw new IllegalArgumentException();
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    39
        this.msg = msg;
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    40
    }
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    41
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    42
    public String getKey() {
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    43
        return Localizable.NOT_LOCALIZABLE;
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    44
    }
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    45
    public Object[] getArguments() {
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    46
        return new Object[]{msg};
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    47
    }
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    48
    public String getResourceBundleName() {
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    49
        return "";
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    50
    }
fe5141eabb0e 8010393: Update JAX-WS RI to 2.2.9-b12941
alanb
parents:
diff changeset
    51
}