Debian Codegraph @

javaparser-symbol-solver-testing/src/test/resources/Annotations.java.txt

raw
1 package foo.bar;
2
3 import java.lang.annotation.*;
4 import java.beans.*;
5 import org.junit.*;
6 import com.github.javaparser.symbolsolver.testingclasses.TargetType;
7
8 @Target(ElementType.TYPE)
9 @Retention(RetentionPolicy.RUNTIME)
10 public @interface MyAnnotation {
11 }
12
13 public @interface MyAnnotation2 {
14 }
15
16 public @interface MyAnnotationWithSingleValue {
17 int value();
18 }
19
20 public @interface MyAnnotationWithElements {
21 int num();
22 String str();
23 }
24
25 public @interface MyAnnotationWithInnerClass {
26 MyInnerClass value();
27 class MyInnerClass {
28 }
29 }
30
31 public @interface MyAnnotationWithDefaultValue {
32 int value() default 0;
33 }
34
35 @MyAnnotation
36 class CA {
37 @Override
38 public boolean equals(Object o) { return true; }
39
40 @Before
41 public void setUp() {}
42 }
43
44 @MyAnnotation2
45 class CB extends CA {
46
47 }
48
49 @MyAnnotationWithSingleValue(42)
50 class CC {
51 public boolean foo(Object o) { @SuppressWarnings("unchecked") String s = (String) o; }
52
53 @Ignore("lalala") @Test public void testSomething() {}
54 }
55
56 @MyAnnotationWithElements(num = 42, str = "test")
57 class CD {
58 @Test(expected = Throwable.class, timeout = 42L) public void testSomethingElse() {}
59 }
60
61 @foo.bar.MyAnnotation
62 @org.junit.runner.RunWith(CE.class)
63 class CE {
64 @org.junit.Ignore("ignore text") public void testSomething() {}
65 }
66
67 @MyAnnotationWithDefaultValue()
68 class CF {
69 }
70
71 @MyAnnotationWithDefaultValue()
72 class CG {
73 @Ignore public void testSomething() {}
74 }
75
76 class CH {
77 @Transient public String field;
78 }
79
80 @TargetType
81 class CI {
82 }
83
84 @Inherited
85 public @interface InheritedAnnotation {
86 }
87
88 @InheritedAnnotation
89 class Parent {}
90 class Child extends Parent {}
91