| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2007 BEA Systems, Inc. |
| 3 |
* |
| 4 |
* This program and the accompanying materials |
| 5 |
* are made available under the terms of the Eclipse Public License 2.0 |
| 6 |
* which accompanies this distribution, and is available at |
| 7 |
* https://www.eclipse.org/legal/epl-2.0/ |
| 8 |
* |
| 9 |
* SPDX-License-Identifier: EPL-2.0 |
| 10 |
*******************************************************************************/ |
| 11 |
|
| 12 |
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 13 |
// CAUTION! THIS FILE CONTAINS SPECIFIC COMBINATIONS OF TABS AND SPACES, |
| 14 |
// FOR TESTING WHITESPACE HANDLING IN JAVADOC. DO NOT REFORMAT OR MODIFY |
| 15 |
// WHITESPACE IN ANY JAVADOC IN THIS FILE. |
| 16 |
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 17 |
|
| 18 |
package targets.model.pc; |
| 19 |
|
| 20 |
/** |
| 21 |
* Javadoc on element F |
| 22 |
* @param <T1> a type parameter |
| 23 |
*/ |
| 24 |
@AnnoY("on F") |
| 25 |
public class F<T1> { |
| 26 |
/** |
| 27 |
* Javadoc on nested element FChild |
| 28 |
*/ |
| 29 |
public class FChild { |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Javadoc on nested enum FEnum |
| 34 |
* Two lines long |
| 35 |
*/ |
| 36 |
enum FEnum { FEnum1, FEnum2 } |
| 37 |
|
| 38 |
/** |
| 39 |
* Javadoc on nested interface FChildI |
| 40 |
* this line has tab after asterisk and ends with another tab |
| 41 |
* this one too |
| 42 |
* this line has three spaces after asterisk and ends with three spaces |
| 43 |
* this line has only one space before the asterisk |
| 44 |
*/ |
| 45 |
public interface FChildI {} |
| 46 |
|
| 47 |
/** Javadoc on field _fieldT1_protected, inline format */ |
| 48 |
protected T1 _fieldT1_protected; |
| 49 |
|
| 50 |
// Next line has a space at the end, after the double asterisks |
| 51 |
/** |
| 52 |
* Javadoc on _fieldT1_private |
| 53 |
this line starts with two spaces, no asterisk |
| 54 |
This line starts, contains and ends with a tab |
| 55 |
This line starts with a space, tab, space, tab, space |
| 56 |
*/ |
| 57 |
private T1 _fieldT1_private; |
| 58 |
|
| 59 |
int fieldInt; |
| 60 |
|
| 61 |
/** |
| 62 |
* Javadoc on F.method_T1 |
| 63 |
*/ |
| 64 |
@AnnoY("on F.method_T1") |
| 65 |
T1 method_T1(T1 param1) |
| 66 |
{ |
| 67 |
return null; |
| 68 |
} |
| 69 |
|
| 70 |
String method_String(T1 param1) |
| 71 |
{ |
| 72 |
_fieldT1_private = param1; |
| 73 |
return _fieldT1_private.toString(); |
| 74 |
} |
| 75 |
|
| 76 |
// not hidden by G.staticMethod() - private |
| 77 |
private static void staticMethod() |
| 78 |
{ |
| 79 |
} |
| 80 |
|
| 81 |
// not hidden by G.staticMethod - different name |
| 82 |
public static void staticMethod2() |
| 83 |
{ |
| 84 |
} |
| 85 |
|
| 86 |
@SuppressWarnings("deprecation") |
| 87 |
@Deprecated |
| 88 |
void deprecatedMethod() |
| 89 |
{ |
| 90 |
} |
| 91 |
|
| 92 |
// unrelated to the same-signature methods in Overriding.java |
| 93 |
void f() {} |
| 94 |
|
| 95 |
/************************/ |
| 96 |
/*** Abstract methods ***/ |
| 97 |
/************************/ |
| 98 |
|
| 99 |
public Object getAnonymousObjectAbstract() { |
| 100 |
return null; |
| 101 |
} |
| 102 |
|
| 103 |
/** |
| 104 |
* @add(int) |
| 105 |
*/ |
| 106 |
int add (int j) { |
| 107 |
return j + j; |
| 108 |
} |
| 109 |
|
| 110 |
/** |
| 111 |
* Creates a new instance of AllChecks |
| 112 |
*/ |
| 113 |
public void foo() { |
| 114 |
} |
| 115 |
|
| 116 |
/** |
| 117 |
* @bar (int) |
| 118 |
*/ |
| 119 |
int bar(int i) { return i; } |
| 120 |
|
| 121 |
/** |
| 122 |
* @bar2(int) |
| 123 |
*/ |
| 124 |
int bar2(int i) { return i; } |
| 125 |
|
| 126 |
/** |
| 127 |
Method m |
| 128 |
*/ |
| 129 |
void m() {} |
| 130 |
|
| 131 |
/** This is a comment for the method m1, |
| 132 |
* it is on two lines |
| 133 |
*/ |
| 134 |
void m1() {} |
| 135 |
|
| 136 |
/** Another comment - starts on first line and |
| 137 |
continue on the second line */ |
| 138 |
void m2() {} |
| 139 |
|
| 140 |
/** |
| 141 |
* One more test case that. |
| 142 |
* needs |
| 143 |
* to be verified. |
| 144 |
* |
| 145 |
* An empty line with no spaces need to be seen as an empty line. |
| 146 |
* |
| 147 |
* End of the comment. |
| 148 |
*/ |
| 149 |
void m3() {} |
| 150 |
} |