@@ -0,0 +1,6 @@ | |||
package com.foo; | |||
import java.lang.annotation.*; | |||
@Retention(RetentionPolicy.RUNTIME) | |||
public @interface Anno { | |||
} |
@@ -0,0 +1,8 @@ | |||
package com.foo; | |||
import java.lang.annotation.*; | |||
@Deprecated | |||
@Inherited | |||
@Retention(RetentionPolicy.CLASS) | |||
public @interface Anno2 { | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.foo; | |||
import java.lang.annotation.*; | |||
@Anno | |||
@Retention(RetentionPolicy.SOURCE) | |||
public @interface Anno3 { | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.foo; | |||
import java.lang.annotation.*; | |||
@Anno | |||
@Anno2 | |||
public @interface Anno4 { | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.foo; | |||
import java.lang.annotation.*; | |||
@Target({ElementType.TYPE,ElementType.FIELD}) | |||
public @interface Anno5 { | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.foo; | |||
import java.lang.annotation.*; | |||
@Target({ElementType.ANNOTATION_TYPE,ElementType.LOCAL_VARIABLE,ElementType.METHOD,ElementType.PACKAGE,ElementType.PARAMETER,ElementType.CONSTRUCTOR}) | |||
public @interface Anno6 { | |||
} |
@@ -0,0 +1,4 @@ | |||
package com.foo; | |||
public class Bar { | |||
} |
@@ -0,0 +1,3 @@ | |||
package com.foo; | |||
enum Color {R,G,B} |
@@ -0,0 +1,5 @@ | |||
package com.foo; | |||
public @interface ColorAnno { | |||
Color c(); | |||
} |
@@ -0,0 +1,5 @@ | |||
package com.foo; | |||
@ColorAnno(c=Color.G) | |||
public class Colored { | |||
} |
@@ -0,0 +1,11 @@ | |||
package com.foo; | |||
public class Extender extends Super implements Marker { | |||
public void aMethod(String aString) {} | |||
public int aField; | |||
} | |||
class Super {} | |||
interface Marker {} |
@@ -0,0 +1,13 @@ | |||
package com.foo; | |||
public class Inners { | |||
public static class Inner { | |||
} | |||
Runnable r = new Runnable() { | |||
public void run() { | |||
} | |||
}; | |||
} |
@@ -0,0 +1,5 @@ | |||
package com; | |||
import java.lang.annotation.*; | |||
@Retention(RetentionPolicy.RUNTIME) | |||
public @interface Anno {} |
@@ -0,0 +1,7 @@ | |||
package com; | |||
import java.lang.annotation.*; | |||
@Retention(RetentionPolicy.RUNTIME) | |||
public @interface Anno2 { | |||
int a(); | |||
} |
@@ -0,0 +1,15 @@ | |||
package com; | |||
import java.util.*; | |||
public class Foo { | |||
public int i; | |||
public String s; | |||
@Anno | |||
public List<String> ls; | |||
@Anno2(a=42) @Anno | |||
public List<Integer> li; | |||
} |
@@ -0,0 +1,5 @@ | |||
package com; | |||
import java.lang.annotation.*; | |||
@Retention(RetentionPolicy.RUNTIME) | |||
public @interface Anno {} |
@@ -0,0 +1,7 @@ | |||
package com; | |||
import java.lang.annotation.*; | |||
@Retention(RetentionPolicy.RUNTIME) | |||
public @interface Anno2 { | |||
int a(); | |||
} |
@@ -0,0 +1,12 @@ | |||
package com; | |||
import java.util.List; | |||
public class Meths { | |||
@Anno | |||
public void m() { } | |||
@Anno @Anno2(a=3254) | |||
private List<String> n(int i,long l,List<Integer> li) {return null;} | |||
} |
@@ -0,0 +1,8 @@ | |||
package com; | |||
public class One { | |||
public class Inner { | |||
} | |||
public static class StaticInner { | |||
} | |||
} |
@@ -0,0 +1,7 @@ | |||
package com; | |||
public class Two { | |||
public static void main(String[] argv) { | |||
new One(); | |||
} | |||
} |