Messages.java.stub revision 3233
1008N/A/*
1008N/A * CDDL HEADER START
1008N/A *
1008N/A * The contents of this file are subject to the terms of the
1008N/A * Common Development and Distribution License, Version 1.0 only
1008N/A * (the "License"). You may not use this file except in compliance
1008N/A * with the License.
1008N/A *
1008N/A * You can obtain a copy of the license at
1008N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
1008N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
1008N/A * See the License for the specific language governing permissions
1008N/A * and limitations under the License.
1008N/A *
1008N/A * When distributing Covered Code, include this CDDL HEADER in each
1008N/A * file and include the License file at
1008N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
1008N/A * add the following below this CDDL HEADER, with the fields enclosed
1008N/A * by brackets "[]" replaced with your own identifying information:
1008N/A * Portions Copyright [yyyy] [name of copyright owner]
1008N/A *
1008N/A * CDDL HEADER END
1008N/A *
1008N/A *
1008N/A * Copyright 2006-2008 Sun Microsystems, Inc.
1008N/A */
1008N/A
1008N/Apackage ${PACKAGE};
1008N/A
1008N/Aimport org.opends.messages.MessageDescriptor;
1008N/Aimport static org.opends.messages.Category.*;
1008N/Aimport static org.opends.messages.Severity.*;
1008N/A
1008N/A/**
1008N/A * This file contains a number of constants that are used throughout the
1008N/A * Directory Server source. It was dynamically generated as part of the
1008N/A * Directory Server build process and should not be edited directly.
1008N/A */
1008N/A@org.opends.server.types.PublicAPI(
1008N/A stability=org.opends.server.types.StabilityLevel.PRIVATE,
1008N/A mayInstantiate=false,
1008N/A mayExtend=false,
1008N/A mayInvoke=true)
1008N/Apublic final class ${CLASS_NAME} {
1008N/A
1008N/A /** Base property for resource bundle containing messages */
1008N/A private static final String BASE = "${BASE}";
1008N/A
1008N/A private static ClassLoader webstartClassLoader;
1008N/A
1008N/A // Prevent instantiation.
1008N/A private ${CLASS_NAME}() {
1008N/A // Do nothing.
1008N/A }
1008N/A
1008N/A ${MESSAGES}
1008N/A
1008N/A /**
1008N/A * Returns the Class Loader to be used to get the ResourceBundle,
1008N/A * it returns <CODE>null</CODE> if the default ClassLoader is to be
1008N/A * used.
1008N/A * @return the Class Loader to be used to get the ResourceBundle,
1008N/A * it returns <CODE>null</CODE> if the default ClassLoader is to be
1008N/A * used.
1008N/A */
1008N/A private static ClassLoader getClassLoader()
1008N/A {
1008N/A ClassLoader cl;
1008N/A if (${USE_MESSAGE_JAR_IF_WEBSTART})
1008N/A {
1008N/A if (org.opends.server.util.SetupUtils.isWebStart())
1008N/A {
1008N/A if (webstartClassLoader == null)
1008N/A {
1008N/A try
1008N/A {
1008N/A Class<?> c = Class.forName("${PACKAGE}.${CLASS_NAME}");
1008N/A
1008N/A java.net.URL[] urls = new java.net.URL[] {
1008N/A c.getProtectionDomain().getCodeSource().getLocation()
1008N/A };
1008N/A webstartClassLoader = new java.net.URLClassLoader(urls);
1008N/A }
1008N/A catch (ClassNotFoundException cnfe)
1008N/A {
1008N/A // This cannot happen as we are looking for this class so it is
1008N/A // already found.
1008N/A }
1008N/A }
1008N/A cl = webstartClassLoader;
1008N/A }
1008N/A else
1008N/A {
1008N/A cl = null;
1548N/A }
1548N/A }
1548N/A else
1548N/A {
1548N/A cl = null;
1548N/A }
1565N/A return cl;
1565N/A }
1548N/A}
1548N/A