TestTagInheritence.java revision 3233:b5d08bc0d224
1178479Sjb/* 2178479Sjb * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved. 3178479Sjb * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4178479Sjb * 5178479Sjb * This code is free software; you can redistribute it and/or modify it 6178479Sjb * under the terms of the GNU General Public License version 2 only, as 7178479Sjb * published by the Free Software Foundation. 8178479Sjb * 9178479Sjb * This code is distributed in the hope that it will be useful, but WITHOUT 10178479Sjb * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11178479Sjb * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12178479Sjb * version 2 for more details (a copy is included in the LICENSE file that 13178479Sjb * accompanied this code). 14178479Sjb * 15178479Sjb * You should have received a copy of the GNU General Public License version 16178479Sjb * 2 along with this work; if not, write to the Free Software Foundation, 17178479Sjb * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18178479Sjb * 19178479Sjb * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20178479Sjb * or visit www.oracle.com if you need additional information or have any 21178479Sjb * questions. 22178479Sjb */ 23178479Sjb 24178479Sjbpackage pkg; 25178479Sjb 26178479Sjbimport java.lang.*; 27178479Sjbimport java.io.*; 28178479Sjb 29178479Sjbpublic class TestTagInheritence extends TestAbstractClass implements TestInterface{ 30178479Sjb 31178479Sjb //This method below tests tag inheritence from a class. 32178479Sjb 33178479Sjb 34178479Sjb public String testAbstractClass_method1(int p1, int p2) throws java.io.IOException, 35178479Sjbjava.lang.NullPointerException { 36178479Sjb return null; 37178479Sjb } 38178479Sjb 39178479Sjb /** 40178479Sjb * This method tests @inheritDoc with a class. Here is the inherited comment:<br> 41178479Sjb * {@inheritDoc} 42178479Sjb * @param p1 {@inheritDoc} 43178479Sjb * @param p2 {@inheritDoc} 44178479Sjb * @return {@inheritDoc} 45178479Sjb * @throws java.io.IOException {@inheritDoc} 46178479Sjb * @throws java.lang.NullPointerException {@inheritDoc} 47178479Sjb */ 48178479Sjb public String testAbstractClass_method2(int p1, int p2) throws java.io.IOException, 49178479Sjbjava.lang.NullPointerException { 50178479Sjb return null; 51178479Sjb } 52178479Sjb 53178479Sjb public String testInterface_method1(int p1, int p2) throws java.io.IOException, 54178479Sjbjava.lang.NullPointerException 55178479Sjb { 56178479Sjb return null; 57178479Sjb } 58178479Sjb 59178479Sjb /** 60178479Sjb * This method tests @inheritDoc with an inteface. Here is the inherited comment:<br> 61178479Sjb * {@inheritDoc} 62178479Sjb * @param p1 {@inheritDoc} 63178479Sjb * @param p2 {@inheritDoc} 64178479Sjb * @return {@inheritDoc} 65178479Sjb * @throws java.io.IOException {@inheritDoc} 66178479Sjb * @throws java.lang.NullPointerException {@inheritDoc} 67178479Sjb */ 68178479Sjb public String testInterface_method2(int p1, int p2) throws java.io.IOException, 69178479Sjbjava.lang.NullPointerException { 70178479Sjb return null; 71178479Sjb } 72178479Sjb 73178479Sjb /** 74178479Sjb * Here is the documentation that I should inherit from 75178479Sjb * the interface implemented by my superclass. 76178479Sjb * {@inheritDoc} 77178479Sjb */ 78178479Sjb public void methodInTestInterfaceForAbstractClass() {} 79178479Sjb 80178479Sjb /** 81178479Sjb * {@inheritDoc} 82178479Sjb */ 83178479Sjb public void testSuperSuperMethod() {} 84178479Sjb 85178479Sjb /** 86178479Sjb * Test inheritDoc warning message: 87178479Sjb * {@inheritDoc} 88178479Sjb */ 89178479Sjb public void testBadInheritDocTag () {} 90178479Sjb 91178479Sjb /** 92178479Sjb * {@inheritDoc} 93178479Sjb * @param <X> {@inheritDoc} 94178479Sjb * @param <Y> {@inheritDoc} 95178479Sjb * @param p1 {@inheritDoc} 96178479Sjb * @param p2 {@inheritDoc} 97178479Sjb * @return {@inheritDoc} 98178479Sjb * @throws java.io.IOException {@inheritDoc} 99178479Sjb * @throws java.lang.NullPointerException {@inheritDoc} 100178479Sjb */ 101178479Sjb public <X,Y> String testSuperSuperMethod(int p1, int p2) { 102178479Sjb return null; 103178479Sjb } 104178479Sjb 105178479Sjb public <X,Y> String testSuperSuperMethod2(int p1, int p2) 106178479Sjb throws java.io.IOException, java.lang.NullPointerException { 107178479Sjb return null; 108178479Sjb } 109178479Sjb 110178479Sjb} 111178479Sjb