01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with this
04: * work for additional information regarding copyright ownership. The ASF
05: * licenses this file to you under the Apache License, Version 2.0 (the
06: * "License"); you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14: * License for the specific language governing permissions and limitations under
15: * the License.
16: */
17:
18: package java.lang.annotation;
19:
20: /**
21: * <p>
22: * Indicates that an annotation in a class file is incorrectly formatted.
23: * </p>
24: *
25: * @since 1.5
26: */
27: public class AnnotationFormatError extends Error {
28:
29: private static final long serialVersionUID = -4256701562333669892L;
30:
31: /**
32: * <p>
33: * Constructs an instance with the message provided.
34: * </p>
35: *
36: * @param message The details of the error.
37: */
38: public AnnotationFormatError(String message) {
39: super (message);
40: }
41:
42: /**
43: * <p>
44: * Constructs an instance with a message and a cause.
45: * </p>
46: *
47: * @param message The details of the error.
48: * @param cause The cause of the error or <code>null</code> if none.
49: */
50: public AnnotationFormatError(String message, Throwable cause) {
51: super (message, cause);
52: }
53:
54: /**
55: * <p>
56: * Constructs an instance with a cause. If the cause is NOT
57: * <code>null</code>, then <code>cause.toString()</code> is used as the
58: * error's message.
59: * </p>
60: *
61: * @param cause The cause of the error or <code>null</code> if none.
62: */
63: public AnnotationFormatError(Throwable cause) {
64: super(cause == null ? null : cause.toString(), cause);
65: }
66:
67: }
|