langtools/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/Throws.java
author darcy
Mon, 15 Feb 2016 17:17:58 -0800
changeset 36038 39c5445924b9
parent 35426 374342e56a56
permissions -rw-r--r--
6469561: javadoc for annotation types should not display "public abstract" modifiers on methods 6469562: Use compact notation to display annotation values Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16964
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
     1
/*
36038
39c5445924b9 6469561: javadoc for annotation types should not display "public abstract" modifiers on methods
darcy
parents: 35426
diff changeset
     2
 * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
16964
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
     4
 *
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
     7
 * published by the Free Software Foundation.
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
     8
 *
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    13
 * accompanied this code).
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    14
 *
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    18
 *
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    21
 * questions.
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    22
 */
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    23
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    24
package typeannos;
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    25
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    26
import java.lang.annotation.*;
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    27
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    28
/*
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    29
 * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    30
 */
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    31
class ThrDefaultUnmodified {
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    32
    void oneException() throws @ThrA Exception {}
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    33
    void twoExceptions() throws @ThrA RuntimeException, @ThrA Exception {}
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    34
}
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    35
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    36
class ThrPublicModified {
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    37
    public final void oneException(String a) throws @ThrA Exception {}
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    38
    public final void twoExceptions(String a) throws @ThrA RuntimeException, @ThrA Exception {}
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    39
}
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    40
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    41
class ThrWithValue {
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    42
    void oneException() throws @ThrB("m") Exception {}
36038
39c5445924b9 6469561: javadoc for annotation types should not display "public abstract" modifiers on methods
darcy
parents: 35426
diff changeset
    43
    void twoExceptions() throws @ThrB("m") RuntimeException, @ThrA Exception {}
16964
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    44
}
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    45
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    46
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    47
@Documented
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    48
@interface ThrA {}
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    49
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    50
@Documented
096de5815398 8005091: javadoc should be able to return the receiver type
bpatel
parents:
diff changeset
    51
@interface ThrB { String value(); }