| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2017 IBM Corporation. |
| 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 |
* Contributors: |
| 12 |
* IBM Corporation - initial API and implementation |
| 13 |
*******************************************************************************/ |
| 14 |
package targets.model9; |
| 15 |
|
| 16 |
import org.eclipse.jdt.compiler.apt.tests.annotations.Type; |
| 17 |
import org.eclipse.jdt.compiler.apt.tests.annotations.Type1; |
| 18 |
import org.eclipse.jdt.compiler.apt.tests.annotations.Type$1; |
| 19 |
import org.eclipse.jdt.compiler.apt.tests.annotations.Type.One; |
| 20 |
|
| 21 |
@Type("c") |
| 22 |
public class X extends @Type("s") Object implements @Type("i1") I, @Type("i2") J { |
| 23 |
@Type("f") String _field = null; |
| 24 |
@Type("f1") X _field1 = null; |
| 25 |
@Type("f1") X _field11 = null; |
| 26 |
@Type$1 @One String _field2 = null; |
| 27 |
X _field3 = null; |
| 28 |
int _i = 10; |
| 29 |
public void noAnnotationHere() { |
| 30 |
} |
| 31 |
@Deprecated @Type("m") String foo() { |
| 32 |
return null; |
| 33 |
} |
| 34 |
void bar(@Type("p1") String p1, @Type("p2") String p2) {} |
| 35 |
public void bar2(@Type("receiver") X this) {} |
| 36 |
// Static methods and top level constructors do not have receivers |
| 37 |
public static void main(String[] args) {} |
| 38 |
@Type("constr1") public X(){} |
| 39 |
@Type1("constr2") public X(int i){} |
| 40 |
} |
| 41 |
|
| 42 |
interface I {} |
| 43 |
interface J {} |