1 /* 2 * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package de.smartics.properties.api.core.context.alias; 17 18 19 /** 20 * Signals problems with an alias. 21 */ 22 public abstract class AliasException extends RuntimeException // NOPMD 23 { 24 // ********************************* Fields ********************************* 25 26 // --- constants ------------------------------------------------------------ 27 28 /** 29 * The class version identifier. 30 * <p> 31 * The value of this constant is {@value}. 32 */ 33 private static final long serialVersionUID = 1L; 34 35 // --- members -------------------------------------------------------------- 36 37 /** 38 * The alias that signals a problem. 39 */ 40 private final String alias; 41 42 // ****************************** Initializer ******************************* 43 44 // ****************************** Constructors ****************************** 45 46 /** 47 * Default constructor. 48 * 49 * @param message the detail message (which is saved for later retrieval by 50 * the {@link #getMessage()} method). 51 * @param cause the cause (which is saved for later retrieval by the 52 * {@link #getCause()} method). (A <tt>null</tt> value is permitted, 53 * and indicates that the cause is nonexistent or unknown.) 54 * @param alias the alias that signals a problem. 55 */ 56 public AliasException(final String message, final Throwable cause, 57 final String alias) 58 { 59 super(message, cause); 60 this.alias = alias; 61 } 62 63 // ****************************** Inner Classes ***************************** 64 65 // ********************************* Methods ******************************** 66 67 // --- init ----------------------------------------------------------------- 68 69 // --- get&set -------------------------------------------------------------- 70 71 /** 72 * Returns the alias that signals a problem. 73 * 74 * @return the alias that signals a problem. 75 */ 76 public final String getAlias() 77 { 78 return alias; 79 } 80 81 // --- business ------------------------------------------------------------- 82 83 // --- object basics -------------------------------------------------------- 84 85 }