59N/A/*
157N/A * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
59N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
59N/A *
59N/A * This code is free software; you can redistribute it and/or modify it
59N/A * under the terms of the GNU General Public License version 2 only, as
157N/A * published by the Free Software Foundation. Oracle designates this
59N/A * particular file as subject to the "Classpath" exception as provided
157N/A * by Oracle in the LICENSE file that accompanied this code.
59N/A *
59N/A * This code is distributed in the hope that it will be useful, but WITHOUT
59N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
59N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
59N/A * version 2 for more details (a copy is included in the LICENSE file that
59N/A * accompanied this code).
59N/A *
59N/A * You should have received a copy of the GNU General Public License version
59N/A * 2 along with this work; if not, write to the Free Software Foundation,
59N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
59N/A *
157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A * or visit www.oracle.com if you need additional information or have any
157N/A * questions.
59N/A */
59N/Apackage com.sun.tools.corba.se.logutil;
59N/A
59N/Apublic class InputCode {
59N/A
59N/A /**
59N/A * The name of this code.
59N/A */
59N/A private final String name;
59N/A
59N/A /**
59N/A * The code.
59N/A */
59N/A private final int code;
59N/A
59N/A /**
59N/A * The log level for this code.
59N/A */
59N/A private final String logLevel;
59N/A
59N/A /**
59N/A * The error message for this code.
59N/A */
59N/A private final String message;
59N/A
59N/A /**
59N/A * Creates a new error code with the specified name, code,
59N/A * log level and error message.
59N/A *
59N/A * @param name the name of the new code.
59N/A * @param code the code itself.
59N/A * @param logLevel the level of severity of this error.
59N/A * @param message the error message for this code.
59N/A */
59N/A public InputCode(final String name, final int code,
59N/A final String logLevel, final String message) {
59N/A this.name = name;
59N/A this.code = code;
59N/A this.logLevel = logLevel;
59N/A this.message = message;
59N/A }
59N/A
59N/A /**
59N/A * Returns the name of this code.
59N/A *
59N/A * @return the name of the code.
59N/A */
59N/A public String getName() {
59N/A return name;
59N/A }
59N/A
59N/A /**
59N/A * Returns the code.
59N/A *
59N/A * @return the code.
59N/A */
59N/A public int getCode() {
59N/A return code;
59N/A }
59N/A
59N/A /**
59N/A * Returns the severity of this code.
59N/A *
59N/A * @return the log level severity of the code.
59N/A */
59N/A public String getLogLevel() {
59N/A return logLevel;
59N/A }
59N/A
59N/A /**
59N/A * Returns the error message for this code.
59N/A *
59N/A * @return the error message for this code.
59N/A */
59N/A public String getMessage() {
59N/A return message;
59N/A }
59N/A
59N/A /**
59N/A * Returns a textual representation of this code.
59N/A *
59N/A * @return a textual representation.
59N/A */
59N/A public String toString() {
59N/A return getClass().getName() +
59N/A "[name=" + name +
59N/A ",code=" + code +
59N/A ",logLevel=" + logLevel +
59N/A ",message=" + message +
59N/A "]";
59N/A }
59N/A
59N/A}