rt/emul/compact/src/main/java/java/lang/annotation/AnnotationFormatError.java
author Jaroslav Tulach <jtulach@netbeans.org>
Mon, 21 Oct 2013 14:38:36 +0200
branchjdk7-b147
changeset 1379 b5f9d743a090
permissions -rw-r--r--
Adding annotation classes into the emulation layer
jtulach@1379
     1
/*
jtulach@1379
     2
 * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
jtulach@1379
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jtulach@1379
     4
 *
jtulach@1379
     5
 * This code is free software; you can redistribute it and/or modify it
jtulach@1379
     6
 * under the terms of the GNU General Public License version 2 only, as
jtulach@1379
     7
 * published by the Free Software Foundation.  Oracle designates this
jtulach@1379
     8
 * particular file as subject to the "Classpath" exception as provided
jtulach@1379
     9
 * by Oracle in the LICENSE file that accompanied this code.
jtulach@1379
    10
 *
jtulach@1379
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
jtulach@1379
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jtulach@1379
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
jtulach@1379
    14
 * version 2 for more details (a copy is included in the LICENSE file that
jtulach@1379
    15
 * accompanied this code).
jtulach@1379
    16
 *
jtulach@1379
    17
 * You should have received a copy of the GNU General Public License version
jtulach@1379
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
jtulach@1379
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jtulach@1379
    20
 *
jtulach@1379
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jtulach@1379
    22
 * or visit www.oracle.com if you need additional information or have any
jtulach@1379
    23
 * questions.
jtulach@1379
    24
 */
jtulach@1379
    25
jtulach@1379
    26
package java.lang.annotation;
jtulach@1379
    27
jtulach@1379
    28
/**
jtulach@1379
    29
 * Thrown when the annotation parser attempts to read an annotation
jtulach@1379
    30
 * from a class file and determines that the annotation is malformed.
jtulach@1379
    31
 * This error can be thrown by the {@linkplain
jtulach@1379
    32
 * java.lang.reflect.AnnotatedElement API used to read annotations
jtulach@1379
    33
 * reflectively}.
jtulach@1379
    34
 *
jtulach@1379
    35
 * @author  Josh Bloch
jtulach@1379
    36
 * @see     java.lang.reflect.AnnotatedElement
jtulach@1379
    37
 * @since   1.5
jtulach@1379
    38
 */
jtulach@1379
    39
public class AnnotationFormatError extends Error {
jtulach@1379
    40
    private static final long serialVersionUID = -4256701562333669892L;
jtulach@1379
    41
jtulach@1379
    42
    /**
jtulach@1379
    43
     * Constructs a new <tt>AnnotationFormatError</tt> with the specified
jtulach@1379
    44
     * detail message.
jtulach@1379
    45
     *
jtulach@1379
    46
     * @param   message   the detail message.
jtulach@1379
    47
     */
jtulach@1379
    48
    public AnnotationFormatError(String message) {
jtulach@1379
    49
        super(message);
jtulach@1379
    50
    }
jtulach@1379
    51
jtulach@1379
    52
    /**
jtulach@1379
    53
     * Constructs a new <tt>AnnotationFormatError</tt> with the specified
jtulach@1379
    54
     * detail message and cause.  Note that the detail message associated
jtulach@1379
    55
     * with <code>cause</code> is <i>not</i> automatically incorporated in
jtulach@1379
    56
     * this error's detail message.
jtulach@1379
    57
     *
jtulach@1379
    58
     * @param  message the detail message
jtulach@1379
    59
     * @param  cause the cause (A <tt>null</tt> value is permitted, and
jtulach@1379
    60
     *     indicates that the cause is nonexistent or unknown.)
jtulach@1379
    61
     */
jtulach@1379
    62
    public AnnotationFormatError(String message, Throwable cause) {
jtulach@1379
    63
        super(message, cause);
jtulach@1379
    64
    }
jtulach@1379
    65
jtulach@1379
    66
jtulach@1379
    67
    /**
jtulach@1379
    68
     * Constructs a new <tt>AnnotationFormatError</tt> with the specified
jtulach@1379
    69
     * cause and a detail message of
jtulach@1379
    70
     * <tt>(cause == null ? null : cause.toString())</tt> (which
jtulach@1379
    71
     * typically contains the class and detail message of <tt>cause</tt>).
jtulach@1379
    72
     *
jtulach@1379
    73
     * @param  cause the cause (A <tt>null</tt> value is permitted, and
jtulach@1379
    74
     *     indicates that the cause is nonexistent or unknown.)
jtulach@1379
    75
     */
jtulach@1379
    76
    public AnnotationFormatError(Throwable cause) {
jtulach@1379
    77
        super(cause);
jtulach@1379
    78
    }
jtulach@1379
    79
}