mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8164819: Make javac's toString() on annotation objects consistent with core reflection
Reviewed-by: jjg, coleenp
This commit is contained in:
parent
7cff3750d9
commit
aeedfd44b0
38 changed files with 995 additions and 543 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -145,14 +145,20 @@ class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
||||||
result.append(type.getName());
|
result.append(type.getName());
|
||||||
result.append('(');
|
result.append('(');
|
||||||
boolean firstMember = true;
|
boolean firstMember = true;
|
||||||
for (Map.Entry<String, Object> e : memberValues.entrySet()) {
|
Set<Map.Entry<String, Object>> entries = memberValues.entrySet();
|
||||||
|
boolean loneValue = entries.size() == 1;
|
||||||
|
for (Map.Entry<String, Object> e : entries) {
|
||||||
if (firstMember)
|
if (firstMember)
|
||||||
firstMember = false;
|
firstMember = false;
|
||||||
else
|
else
|
||||||
result.append(", ");
|
result.append(", ");
|
||||||
|
|
||||||
result.append(e.getKey());
|
String key = e.getKey();
|
||||||
result.append('=');
|
if (!loneValue || !"value".equals(key)) {
|
||||||
|
result.append(key);
|
||||||
|
result.append('=');
|
||||||
|
}
|
||||||
|
loneValue = false;
|
||||||
result.append(memberValueToString(e.getValue()));
|
result.append(memberValueToString(e.getValue()));
|
||||||
}
|
}
|
||||||
result.append(')');
|
result.append(')');
|
||||||
|
@ -178,6 +184,8 @@ class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
||||||
return toSourceString((float) value);
|
return toSourceString((float) value);
|
||||||
else if (type == Long.class)
|
else if (type == Long.class)
|
||||||
return toSourceString((long) value);
|
return toSourceString((long) value);
|
||||||
|
else if (type == Byte.class)
|
||||||
|
return toSourceString((byte) value);
|
||||||
else
|
else
|
||||||
return value.toString();
|
return value.toString();
|
||||||
} else {
|
} else {
|
||||||
|
@ -221,14 +229,14 @@ class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
||||||
*/
|
*/
|
||||||
private static String toSourceString(Class<?> clazz) {
|
private static String toSourceString(Class<?> clazz) {
|
||||||
Class<?> finalComponent = clazz;
|
Class<?> finalComponent = clazz;
|
||||||
StringBuilder arrayBackets = new StringBuilder();
|
StringBuilder arrayBrackets = new StringBuilder();
|
||||||
|
|
||||||
while(finalComponent.isArray()) {
|
while(finalComponent.isArray()) {
|
||||||
finalComponent = finalComponent.getComponentType();
|
finalComponent = finalComponent.getComponentType();
|
||||||
arrayBackets.append("[]");
|
arrayBrackets.append("[]");
|
||||||
}
|
}
|
||||||
|
|
||||||
return finalComponent.getName() + arrayBackets.toString() + ".class" ;
|
return finalComponent.getName() + arrayBrackets.toString() + ".class";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String toSourceString(float f) {
|
private static String toSourceString(float f) {
|
||||||
|
@ -256,18 +264,44 @@ class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
||||||
private static String toSourceString(char c) {
|
private static String toSourceString(char c) {
|
||||||
StringBuilder sb = new StringBuilder(4);
|
StringBuilder sb = new StringBuilder(4);
|
||||||
sb.append('\'');
|
sb.append('\'');
|
||||||
if (c == '\'')
|
sb.append(quote(c));
|
||||||
sb.append("\\'");
|
return sb.append('\'') .toString();
|
||||||
else
|
}
|
||||||
sb.append(c);
|
|
||||||
return sb.append('\'')
|
/**
|
||||||
.toString();
|
* Escapes a character if it has an escape sequence or is
|
||||||
|
* non-printable ASCII. Leaves non-ASCII characters alone.
|
||||||
|
*/
|
||||||
|
private static String quote(char ch) {
|
||||||
|
switch (ch) {
|
||||||
|
case '\b': return "\\b";
|
||||||
|
case '\f': return "\\f";
|
||||||
|
case '\n': return "\\n";
|
||||||
|
case '\r': return "\\r";
|
||||||
|
case '\t': return "\\t";
|
||||||
|
case '\'': return "\\'";
|
||||||
|
case '\"': return "\\\"";
|
||||||
|
case '\\': return "\\\\";
|
||||||
|
default:
|
||||||
|
return (isPrintableAscii(ch))
|
||||||
|
? String.valueOf(ch)
|
||||||
|
: String.format("\\u%04x", (int) ch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is a character printable ASCII?
|
||||||
|
*/
|
||||||
|
private static boolean isPrintableAscii(char ch) {
|
||||||
|
return ch >= ' ' && ch <= '~';
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String toSourceString(byte b) {
|
||||||
|
return String.format("(byte)0x%02x", b);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String toSourceString(long ell) {
|
private static String toSourceString(long ell) {
|
||||||
String str = String.valueOf(ell);
|
return String.valueOf(ell) + "L";
|
||||||
return (ell < Integer.MIN_VALUE || ell > Integer.MAX_VALUE)
|
|
||||||
? (str + 'L') : str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -277,9 +311,9 @@ class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
||||||
private static String toSourceString(String s) {
|
private static String toSourceString(String s) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append('"');
|
sb.append('"');
|
||||||
// Escape embedded quote characters, if present, but don't do
|
for (int i = 0; i < s.length(); i++) {
|
||||||
// anything more heroic.
|
sb.append(quote(s.charAt(i)));
|
||||||
sb.append(s.replace("\"", "\\\""));
|
}
|
||||||
sb.append('"');
|
sb.append('"');
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -287,7 +321,7 @@ class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
||||||
private static Stream<String> convert(byte[] values) {
|
private static Stream<String> convert(byte[] values) {
|
||||||
List<String> list = new ArrayList<>(values.length);
|
List<String> list = new ArrayList<>(values.length);
|
||||||
for (byte b : values)
|
for (byte b : values)
|
||||||
list.add(Byte.toString(b));
|
list.add(toSourceString(b));
|
||||||
return list.stream();
|
return list.stream();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -247,7 +247,8 @@ public abstract class Attribute implements AnnotationValue {
|
||||||
buf.append('(');
|
buf.append('(');
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
for (Pair<MethodSymbol, Attribute> value : values) {
|
for (Pair<MethodSymbol, Attribute> value : values) {
|
||||||
if (!first) buf.append(", ");
|
if (!first)
|
||||||
|
buf.append(", ");
|
||||||
first = false;
|
first = false;
|
||||||
|
|
||||||
Name name = value.fst.name;
|
Name name = value.fst.name;
|
||||||
|
@ -368,7 +369,7 @@ public abstract class Attribute implements AnnotationValue {
|
||||||
public void accept(Visitor v) { v.visitEnum(this); }
|
public void accept(Visitor v) { v.visitEnum(this); }
|
||||||
@DefinedBy(Api.LANGUAGE_MODEL)
|
@DefinedBy(Api.LANGUAGE_MODEL)
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return value.enclClass() + "." + value; // qualified name
|
return value.toString();
|
||||||
}
|
}
|
||||||
@DefinedBy(Api.LANGUAGE_MODEL)
|
@DefinedBy(Api.LANGUAGE_MODEL)
|
||||||
public VarSymbol getValue() {
|
public VarSymbol getValue() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,6 +32,7 @@ import java.lang.reflect.Array;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import sun.reflect.annotation.*;
|
import sun.reflect.annotation.*;
|
||||||
|
|
||||||
import javax.lang.model.type.MirroredTypeException;
|
import javax.lang.model.type.MirroredTypeException;
|
||||||
|
@ -292,7 +293,7 @@ public class AnnotationProxyMaker {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return typeString;
|
return typeString + ".class";
|
||||||
}
|
}
|
||||||
|
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
@ -335,7 +336,9 @@ public class AnnotationProxyMaker {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return typeStrings;
|
return types.stream()
|
||||||
|
.map(t -> t.toString() + ".class")
|
||||||
|
.collect(Collectors.joining(", ", "{", "}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -122,8 +122,8 @@ public class ConstMethodTest {
|
||||||
equal(ann.length, 3);
|
equal(ann.length, 3);
|
||||||
Annotation foo = ann[0][0];
|
Annotation foo = ann[0][0];
|
||||||
Annotation bar = ann[1][0];
|
Annotation bar = ann[1][0];
|
||||||
equal(foo.toString(), "@Named(value=\"aName\")");
|
equal(foo.toString(), "@Named(\"aName\")");
|
||||||
equal(bar.toString(), "@Named(value=\"bName\")");
|
equal(bar.toString(), "@Named(\"bName\")");
|
||||||
check(foo.equals(foo));
|
check(foo.equals(foo));
|
||||||
check(bar.equals(bar));
|
check(bar.equals(bar));
|
||||||
check(! foo.equals(bar));
|
check(! foo.equals(bar));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,6 +27,9 @@
|
||||||
* @summary Test of toString on normal annotations
|
* @summary Test of toString on normal annotations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// See also the sibling compile-time test
|
||||||
|
// test/langtools/tools/javac/processing/model/element/AnnotationToStringTest.java
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -62,22 +65,25 @@ public class AnnotationToStringTest {
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@MostlyPrimitive(c0='a', "+
|
"@MostlyPrimitive(c0='a', "+
|
||||||
"c1='\\'', " +
|
"c1='\\'', " +
|
||||||
|
"b0=(byte)0x01, " +
|
||||||
"i0=1, " +
|
"i0=1, " +
|
||||||
"i1=2, " +
|
"i1=2, " +
|
||||||
"f0=1.0f, " +
|
"f0=1.0f, " +
|
||||||
"f1=0.0f/0.0f, " +
|
"f1=0.0f/0.0f, " +
|
||||||
"d0=0.0, " +
|
"d0=0.0, " +
|
||||||
"d1=1.0/0.0, " +
|
"d1=1.0/0.0, " +
|
||||||
"l0=5, " +
|
"l0=5L, " +
|
||||||
"l1=9223372036854775807L, " +
|
"l1=9223372036854775807L, " +
|
||||||
"l2=-9223372036854775808L, " +
|
"l2=-9223372036854775808L, " +
|
||||||
"l3=-2147483648, " +
|
"l3=-2147483648L, " +
|
||||||
"s0=\"Hello world.\", " +
|
"s0=\"Hello world.\", " +
|
||||||
"s1=\"a\\\"b\", " +
|
"s1=\"a\\\"b\", " +
|
||||||
"class0=Obj[].class)")
|
"class0=Obj[].class, " +
|
||||||
|
"classArray={Obj[].class})")
|
||||||
@MostlyPrimitive(
|
@MostlyPrimitive(
|
||||||
c0='a',
|
c0='a',
|
||||||
c1='\'',
|
c1='\'',
|
||||||
|
b0=1,
|
||||||
i0=1,
|
i0=1,
|
||||||
i1=2,
|
i1=2,
|
||||||
f0=1.0f,
|
f0=1.0f,
|
||||||
|
@ -90,7 +96,8 @@ public class AnnotationToStringTest {
|
||||||
l3=Integer.MIN_VALUE,
|
l3=Integer.MIN_VALUE,
|
||||||
s0="Hello world.",
|
s0="Hello world.",
|
||||||
s1="a\"b",
|
s1="a\"b",
|
||||||
class0=Obj[].class
|
class0=Obj[].class,
|
||||||
|
classArray={Obj[].class}
|
||||||
)
|
)
|
||||||
static class PrimHost{}
|
static class PrimHost{}
|
||||||
|
|
||||||
|
@ -107,33 +114,33 @@ public class AnnotationToStringTest {
|
||||||
|
|
||||||
static class AnnotationHost {
|
static class AnnotationHost {
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@Classy(value=Obj.class)")
|
"@Classy(Obj.class)")
|
||||||
@Classy(value=Obj.class)
|
@Classy(Obj.class)
|
||||||
public int f0;
|
public int f0;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@Classy(value=Obj[].class)")
|
"@Classy(Obj[].class)")
|
||||||
@Classy(value=Obj[].class)
|
@Classy(Obj[].class)
|
||||||
public int f1;
|
public int f1;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@Classy(value=Obj[][].class)")
|
"@Classy(Obj[][].class)")
|
||||||
@Classy(value=Obj[][].class)
|
@Classy(Obj[][].class)
|
||||||
public int f2;
|
public int f2;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@Classy(value=Obj[][][].class)")
|
"@Classy(Obj[][][].class)")
|
||||||
@Classy(value=Obj[][][].class)
|
@Classy(Obj[][][].class)
|
||||||
public int f3;
|
public int f3;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@Classy(value=int.class)")
|
"@Classy(int.class)")
|
||||||
@Classy(value=int.class)
|
@Classy(int.class)
|
||||||
public int f4;
|
public int f4;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@Classy(value=int[][][].class)")
|
"@Classy(int[][][].class)")
|
||||||
@Classy(value=int[][][].class)
|
@Classy(int[][][].class)
|
||||||
public int f5;
|
public int f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,60 +161,60 @@ public class AnnotationToStringTest {
|
||||||
|
|
||||||
static class ArrayAnnotationHost {
|
static class ArrayAnnotationHost {
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@BooleanArray(value={true, false, true})")
|
"@BooleanArray({true, false, true})")
|
||||||
@BooleanArray(value={true, false, true})
|
@BooleanArray({true, false, true})
|
||||||
public boolean[] f0;
|
public boolean[] f0;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@FloatArray(value={3.0f, 4.0f, 0.0f/0.0f, -1.0f/0.0f, 1.0f/0.0f})")
|
"@FloatArray({3.0f, 4.0f, 0.0f/0.0f, -1.0f/0.0f, 1.0f/0.0f})")
|
||||||
@FloatArray(value={3.0f, 4.0f, Float.NaN, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY})
|
@FloatArray({3.0f, 4.0f, Float.NaN, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY})
|
||||||
public float[] f1;
|
public float[] f1;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@DoubleArray(value={1.0, 2.0, 0.0/0.0, 1.0/0.0, -1.0/0.0})")
|
"@DoubleArray({1.0, 2.0, 0.0/0.0, 1.0/0.0, -1.0/0.0})")
|
||||||
@DoubleArray(value={1.0, 2.0, Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY,})
|
@DoubleArray({1.0, 2.0, Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY,})
|
||||||
public double[] f2;
|
public double[] f2;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@ByteArray(value={10, 11, 12})")
|
"@ByteArray({(byte)0x0a, (byte)0x0b, (byte)0x0c})")
|
||||||
@ByteArray(value={10, 11, 12})
|
@ByteArray({10, 11, 12})
|
||||||
public byte[] f3;
|
public byte[] f3;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@ShortArray(value={0, 4, 5})")
|
"@ShortArray({0, 4, 5})")
|
||||||
@ShortArray(value={0, 4, 5})
|
@ShortArray({0, 4, 5})
|
||||||
public short[] f4;
|
public short[] f4;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@CharArray(value={'a', 'b', 'c', '\\''})")
|
"@CharArray({'a', 'b', 'c', '\\''})")
|
||||||
@CharArray(value={'a', 'b', 'c', '\''})
|
@CharArray({'a', 'b', 'c', '\''})
|
||||||
public char[] f5;
|
public char[] f5;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@IntArray(value={1})")
|
"@IntArray({1})")
|
||||||
@IntArray(value={1})
|
@IntArray({1})
|
||||||
public int[] f6;
|
public int[] f6;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@LongArray(value={-9223372036854775808L, -2147483649L, -2147483648," +
|
"@LongArray({-9223372036854775808L, -2147483649L, -2147483648L," +
|
||||||
" -2147483647, 2147483648L, 9223372036854775807L})")
|
" -2147483647L, 2147483648L, 9223372036854775807L})")
|
||||||
@LongArray(value={Long.MIN_VALUE, Integer.MIN_VALUE-1L, Integer.MIN_VALUE,
|
@LongArray({Long.MIN_VALUE, Integer.MIN_VALUE-1L, Integer.MIN_VALUE,
|
||||||
-Integer.MAX_VALUE, Integer.MAX_VALUE+1L, Long.MAX_VALUE})
|
-Integer.MAX_VALUE, Integer.MAX_VALUE+1L, Long.MAX_VALUE})
|
||||||
public long[] f7;
|
public long[] f7;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@StringArray(value={\"A\", \"B\", \"C\", \"\\\"Quote\\\"\"})")
|
"@StringArray({\"A\", \"B\", \"C\", \"\\\"Quote\\\"\"})")
|
||||||
@StringArray(value={"A", "B", "C", "\"Quote\""})
|
@StringArray({"A", "B", "C", "\"Quote\""})
|
||||||
public String[] f8;
|
public String[] f8;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@ClassArray(value={int.class, Obj[].class})")
|
"@ClassArray({int.class, Obj[].class})")
|
||||||
@ClassArray(value={int.class, Obj[].class})
|
@ClassArray({int.class, Obj[].class})
|
||||||
public Class<?>[] f9;
|
public Class<?>[] f9;
|
||||||
|
|
||||||
@ExpectedString(
|
@ExpectedString(
|
||||||
"@EnumArray(value={SOURCE})")
|
"@EnumArray({SOURCE})")
|
||||||
@EnumArray(value={RetentionPolicy.SOURCE})
|
@EnumArray({RetentionPolicy.SOURCE})
|
||||||
public RetentionPolicy[] f10;
|
public RetentionPolicy[] f10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,6 +292,7 @@ class Obj {}
|
||||||
@interface MostlyPrimitive {
|
@interface MostlyPrimitive {
|
||||||
char c0();
|
char c0();
|
||||||
char c1();
|
char c1();
|
||||||
|
byte b0();
|
||||||
int i0();
|
int i0();
|
||||||
int i1();
|
int i1();
|
||||||
float f0();
|
float f0();
|
||||||
|
@ -298,4 +306,5 @@ class Obj {}
|
||||||
String s0();
|
String s0();
|
||||||
String s1();
|
String s1();
|
||||||
Class<?> class0();
|
Class<?> class0();
|
||||||
|
Class<?>[] classArray();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -89,8 +89,8 @@ public class ParameterAnnotations {
|
||||||
equal(ann.length, 2);
|
equal(ann.length, 2);
|
||||||
Annotation foo = ann[0][0];
|
Annotation foo = ann[0][0];
|
||||||
Annotation bar = ann[1][0];
|
Annotation bar = ann[1][0];
|
||||||
equal(foo.toString(), "@Named(value=\"foo\")");
|
equal(foo.toString(), "@Named(\"foo\")");
|
||||||
equal(bar.toString(), "@Named(value=\"bar\")");
|
equal(bar.toString(), "@Named(\"bar\")");
|
||||||
check(foo.equals(foo));
|
check(foo.equals(foo));
|
||||||
check(! foo.equals(bar));
|
check(! foo.equals(bar));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -129,21 +129,21 @@ public class TestConstructorParameterAnnotations {
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations(
|
@ExpectedGetParameterAnnotations(
|
||||||
"[[], " +
|
"[[], " +
|
||||||
"[@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)]]")
|
"[@TestConstructorParameterAnnotations$MarkerAnnotation(1)]]")
|
||||||
@ExpectedParameterAnnotations({
|
@ExpectedParameterAnnotations({
|
||||||
"null",
|
"null",
|
||||||
"@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)"})
|
"@TestConstructorParameterAnnotations$MarkerAnnotation(1)"})
|
||||||
public class NestedClass1 {
|
public class NestedClass1 {
|
||||||
public NestedClass1(@MarkerAnnotation(1) int parameter) {}
|
public NestedClass1(@MarkerAnnotation(1) int parameter) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations(
|
@ExpectedGetParameterAnnotations(
|
||||||
"[[], " +
|
"[[], " +
|
||||||
"[@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)], " +
|
"[@TestConstructorParameterAnnotations$MarkerAnnotation(2)], " +
|
||||||
"[]]")
|
"[]]")
|
||||||
@ExpectedParameterAnnotations({
|
@ExpectedParameterAnnotations({
|
||||||
"null",
|
"null",
|
||||||
"@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)",
|
"@TestConstructorParameterAnnotations$MarkerAnnotation(2)",
|
||||||
"null"})
|
"null"})
|
||||||
public class NestedClass2 {
|
public class NestedClass2 {
|
||||||
public NestedClass2(@MarkerAnnotation(2) int parameter1,
|
public NestedClass2(@MarkerAnnotation(2) int parameter1,
|
||||||
|
@ -152,11 +152,11 @@ public class TestConstructorParameterAnnotations {
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations(
|
@ExpectedGetParameterAnnotations(
|
||||||
"[[], " +
|
"[[], " +
|
||||||
"[@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)], " +
|
"[@TestConstructorParameterAnnotations$MarkerAnnotation(3)], " +
|
||||||
"[]]")
|
"[]]")
|
||||||
@ExpectedParameterAnnotations({
|
@ExpectedParameterAnnotations({
|
||||||
"null",
|
"null",
|
||||||
"@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)",
|
"@TestConstructorParameterAnnotations$MarkerAnnotation(3)",
|
||||||
"null"})
|
"null"})
|
||||||
public class NestedClass3 {
|
public class NestedClass3 {
|
||||||
public <P> NestedClass3(@MarkerAnnotation(3) P parameter1,
|
public <P> NestedClass3(@MarkerAnnotation(3) P parameter1,
|
||||||
|
@ -165,11 +165,11 @@ public class TestConstructorParameterAnnotations {
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations(
|
@ExpectedGetParameterAnnotations(
|
||||||
"[[], " +
|
"[[], " +
|
||||||
"[@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)], " +
|
"[@TestConstructorParameterAnnotations$MarkerAnnotation(4)], " +
|
||||||
"[]]")
|
"[]]")
|
||||||
@ExpectedParameterAnnotations({
|
@ExpectedParameterAnnotations({
|
||||||
"null",
|
"null",
|
||||||
"@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)",
|
"@TestConstructorParameterAnnotations$MarkerAnnotation(4)",
|
||||||
"null"})
|
"null"})
|
||||||
public class NestedClass4 {
|
public class NestedClass4 {
|
||||||
public <P, Q> NestedClass4(@MarkerAnnotation(4) P parameter1,
|
public <P, Q> NestedClass4(@MarkerAnnotation(4) P parameter1,
|
||||||
|
@ -183,18 +183,18 @@ public class TestConstructorParameterAnnotations {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations(
|
@ExpectedGetParameterAnnotations(
|
||||||
"[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)]]")
|
"[[@TestConstructorParameterAnnotations$MarkerAnnotation(1)]]")
|
||||||
@ExpectedParameterAnnotations({
|
@ExpectedParameterAnnotations({
|
||||||
"@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)"})
|
"@TestConstructorParameterAnnotations$MarkerAnnotation(1)"})
|
||||||
public static class StaticNestedClass1 {
|
public static class StaticNestedClass1 {
|
||||||
public StaticNestedClass1(@MarkerAnnotation(1) int parameter) {}
|
public StaticNestedClass1(@MarkerAnnotation(1) int parameter) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations(
|
@ExpectedGetParameterAnnotations(
|
||||||
"[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)], " +
|
"[[@TestConstructorParameterAnnotations$MarkerAnnotation(2)], " +
|
||||||
"[]]")
|
"[]]")
|
||||||
@ExpectedParameterAnnotations({
|
@ExpectedParameterAnnotations({
|
||||||
"@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)",
|
"@TestConstructorParameterAnnotations$MarkerAnnotation(2)",
|
||||||
"null"})
|
"null"})
|
||||||
public static class StaticNestedClass2 {
|
public static class StaticNestedClass2 {
|
||||||
public StaticNestedClass2(@MarkerAnnotation(2) int parameter1,
|
public StaticNestedClass2(@MarkerAnnotation(2) int parameter1,
|
||||||
|
@ -202,10 +202,10 @@ public class TestConstructorParameterAnnotations {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations(
|
@ExpectedGetParameterAnnotations(
|
||||||
"[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)], " +
|
"[[@TestConstructorParameterAnnotations$MarkerAnnotation(3)], " +
|
||||||
"[]]")
|
"[]]")
|
||||||
@ExpectedParameterAnnotations({
|
@ExpectedParameterAnnotations({
|
||||||
"@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)",
|
"@TestConstructorParameterAnnotations$MarkerAnnotation(3)",
|
||||||
"null"})
|
"null"})
|
||||||
public static class StaticNestedClass3 {
|
public static class StaticNestedClass3 {
|
||||||
public <P> StaticNestedClass3(@MarkerAnnotation(3) P parameter1,
|
public <P> StaticNestedClass3(@MarkerAnnotation(3) P parameter1,
|
||||||
|
@ -213,10 +213,10 @@ public class TestConstructorParameterAnnotations {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations(
|
@ExpectedGetParameterAnnotations(
|
||||||
"[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)], " +
|
"[[@TestConstructorParameterAnnotations$MarkerAnnotation(4)], " +
|
||||||
"[]]")
|
"[]]")
|
||||||
@ExpectedParameterAnnotations({
|
@ExpectedParameterAnnotations({
|
||||||
"@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)",
|
"@TestConstructorParameterAnnotations$MarkerAnnotation(4)",
|
||||||
"null"})
|
"null"})
|
||||||
public static class StaticNestedClass4 {
|
public static class StaticNestedClass4 {
|
||||||
public <P, Q> StaticNestedClass4(@MarkerAnnotation(4) P parameter1,
|
public <P, Q> StaticNestedClass4(@MarkerAnnotation(4) P parameter1,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -128,7 +128,7 @@ public class TestConstructorParameterTypeAnnotations {
|
||||||
@ExpectedGetParameterAnnotations("[[], []]")
|
@ExpectedGetParameterAnnotations("[[], []]")
|
||||||
@ExpectedParameterTypeAnnotations({
|
@ExpectedParameterTypeAnnotations({
|
||||||
"null",
|
"null",
|
||||||
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=1)"})
|
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(1)"})
|
||||||
public class NestedClass1 {
|
public class NestedClass1 {
|
||||||
public NestedClass1(@MarkerTypeAnnotation(1) int parameter) {}
|
public NestedClass1(@MarkerTypeAnnotation(1) int parameter) {}
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ public class TestConstructorParameterTypeAnnotations {
|
||||||
@ExpectedGetParameterAnnotations("[[], [], []]")
|
@ExpectedGetParameterAnnotations("[[], [], []]")
|
||||||
@ExpectedParameterTypeAnnotations({
|
@ExpectedParameterTypeAnnotations({
|
||||||
"null",
|
"null",
|
||||||
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=2)",
|
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(2)",
|
||||||
"null"})
|
"null"})
|
||||||
public class NestedClass2 {
|
public class NestedClass2 {
|
||||||
public NestedClass2(@MarkerTypeAnnotation(2) int parameter1,
|
public NestedClass2(@MarkerTypeAnnotation(2) int parameter1,
|
||||||
|
@ -146,7 +146,7 @@ public class TestConstructorParameterTypeAnnotations {
|
||||||
@ExpectedGetParameterAnnotations("[[], [], []]")
|
@ExpectedGetParameterAnnotations("[[], [], []]")
|
||||||
@ExpectedParameterTypeAnnotations({
|
@ExpectedParameterTypeAnnotations({
|
||||||
"null",
|
"null",
|
||||||
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=3)",
|
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(3)",
|
||||||
"null"})
|
"null"})
|
||||||
public class NestedClass3 {
|
public class NestedClass3 {
|
||||||
public <P> NestedClass3(@MarkerTypeAnnotation(3) P parameter1,
|
public <P> NestedClass3(@MarkerTypeAnnotation(3) P parameter1,
|
||||||
|
@ -156,7 +156,7 @@ public class TestConstructorParameterTypeAnnotations {
|
||||||
@ExpectedGetParameterAnnotations("[[], [], []]")
|
@ExpectedGetParameterAnnotations("[[], [], []]")
|
||||||
@ExpectedParameterTypeAnnotations({
|
@ExpectedParameterTypeAnnotations({
|
||||||
"null",
|
"null",
|
||||||
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=4)",
|
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(4)",
|
||||||
"null"})
|
"null"})
|
||||||
public class NestedClass4 {
|
public class NestedClass4 {
|
||||||
public <P, Q> NestedClass4(@MarkerTypeAnnotation(4) P parameter1,
|
public <P, Q> NestedClass4(@MarkerTypeAnnotation(4) P parameter1,
|
||||||
|
@ -171,14 +171,14 @@ public class TestConstructorParameterTypeAnnotations {
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations("[[]]")
|
@ExpectedGetParameterAnnotations("[[]]")
|
||||||
@ExpectedParameterTypeAnnotations({
|
@ExpectedParameterTypeAnnotations({
|
||||||
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=1)"})
|
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(1)"})
|
||||||
public static class StaticNestedClass1 {
|
public static class StaticNestedClass1 {
|
||||||
public StaticNestedClass1(@MarkerTypeAnnotation(1) int parameter) {}
|
public StaticNestedClass1(@MarkerTypeAnnotation(1) int parameter) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations("[[], []]")
|
@ExpectedGetParameterAnnotations("[[], []]")
|
||||||
@ExpectedParameterTypeAnnotations({
|
@ExpectedParameterTypeAnnotations({
|
||||||
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=2)",
|
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(2)",
|
||||||
"null"})
|
"null"})
|
||||||
public static class StaticNestedClass2 {
|
public static class StaticNestedClass2 {
|
||||||
public StaticNestedClass2(@MarkerTypeAnnotation(2) int parameter1,
|
public StaticNestedClass2(@MarkerTypeAnnotation(2) int parameter1,
|
||||||
|
@ -187,7 +187,7 @@ public class TestConstructorParameterTypeAnnotations {
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations("[[], []]")
|
@ExpectedGetParameterAnnotations("[[], []]")
|
||||||
@ExpectedParameterTypeAnnotations({
|
@ExpectedParameterTypeAnnotations({
|
||||||
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=3)",
|
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(3)",
|
||||||
"null"})
|
"null"})
|
||||||
public static class StaticNestedClass3 {
|
public static class StaticNestedClass3 {
|
||||||
public <P> StaticNestedClass3(@MarkerTypeAnnotation(3) P parameter1,
|
public <P> StaticNestedClass3(@MarkerTypeAnnotation(3) P parameter1,
|
||||||
|
@ -196,7 +196,7 @@ public class TestConstructorParameterTypeAnnotations {
|
||||||
|
|
||||||
@ExpectedGetParameterAnnotations("[[], []]")
|
@ExpectedGetParameterAnnotations("[[], []]")
|
||||||
@ExpectedParameterTypeAnnotations({
|
@ExpectedParameterTypeAnnotations({
|
||||||
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=4)",
|
"@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(4)",
|
||||||
"null"})
|
"null"})
|
||||||
public static class StaticNestedClass4 {
|
public static class StaticNestedClass4 {
|
||||||
public <P, Q> StaticNestedClass4(@MarkerTypeAnnotation(4) P parameter1,
|
public <P, Q> StaticNestedClass4(@MarkerTypeAnnotation(4) P parameter1,
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class TestObjectMethods {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Pattern annotationRegex = Pattern.compile("@TestObjectMethods\\$AnnotType\\(value=(\\p{Digit})+\\)");
|
private static final Pattern annotationRegex = Pattern.compile("@TestObjectMethods\\$AnnotType\\((\\p{Digit})+\\)");
|
||||||
|
|
||||||
static void testGetAnnotations(Class<?> clazz, boolean annotationsExpectedOnMethods) {
|
static void testGetAnnotations(Class<?> clazz, boolean annotationsExpectedOnMethods) {
|
||||||
System.err.println("Testing getAnnotations on methods of class " + clazz.getName());
|
System.err.println("Testing getAnnotations on methods of class " + clazz.getName());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -193,12 +193,12 @@ public class ReflectionTest {
|
||||||
enum TestCase {
|
enum TestCase {
|
||||||
BasicNonRepeatable_Legacy(
|
BasicNonRepeatable_Legacy(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=0)\", "
|
+ "getDeclAnnoVal = \"@Foo(0)\", "
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\"}, "
|
+ "getAnnosArgs = {\"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=0)\"}) ",
|
+ "getDeclAnnosArgs = {\"@Foo(0)\"}) ",
|
||||||
"@ExpectedContainer") {
|
"@ExpectedContainer") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -274,11 +274,11 @@ public class ReflectionTest {
|
||||||
},
|
},
|
||||||
SingleAnnoInherited_Legacy(
|
SingleAnnoInherited_Legacy(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {\"@Foo(value=0)\", \"ExpectedBase\", \"ExpectedContainer\"}, "
|
+ "getAnnotationsVals = {\"@Foo(0)\", \"ExpectedBase\", \"ExpectedContainer\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
||||||
+ "getDeclAnnoVal = \"NULL\", "
|
+ "getDeclAnnoVal = \"NULL\", "
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\"}, "
|
+ "getAnnosArgs = {\"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnosArgs = {})",
|
+ "getDeclAnnosArgs = {})",
|
||||||
"@ExpectedContainer") {
|
"@ExpectedContainer") {
|
||||||
|
|
||||||
|
@ -401,18 +401,18 @@ public class ReflectionTest {
|
||||||
},
|
},
|
||||||
AnnoOnSuperAndSubClass_Inherited_Legacy(
|
AnnoOnSuperAndSubClass_Inherited_Legacy(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=2)\", "
|
+ "getAnnotationVal = \"@Foo(2)\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=2)\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(2)\"}, "
|
||||||
+ // override every annotation on superClass
|
+ // override every annotation on superClass
|
||||||
"getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=2)\"}, "
|
"getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(2)\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"@Foo(value=2)\", " // ignores inherited
|
"getDeclAnnoVal = \"@Foo(2)\", " // ignores inherited
|
||||||
+ "getAnnosArgs = {\"@Foo(value=2)\"}, "
|
+ "getAnnosArgs = {\"@Foo(2)\"}, "
|
||||||
+ "getDeclAnnosArgs = { \"@Foo(value=2)\" })", // ignores inherited
|
+ "getDeclAnnosArgs = { \"@Foo(2)\" })", // ignores inherited
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"NULL\", "
|
+ "getAnnotationVal = \"NULL\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=2)\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(2)\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=2)\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(2)\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"NULL\", " + // ignores inherited
|
"getDeclAnnoVal = \"NULL\", " + // ignores inherited
|
||||||
"getAnnosArgs = {}, " + "getDeclAnnosArgs = {})") { // ignores inherited
|
"getAnnosArgs = {}, " + "getDeclAnnosArgs = {})") { // ignores inherited
|
||||||
|
@ -481,19 +481,19 @@ public class ReflectionTest {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
BasicContainer_Legacy(
|
BasicContainer_Legacy(
|
||||||
"@ExpectedBase(value = Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"NULL\","
|
+ "getAnnotationVal = \"NULL\","
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnoVal = \"NULL\", " + "getAnnosArgs = {}, "
|
+ "getDeclAnnoVal = \"NULL\", " + "getAnnosArgs = {}, "
|
||||||
+ "getDeclAnnosArgs = {} )",
|
+ "getDeclAnnosArgs = {} )",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"} )") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"} )") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -580,24 +580,24 @@ public class ReflectionTest {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
SingleAndContainerOnSuper_Legacy(
|
SingleAndContainerOnSuper_Legacy(
|
||||||
"@ExpectedBase(value = Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\","
|
+ "getAnnotationVal = \"@Foo(0)\","
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=0)\", "
|
+ "getDeclAnnoVal = \"@Foo(0)\", "
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\"}, "
|
+ "getAnnosArgs = {\"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=0)\"} )",
|
+ "getDeclAnnosArgs = {\"@Foo(0)\"} )",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"} )") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"} )") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -689,19 +689,19 @@ public class ReflectionTest {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
BasicContainer_Inherited_Legacy(
|
BasicContainer_Inherited_Legacy(
|
||||||
"@ExpectedBase(value = Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"NULL\","
|
+ "getAnnotationVal = \"NULL\","
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
||||||
+ "getDeclAnnoVal = \"NULL\", "
|
+ "getDeclAnnoVal = \"NULL\", "
|
||||||
+ "getAnnosArgs = {}, "
|
+ "getAnnosArgs = {}, "
|
||||||
+ "getDeclAnnosArgs = {} )",
|
+ "getDeclAnnosArgs = {} )",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
||||||
+ "getDeclAnnoVal = \"NULL\", "
|
+ "getDeclAnnoVal = \"NULL\", "
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosArgs = {} )") {
|
+ "getDeclAnnosArgs = {} )") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -763,20 +763,20 @@ public class ReflectionTest {
|
||||||
},
|
},
|
||||||
ContainerOnSuperSingleOnSub_Inherited_Legacy(
|
ContainerOnSuperSingleOnSub_Inherited_Legacy(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=0)\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"},"
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=0)\","
|
+ "getDeclAnnoVal = \"@Foo(0)\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\"},"
|
+ "getAnnosArgs = {\"@Foo(0)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=0)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(0)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=0)\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"},"
|
||||||
+ "getDeclAnnoVal = \"NULL\","
|
+ "getDeclAnnoVal = \"NULL\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {})") {
|
+ "getDeclAnnosArgs = {})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -842,20 +842,20 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
ContainerAndSingleOnSuperSingleOnSub_Inherited_Legacy(
|
ContainerAndSingleOnSuperSingleOnSub_Inherited_Legacy(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=0)\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"},"
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=0)\","
|
+ "getDeclAnnoVal = \"@Foo(0)\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\"},"
|
+ "getAnnosArgs = {\"@Foo(0)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=0)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(0)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=0)\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(0)\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"},"
|
||||||
+ "getDeclAnnoVal = \"NULL\","
|
+ "getDeclAnnoVal = \"NULL\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {})") {
|
+ "getDeclAnnosArgs = {})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -921,21 +921,21 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
SingleOnSuperContainerOnSub_Inherited_Legacy(
|
SingleOnSuperContainerOnSub_Inherited_Legacy(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnoVal = \"NULL\","
|
+ "getDeclAnnoVal = \"NULL\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\"},"
|
+ "getAnnosArgs = {\"@Foo(0)\"},"
|
||||||
+ "getDeclAnnosArgs = {})",
|
+ "getDeclAnnosArgs = {})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"})") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -998,23 +998,23 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
SingleOnSuperContainerAndSingleOnSub_Inherited_Legacy(
|
SingleOnSuperContainerAndSingleOnSub_Inherited_Legacy(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=3)\", "
|
+ "getAnnotationVal = \"@Foo(3)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=3)\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(3)\"}, "
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=3)\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(3)\"},"
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=3)\","
|
+ "getDeclAnnoVal = \"@Foo(3)\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=3)\"},"
|
+ "getAnnosArgs = {\"@Foo(3)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=3)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(3)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=3)\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(3)\"}, "
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=3)\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(3)\"},"
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"})") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -1077,18 +1077,18 @@ public class ReflectionTest {
|
||||||
BasicRepeatable(
|
BasicRepeatable(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"NULL\", "
|
+ "getAnnotationVal = \"NULL\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\" }, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\" }, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnoVal = \"NULL\","
|
+ "getDeclAnnoVal = \"NULL\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"},"
|
+ "getAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"} )") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"} )") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -1179,21 +1179,21 @@ public class ReflectionTest {
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"NULL\", "
|
+ "getAnnotationVal = \"NULL\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnoVal = \"NULL\","
|
+ "getDeclAnnoVal = \"NULL\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"},"
|
+ "getAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"} )") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"} )") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -1283,17 +1283,17 @@ public class ReflectionTest {
|
||||||
BasicContainerRepeatable_Inherited(
|
BasicContainerRepeatable_Inherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"NULL\", "
|
+ "getAnnotationVal = \"NULL\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
||||||
+ "getDeclAnnoVal = \"NULL\", "
|
+ "getDeclAnnoVal = \"NULL\", "
|
||||||
+ "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"}, "
|
+ "getAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"}, "
|
||||||
+ "getDeclAnnosArgs = {})",
|
+ "getDeclAnnosArgs = {})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = { \"ExpectedBase\", \"ExpectedContainer\"}, "
|
+ "getDeclAnnosVals = { \"ExpectedBase\", \"ExpectedContainer\"}, "
|
||||||
+ "getDeclAnnoVal = \"NULL\", "
|
+ "getDeclAnnoVal = \"NULL\", "
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosArgs = {})") {
|
+ "getDeclAnnosArgs = {})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1356,21 +1356,21 @@ public class ReflectionTest {
|
||||||
RepeatableAnnoInherited(
|
RepeatableAnnoInherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"NULL\", "
|
+ "getAnnotationVal = \"NULL\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"NULL\", "
|
"getDeclAnnoVal = \"NULL\", "
|
||||||
+ // ignores inherited
|
+ // ignores inherited
|
||||||
"getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"}, "
|
"getAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"}, "
|
||||||
+ "getDeclAnnosArgs = {})", // ignores inherited
|
+ "getDeclAnnosArgs = {})", // ignores inherited
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = { \"ExpectedBase\", \"ExpectedContainer\"}, "
|
+ "getDeclAnnosVals = { \"ExpectedBase\", \"ExpectedContainer\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"NULL\", "
|
"getDeclAnnoVal = \"NULL\", "
|
||||||
+ // ignores inherited
|
+ // ignores inherited
|
||||||
"getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
"getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosArgs = {})") { // ignores inherited
|
+ "getDeclAnnosArgs = {})") { // ignores inherited
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1434,23 +1434,23 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
SingleAnnoWithContainer(
|
SingleAnnoWithContainer(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=0)\","
|
+ "getDeclAnnoVal = \"@Foo(0)\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\", \"@Foo(value=1)\", \"@Foo(value=2)\"},"
|
+ "getAnnosArgs = {\"@Foo(0)\", \"@Foo(1)\", \"@Foo(2)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=0)\", \"@Foo(value=1)\",\"@Foo(value=2)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(0)\", \"@Foo(1)\",\"@Foo(2)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"})") {
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -1543,18 +1543,18 @@ public class ReflectionTest {
|
||||||
},
|
},
|
||||||
AnnoOnSuperAndSubClass_Inherited(
|
AnnoOnSuperAndSubClass_Inherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=1)\", "
|
+ "getAnnotationVal = \"@Foo(1)\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=1)\" }, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(1)\" }, "
|
||||||
+ // override every annotation on superClass
|
+ // override every annotation on superClass
|
||||||
"getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=1)\"}, "
|
"getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(1)\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"@Foo(value=1)\", " // ignores inherited
|
"getDeclAnnoVal = \"@Foo(1)\", " // ignores inherited
|
||||||
+ "getAnnosArgs = {\"@Foo(value=1)\"}, "
|
+ "getAnnosArgs = {\"@Foo(1)\"}, "
|
||||||
+ "getDeclAnnosArgs = { \"@Foo(value=1)\" })", // ignores inherited
|
+ "getDeclAnnosArgs = { \"@Foo(1)\" })", // ignores inherited
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"NULL\", "
|
+ "getAnnotationVal = \"NULL\", "
|
||||||
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=1)\" }, "
|
+ "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(1)\" }, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=1)\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(1)\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"NULL\", " + // ignores inherited
|
"getDeclAnnoVal = \"NULL\", " + // ignores inherited
|
||||||
"getAnnosArgs = {}, " + "getDeclAnnosArgs = {})") {
|
"getAnnosArgs = {}, " + "getDeclAnnosArgs = {})") {
|
||||||
|
@ -1622,23 +1622,23 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
RepeatableOnSuperSingleOnSub_Inherited(
|
RepeatableOnSuperSingleOnSub_Inherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=3)\", "
|
+ "getAnnotationVal = \"@Foo(3)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=3)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(3)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ //override every annotation on superClass
|
+ //override every annotation on superClass
|
||||||
"getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=3)\"}, "
|
"getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(3)\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"@Foo(value=3)\", " // ignores inherited
|
"getDeclAnnoVal = \"@Foo(3)\", " // ignores inherited
|
||||||
+ "getAnnosArgs = {\"@Foo(value=3)\"}, "
|
+ "getAnnosArgs = {\"@Foo(3)\"}, "
|
||||||
+ "getDeclAnnosArgs = { \"@Foo(value=3)\" })", // ignores inherited
|
+ "getDeclAnnosArgs = { \"@Foo(3)\" })", // ignores inherited
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=3)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(3)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=3)\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(3)\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"NULL\", "
|
"getDeclAnnoVal = \"NULL\", "
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosArgs = {}) // ignores inherited ") {
|
+ "getDeclAnnosArgs = {}) // ignores inherited ") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1702,24 +1702,24 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
SingleOnSuperRepeatableOnSub_Inherited(
|
SingleOnSuperRepeatableOnSub_Inherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ //override every annotation on superClass
|
+ //override every annotation on superClass
|
||||||
"getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
"getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"NULL\","// ignores inherited
|
"getDeclAnnoVal = \"NULL\","// ignores inherited
|
||||||
+ "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"}, "
|
+ "getAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"}, "
|
||||||
+ "getDeclAnnosArgs = { \"@Foo(value=1)\", \"@Foo(value=2)\"})",
|
+ "getDeclAnnosArgs = { \"@Foo(1)\", \"@Foo(2)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ // ignores inherited annotations
|
+ // ignores inherited annotations
|
||||||
"getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "// ignores inherited
|
"getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "// ignores inherited
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"})") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -1783,20 +1783,20 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
ContainerOnSuperSingleOnSub_Inherited(
|
ContainerOnSuperSingleOnSub_Inherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"},"
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=0)\","
|
+ "getDeclAnnoVal = \"@Foo(0)\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\"},"
|
+ "getAnnosArgs = {\"@Foo(0)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=0)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(0)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"},"
|
||||||
+ "getDeclAnnoVal = \"NULL\","
|
+ "getDeclAnnoVal = \"NULL\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {})") {
|
+ "getDeclAnnosArgs = {})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1861,21 +1861,21 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
SingleOnSuperContainerOnSub_Inherited(
|
SingleOnSuperContainerOnSub_Inherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnoVal = \"NULL\","
|
+ "getDeclAnnoVal = \"NULL\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"},"
|
+ "getAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"})") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -1939,23 +1939,23 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
SingleOnSuperContainerAndSingleOnSub_Inherited(
|
SingleOnSuperContainerAndSingleOnSub_Inherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=3)\", "
|
+ "getAnnotationVal = \"@Foo(3)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=3)\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(3)\"}, "
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=3)\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(3)\"},"
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=3)\","
|
+ "getDeclAnnoVal = \"@Foo(3)\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\", \"@Foo(value=3)\"},"
|
+ "getAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\", \"@Foo(3)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\", \"@Foo(value=3)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(1)\", \"@Foo(2)\", \"@Foo(3)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=3)\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(3)\"}, "
|
||||||
+ "getDeclAnnosVals = {"
|
+ "getDeclAnnosVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", \"@Foo(value=3)\"},"
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer({@Foo(1), @Foo(2)})\", \"@Foo(3)\"},"
|
||||||
+ "getDeclAnnoVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\","
|
+ "getDeclAnnoVal = \"@FooContainer({@Foo(1), @Foo(2)})\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"})") {
|
+ "getDeclAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
|
||||||
|
@ -2019,20 +2019,20 @@ public class ReflectionTest {
|
||||||
// fail with ordering issues
|
// fail with ordering issues
|
||||||
ContainerAndSingleOnSuperSingleOnSub_Inherited(
|
ContainerAndSingleOnSuperSingleOnSub_Inherited(
|
||||||
"@ExpectedBase(value=Foo.class, "
|
"@ExpectedBase(value=Foo.class, "
|
||||||
+ "getAnnotationVal = \"@Foo(value=0)\", "
|
+ "getAnnotationVal = \"@Foo(0)\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"},"
|
||||||
+ "getDeclAnnoVal = \"@Foo(value=0)\","
|
+ "getDeclAnnoVal = \"@Foo(0)\","
|
||||||
+ "getAnnosArgs = {\"@Foo(value=0)\"},"
|
+ "getAnnosArgs = {\"@Foo(0)\"},"
|
||||||
+ "getDeclAnnosArgs = {\"@Foo(value=0)\"})",
|
+ "getDeclAnnosArgs = {\"@Foo(0)\"})",
|
||||||
"@ExpectedContainer(value=FooContainer.class, "
|
"@ExpectedContainer(value=FooContainer.class, "
|
||||||
+ "getAnnotationVal = \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\", "
|
+ "getAnnotationVal = \"@FooContainer({@Foo(1), @Foo(2)})\", "
|
||||||
+ "getAnnotationsVals = {"
|
+ "getAnnotationsVals = {"
|
||||||
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"}, "
|
+ "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\", \"@FooContainer({@Foo(1), @Foo(2)})\"}, "
|
||||||
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
|
+ "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(0)\"},"
|
||||||
+ "getDeclAnnoVal = \"NULL\","
|
+ "getDeclAnnoVal = \"NULL\","
|
||||||
+ "getAnnosArgs = {\"@FooContainer(value={@Foo(value=1), @Foo(value=2)})\"},"
|
+ "getAnnosArgs = {\"@FooContainer({@Foo(1), @Foo(2)})\"},"
|
||||||
+ "getDeclAnnosArgs = {})") {
|
+ "getDeclAnnosArgs = {})") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -52,10 +52,10 @@ public class AnonymousExtendsTest {
|
||||||
|
|
||||||
public void testIt() {
|
public void testIt() {
|
||||||
checkAnnotations(TestClass.class.getAnnotatedSuperclass(),
|
checkAnnotations(TestClass.class.getAnnotatedSuperclass(),
|
||||||
"[@AnonymousExtendsTest$TA(value=1)],[@AnonymousExtendsTest$TA(value=2)]");
|
"[@AnonymousExtendsTest$TA(1)],[@AnonymousExtendsTest$TA(2)]");
|
||||||
checkAnnotations(new @TA(3) ArrayList<@TA(4) List<Number>>() {
|
checkAnnotations(new @TA(3) ArrayList<@TA(4) List<Number>>() {
|
||||||
}.getClass().getAnnotatedSuperclass(),
|
}.getClass().getAnnotatedSuperclass(),
|
||||||
"[@AnonymousExtendsTest$TA(value=3)],[@AnonymousExtendsTest$TA(value=4)]");
|
"[@AnonymousExtendsTest$TA(3)],[@AnonymousExtendsTest$TA(4)]");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkAnnotations(AnnotatedType type, String expected) {
|
public void checkAnnotations(AnnotatedType type, String expected) {
|
||||||
|
@ -74,4 +74,4 @@ public class AnonymousExtendsTest {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new AnonymousExtendsTest().testIt();
|
new AnonymousExtendsTest().testIt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -609,11 +609,11 @@ public class AnnotationsOnModules extends ModuleTestBase {
|
||||||
new TestCase("package test; public enum E {A, B;}",
|
new TestCase("package test; public enum E {A, B;}",
|
||||||
"public E value();",
|
"public E value();",
|
||||||
"test.E.A",
|
"test.E.A",
|
||||||
"@test.A(test.E.A)"),
|
"@test.A(A)"),
|
||||||
new TestCase("package test; public enum E {A, B;}",
|
new TestCase("package test; public enum E {A, B;}",
|
||||||
"public E[] value();",
|
"public E[] value();",
|
||||||
"{test.E.A, test.E.B}",
|
"{test.E.A, test.E.B}",
|
||||||
"@test.A({test.E.A, test.E.B})"),
|
"@test.A({A, B})"),
|
||||||
new TestCase("package test; public class Extra {}",
|
new TestCase("package test; public class Extra {}",
|
||||||
"public Class value();",
|
"public Class value();",
|
||||||
"test.Extra.class",
|
"test.Extra.class",
|
||||||
|
@ -641,7 +641,7 @@ public class AnnotationsOnModules extends ModuleTestBase {
|
||||||
new TestCase("package test; public enum E {A;}",
|
new TestCase("package test; public enum E {A;}",
|
||||||
"int integer(); boolean flag(); double value(); String string(); E enumeration(); ",
|
"int integer(); boolean flag(); double value(); String string(); E enumeration(); ",
|
||||||
"enumeration = test.E.A, integer = 42, flag = true, value = 3.5, string = \"Text\"",
|
"enumeration = test.E.A, integer = 42, flag = true, value = 3.5, string = \"Text\"",
|
||||||
"@test.A(enumeration=test.E.A, integer=42, flag=true, value=3.5, string=\"Text\")"),
|
"@test.A(enumeration=A, integer=42, flag=true, value=3.5, string=\"Text\")"),
|
||||||
};
|
};
|
||||||
|
|
||||||
Path extraSrc = base.resolve("extra-src");
|
Path extraSrc = base.resolve("extra-src");
|
||||||
|
|
|
@ -7,9 +7,9 @@ T6388543.java:30:17: compiler.note.proc.messager: note:value @A({3}) + 3
|
||||||
T6388543.java:33:16: compiler.note.proc.messager: note:value @A({4, 5}) + {4, 5}
|
T6388543.java:33:16: compiler.note.proc.messager: note:value @A({4, 5}) + {4, 5}
|
||||||
T6388543.java:33:17: compiler.note.proc.messager: note:value @A({4, 5}) + 4
|
T6388543.java:33:17: compiler.note.proc.messager: note:value @A({4, 5}) + 4
|
||||||
T6388543.java:33:20: compiler.note.proc.messager: note:value @A({4, 5}) + 5
|
T6388543.java:33:20: compiler.note.proc.messager: note:value @A({4, 5}) + 5
|
||||||
T6388543.java:36:12: compiler.note.proc.messager: note:value @B(x=@C(x=E.ONE, y=E.TWO), y=@C(x=E.ONE, y=E.TWO)) + @C(x=E.ONE, y=E.TWO)
|
T6388543.java:36:12: compiler.note.proc.messager: note:value @B(x=@C(x=ONE, y=TWO), y=@C(x=ONE, y=TWO)) + @C(x=ONE, y=TWO)
|
||||||
T6388543.java:36:20: compiler.note.proc.messager: note:value @B(x=@C(x=E.ONE, y=E.TWO), y=@C(x=E.ONE, y=E.TWO)) + E.ONE
|
T6388543.java:36:20: compiler.note.proc.messager: note:value @B(x=@C(x=ONE, y=TWO), y=@C(x=ONE, y=TWO)) + ONE
|
||||||
T6388543.java:36:31: compiler.note.proc.messager: note:value @B(x=@C(x=E.ONE, y=E.TWO), y=@C(x=E.ONE, y=E.TWO)) + E.TWO
|
T6388543.java:36:31: compiler.note.proc.messager: note:value @B(x=@C(x=ONE, y=TWO), y=@C(x=ONE, y=TWO)) + TWO
|
||||||
T6388543.java:36:42: compiler.note.proc.messager: note:value @B(x=@C(x=E.ONE, y=E.TWO), y=@C(x=E.ONE, y=E.TWO)) + @C(x=E.ONE, y=E.TWO)
|
T6388543.java:36:42: compiler.note.proc.messager: note:value @B(x=@C(x=ONE, y=TWO), y=@C(x=ONE, y=TWO)) + @C(x=ONE, y=TWO)
|
||||||
T6388543.java:36:50: compiler.note.proc.messager: note:value @B(x=@C(x=E.ONE, y=E.TWO), y=@C(x=E.ONE, y=E.TWO)) + E.ONE
|
T6388543.java:36:50: compiler.note.proc.messager: note:value @B(x=@C(x=ONE, y=TWO), y=@C(x=ONE, y=TWO)) + ONE
|
||||||
T6388543.java:36:61: compiler.note.proc.messager: note:value @B(x=@C(x=E.ONE, y=E.TWO), y=@C(x=E.ONE, y=E.TWO)) + E.TWO
|
T6388543.java:36:61: compiler.note.proc.messager: note:value @B(x=@C(x=ONE, y=TWO), y=@C(x=ONE, y=TWO)) + TWO
|
||||||
|
|
|
@ -0,0 +1,405 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
* @bug 8164819
|
||||||
|
* @summary Test of toString on normal annotations
|
||||||
|
* @library /tools/javac/lib
|
||||||
|
* @build JavacTestingAbstractProcessor AnnotationToStringTest
|
||||||
|
* @compile -processor AnnotationToStringTest -proc:only AnnotationToStringTest.java
|
||||||
|
*/
|
||||||
|
|
||||||
|
// See also the sibling core reflection test
|
||||||
|
// test/jdk/java/lang/annotation/AnnotationToStringTest.java
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
import java.lang.reflect.*;
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.processing.*;
|
||||||
|
import javax.lang.model.AnnotatedConstruct;
|
||||||
|
import javax.lang.model.element.*;
|
||||||
|
import javax.lang.model.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The expected string values are stored in @ExpectedString
|
||||||
|
* annotations. The essence of the test is comparing the toString()
|
||||||
|
* result of annotations to the corresponding ExpectedString.value().
|
||||||
|
*
|
||||||
|
* Two flavors of comparison are made:
|
||||||
|
*
|
||||||
|
* 1) Against the AnnotationMirror value from getAnnotationMirrors()
|
||||||
|
*
|
||||||
|
* 2) Against the *Annotation* from getAnnotation(Class<A>)
|
||||||
|
*
|
||||||
|
* These have separate but related implementations.
|
||||||
|
*/
|
||||||
|
public class AnnotationToStringTest extends JavacTestingAbstractProcessor {
|
||||||
|
public boolean process(Set<? extends TypeElement> annotations,
|
||||||
|
RoundEnvironment roundEnv) {
|
||||||
|
if (!roundEnv.processingOver()) {
|
||||||
|
|
||||||
|
int failures = 0;
|
||||||
|
|
||||||
|
TypeElement primHostElt =
|
||||||
|
Objects.requireNonNull(elements.getTypeElement("AnnotationToStringTest.PrimHost"));
|
||||||
|
|
||||||
|
List<? extends AnnotationMirror> annotMirrors = primHostElt.getAnnotationMirrors();
|
||||||
|
|
||||||
|
String expectedString = primHostElt.getAnnotation(MostlyPrimitive.class).toString();
|
||||||
|
|
||||||
|
failures += check(expectedString,
|
||||||
|
primHostElt.getAnnotation(ExpectedString.class).value());
|
||||||
|
|
||||||
|
failures += check(expectedString,
|
||||||
|
retrieveAnnotationMirrorAsString(primHostElt,
|
||||||
|
"MostlyPrimitive"));
|
||||||
|
failures += classyTest();
|
||||||
|
failures += arrayAnnotationTest();
|
||||||
|
|
||||||
|
if (failures > 0)
|
||||||
|
throw new RuntimeException(failures + " failures");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Examine annotation mirrors, find the one that matches
|
||||||
|
* annotationName, and return its toString value.
|
||||||
|
*/
|
||||||
|
private String retrieveAnnotationMirrorAsString(AnnotatedConstruct annotated,
|
||||||
|
String annotationName) {
|
||||||
|
return retrieveAnnotationMirror(annotated, annotationName).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String retrieveAnnotationMirrorValue(AnnotatedConstruct annotated,
|
||||||
|
String annotationName) {
|
||||||
|
AnnotationMirror annotationMirror =
|
||||||
|
retrieveAnnotationMirror(annotated, annotationName);
|
||||||
|
for (var entry : annotationMirror.getElementValues().entrySet()) {
|
||||||
|
if (entry.getKey().getSimpleName().contentEquals("value")) {
|
||||||
|
return entry.getValue().toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new RuntimeException("Annotation value() method not found: " +
|
||||||
|
annotationMirror.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
private AnnotationMirror retrieveAnnotationMirror(AnnotatedConstruct annotated,
|
||||||
|
String annotationName) {
|
||||||
|
for (AnnotationMirror annotationMirror : annotated.getAnnotationMirrors()) {
|
||||||
|
System.out.println(annotationMirror.getAnnotationType());
|
||||||
|
if (annotationMirror
|
||||||
|
.getAnnotationType()
|
||||||
|
.toString()
|
||||||
|
.equals(annotationName) ) {
|
||||||
|
return annotationMirror;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new RuntimeException("Annotation " + annotationName + " not found.");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int check(String expected, String actual) {
|
||||||
|
if (!expected.equals(actual)) {
|
||||||
|
System.err.printf("ERROR: Expected ''%s'';%ngot ''%s''.\n",
|
||||||
|
expected, actual);
|
||||||
|
return 1;
|
||||||
|
} else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@MostlyPrimitive(c0='a', "+
|
||||||
|
"c1='\\'', " +
|
||||||
|
"b0=(byte)0x01, " +
|
||||||
|
"i0=1, " +
|
||||||
|
"i1=2, " +
|
||||||
|
"f0=1.0f, " +
|
||||||
|
"f1=0.0f/0.0f, " +
|
||||||
|
"d0=0.0, " +
|
||||||
|
"d1=1.0/0.0, " +
|
||||||
|
"l0=5L, " +
|
||||||
|
"l1=9223372036854775807L, " +
|
||||||
|
"l2=-9223372036854775808L, " +
|
||||||
|
"l3=-2147483648L, " +
|
||||||
|
"s0=\"Hello world.\", " +
|
||||||
|
"s1=\"a\\\"b\", " +
|
||||||
|
"class0=Obj[].class, " +
|
||||||
|
"classArray={Obj[].class})")
|
||||||
|
@MostlyPrimitive(
|
||||||
|
c0='a',
|
||||||
|
c1='\'',
|
||||||
|
b0=1,
|
||||||
|
i0=1,
|
||||||
|
i1=2,
|
||||||
|
f0=1.0f,
|
||||||
|
f1=Float.NaN,
|
||||||
|
d0=0.0,
|
||||||
|
d1=2.0/0.0,
|
||||||
|
l0=5,
|
||||||
|
l1=Long.MAX_VALUE,
|
||||||
|
l2=Long.MIN_VALUE,
|
||||||
|
l3=Integer.MIN_VALUE,
|
||||||
|
s0="Hello world.",
|
||||||
|
s1="a\"b",
|
||||||
|
class0=Obj[].class,
|
||||||
|
classArray={Obj[].class}
|
||||||
|
)
|
||||||
|
static class PrimHost{}
|
||||||
|
|
||||||
|
private int classyTest() {
|
||||||
|
int failures = 0;
|
||||||
|
|
||||||
|
TypeElement annotationHostElt =
|
||||||
|
Objects.requireNonNull(elements.getTypeElement("AnnotationToStringTest.AnnotationHost"));
|
||||||
|
|
||||||
|
for (VariableElement f : ElementFilter.fieldsIn(annotationHostElt.getEnclosedElements())) {
|
||||||
|
String expected = f.getAnnotation(ExpectedString.class).value();
|
||||||
|
Annotation a = f.getAnnotation(Classy.class);
|
||||||
|
|
||||||
|
System.out.println(a);
|
||||||
|
failures += check(expected, a.toString());
|
||||||
|
|
||||||
|
failures += check(expected,
|
||||||
|
retrieveAnnotationMirrorAsString(f, "Classy") );
|
||||||
|
}
|
||||||
|
return failures;
|
||||||
|
}
|
||||||
|
|
||||||
|
static class AnnotationHost {
|
||||||
|
@ExpectedString(
|
||||||
|
"@Classy(Obj.class)")
|
||||||
|
@Classy(Obj.class)
|
||||||
|
public int f0;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@Classy(Obj[].class)")
|
||||||
|
@Classy(Obj[].class)
|
||||||
|
public int f1;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@Classy(Obj[][].class)")
|
||||||
|
@Classy(Obj[][].class)
|
||||||
|
public int f2;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@Classy(Obj[][][].class)")
|
||||||
|
@Classy(Obj[][][].class)
|
||||||
|
public int f3;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@Classy(int.class)")
|
||||||
|
@Classy(int.class)
|
||||||
|
public int f4;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@Classy(int[][][].class)")
|
||||||
|
@Classy(int[][][].class)
|
||||||
|
public int f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Each field should have two annotations, the first being
|
||||||
|
* @ExpectedString and the second the annotation under test.
|
||||||
|
*/
|
||||||
|
private int arrayAnnotationTest() {
|
||||||
|
int failures = 0;
|
||||||
|
|
||||||
|
TypeElement arrayAnnotationHostElt =
|
||||||
|
Objects.requireNonNull(elements
|
||||||
|
.getTypeElement("AnnotationToStringTest.ArrayAnnotationHost"));
|
||||||
|
|
||||||
|
for (VariableElement f :
|
||||||
|
ElementFilter.fieldsIn(arrayAnnotationHostElt.getEnclosedElements())) {
|
||||||
|
var annotations = f.getAnnotationMirrors();
|
||||||
|
// String expected = retrieveAnnotationMirrorValue(f, "ExpectedString");
|
||||||
|
String expected = f.getAnnotation(ExpectedString.class).value();
|
||||||
|
|
||||||
|
// Problem with
|
||||||
|
// Need a de-quote method...
|
||||||
|
// expected = expected.substring(1, expected.length() - 1);
|
||||||
|
|
||||||
|
failures +=
|
||||||
|
check(expected,
|
||||||
|
annotations.get(1).toString());
|
||||||
|
|
||||||
|
// Get the array-valued annotation as an annotation
|
||||||
|
failures +=
|
||||||
|
check(expected,
|
||||||
|
retrieveAnnotationMirrorAsString(f,
|
||||||
|
annotations.get(1)
|
||||||
|
.getAnnotationType().toString()));
|
||||||
|
}
|
||||||
|
return failures;
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ArrayAnnotationHost {
|
||||||
|
@ExpectedString(
|
||||||
|
"@BooleanArray({true, false, true})")
|
||||||
|
@BooleanArray({true, false, true})
|
||||||
|
public boolean[] f0;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@FloatArray({3.0f, 4.0f, 0.0f/0.0f, -1.0f/0.0f, 1.0f/0.0f})")
|
||||||
|
@FloatArray({3.0f, 4.0f, Float.NaN, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY})
|
||||||
|
public float[] f1;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@DoubleArray({1.0, 2.0, 0.0/0.0, 1.0/0.0, -1.0/0.0})")
|
||||||
|
@DoubleArray({1.0, 2.0, Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY,})
|
||||||
|
public double[] f2;
|
||||||
|
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@ByteArray({(byte)0x0a, (byte)0x0b, (byte)0x0c})")
|
||||||
|
@ByteArray({10, 11, 12})
|
||||||
|
public byte[] f3;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@ShortArray({0, 4, 5})")
|
||||||
|
@ShortArray({0, 4, 5})
|
||||||
|
public short[] f4;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@CharArray({'a', 'b', 'c', '\\''})")
|
||||||
|
@CharArray({'a', 'b', 'c', '\''})
|
||||||
|
public char[] f5;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@IntArray({1})")
|
||||||
|
@IntArray({1})
|
||||||
|
public int[] f6;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@LongArray({-9223372036854775808L, -2147483649L, -2147483648L," +
|
||||||
|
" -2147483647L, 2147483648L, 9223372036854775807L})")
|
||||||
|
@LongArray({Long.MIN_VALUE, Integer.MIN_VALUE-1L, Integer.MIN_VALUE,
|
||||||
|
-Integer.MAX_VALUE, Integer.MAX_VALUE+1L, Long.MAX_VALUE})
|
||||||
|
public long[] f7;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@StringArray({\"A\", \"B\", \"C\", \"\\\"Quote\\\"\"})")
|
||||||
|
@StringArray({"A", "B", "C", "\"Quote\""})
|
||||||
|
public String[] f8;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@ClassArray({int.class, Obj[].class})")
|
||||||
|
@ClassArray({int.class, Obj[].class})
|
||||||
|
public Class<?>[] f9;
|
||||||
|
|
||||||
|
@ExpectedString(
|
||||||
|
"@EnumArray({SOURCE})")
|
||||||
|
@EnumArray({RetentionPolicy.SOURCE})
|
||||||
|
public RetentionPolicy[] f10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------ Supporting types ------------
|
||||||
|
|
||||||
|
class Obj {}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface ExpectedString {
|
||||||
|
String value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface Classy {
|
||||||
|
Class<?> value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface BooleanArray {
|
||||||
|
boolean[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface FloatArray {
|
||||||
|
float[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface DoubleArray {
|
||||||
|
double[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface ByteArray {
|
||||||
|
byte[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface ShortArray {
|
||||||
|
short[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface CharArray {
|
||||||
|
char[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface IntArray {
|
||||||
|
int[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface LongArray {
|
||||||
|
long[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface ClassArray {
|
||||||
|
Class<?>[] value() default {int.class, Obj[].class};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface StringArray {
|
||||||
|
String[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface EnumArray {
|
||||||
|
RetentionPolicy[] value();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface MostlyPrimitive {
|
||||||
|
char c0();
|
||||||
|
char c1();
|
||||||
|
byte b0();
|
||||||
|
int i0();
|
||||||
|
int i1();
|
||||||
|
float f0();
|
||||||
|
float f1();
|
||||||
|
double d0();
|
||||||
|
double d1();
|
||||||
|
long l0();
|
||||||
|
long l1();
|
||||||
|
long l2();
|
||||||
|
long l3();
|
||||||
|
String s0();
|
||||||
|
String s1();
|
||||||
|
Class<?> class0();
|
||||||
|
Class<?>[] classArray();
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -37,11 +37,11 @@
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "@Bar(value=0)",
|
getAnnotation = "@Bar(0)",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=0)",
|
"@Bar(0)",
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Bar(0)",
|
"@Bar(0)",
|
||||||
|
@ -57,19 +57,19 @@
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@Bar(value = 0)
|
@Bar(value = 0)
|
||||||
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
||||||
class MixRepeatableAndOfficialContainerBasicTest {
|
class MixRepeatableAndOfficialContainerBasicTest {
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "@Bar(value=0)",
|
getAnnotation = "@Bar(0)",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=0)",
|
"@Bar(0)",
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Bar(0)",
|
"@Bar(0)",
|
||||||
|
@ -85,19 +85,19 @@ class MixRepeatableAndOfficialContainerBasicTest {
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@Bar(value = 0)
|
@Bar(value = 0)
|
||||||
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
||||||
int testField = 0;
|
int testField = 0;
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "@Bar(value=0)",
|
getAnnotation = "@Bar(0)",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=0)",
|
"@Bar(0)",
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Bar(0)",
|
"@Bar(0)",
|
||||||
|
@ -113,8 +113,8 @@ class MixRepeatableAndOfficialContainerBasicTest {
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@Bar(value = 0)
|
@Bar(value = 0)
|
||||||
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
||||||
void testMethod() {}
|
void testMethod() {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,15 +35,15 @@
|
||||||
* MixRepeatableAndOfficialContainerInheritedA1Test.java
|
* MixRepeatableAndOfficialContainerInheritedA1Test.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@BarInherited(value = 0)
|
@BarInherited(0)
|
||||||
class E {}
|
class E {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInherited.class,
|
value = BarInherited.class,
|
||||||
getAnnotation = "@BarInherited(value=0)",
|
getAnnotation = "@BarInherited(0)",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarInherited(value=1)",
|
"@BarInherited(1)",
|
||||||
"@BarInherited(value=2)"
|
"@BarInherited(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInherited(0)",
|
"@BarInherited(0)",
|
||||||
|
@ -59,8 +59,8 @@ class E {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainer("
|
getAnnotation = "@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})",
|
+ "{@BarInherited(1), @BarInherited(2)})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainer("
|
getAnnotationsByType = {"@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})"})
|
+ "{@BarInherited(1), @BarInherited(2)})"})
|
||||||
@BarInheritedContainer(value = {@BarInherited(value = 1), @BarInherited(value = 2)})
|
@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})
|
||||||
class MixRepeatableAndOfficialContainerInheritedA1Test extends E {}
|
class MixRepeatableAndOfficialContainerInheritedA1Test extends E {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,16 +35,16 @@
|
||||||
* MixRepeatableAndOfficialContainerInheritedA2Test.java
|
* MixRepeatableAndOfficialContainerInheritedA2Test.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@BarInherited(value = 0)
|
@BarInherited(0)
|
||||||
class N {}
|
class N {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInherited.class,
|
value = BarInherited.class,
|
||||||
getAnnotation = "@BarInherited(value=3)",
|
getAnnotation = "@BarInherited(3)",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarInherited(value=1)",
|
"@BarInherited(1)",
|
||||||
"@BarInherited(value=2)",
|
"@BarInherited(2)",
|
||||||
"@BarInherited(value=3)"
|
"@BarInherited(3)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInherited(3)",
|
"@BarInherited(3)",
|
||||||
|
@ -61,9 +61,9 @@ class N {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainer("
|
getAnnotation = "@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})",
|
+ "{@BarInherited(1), @BarInherited(2)})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainer("
|
getAnnotationsByType = {"@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})"})
|
+ "{@BarInherited(1), @BarInherited(2)})"})
|
||||||
@BarInheritedContainer(value = {@BarInherited(value = 1), @BarInherited(value = 2)})
|
@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})
|
||||||
@BarInherited(value = 3)
|
@BarInherited(3)
|
||||||
class MixRepeatableAndOfficialContainerInheritedA2Test extends N {}
|
class MixRepeatableAndOfficialContainerInheritedA2Test extends N {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -40,8 +40,8 @@ class M {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInherited.class,
|
value = BarInherited.class,
|
||||||
getAnnotation = "@BarInherited(value=0)",
|
getAnnotation = "@BarInherited(0)",
|
||||||
getAnnotationsByType = {"@BarInherited(value=0)"},
|
getAnnotationsByType = {"@BarInherited(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInherited(0)",
|
"@BarInherited(0)",
|
||||||
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
||||||
|
@ -56,8 +56,8 @@ class M {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainer("
|
getAnnotation = "@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})",
|
+ "{@BarInherited(1), @BarInherited(2)})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainer("
|
getAnnotationsByType = {"@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})"})
|
+ "{@BarInherited(1), @BarInherited(2)})"})
|
||||||
@BarInherited(value = 0)
|
@BarInherited(0)
|
||||||
class MixRepeatableAndOfficialContainerInheritedB1Test extends M {}
|
class MixRepeatableAndOfficialContainerInheritedB1Test extends M {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,14 +35,14 @@
|
||||||
* MixRepeatableAndOfficialContainerInheritedB2Test.java
|
* MixRepeatableAndOfficialContainerInheritedB2Test.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@BarInheritedContainer(value = {@BarInherited(value = 1), @BarInherited(value = 2)})
|
@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})
|
||||||
@BarInherited(value = 3)
|
@BarInherited(3)
|
||||||
class H {}
|
class H {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInherited.class,
|
value = BarInherited.class,
|
||||||
getAnnotation = "@BarInherited(value=0)",
|
getAnnotation = "@BarInherited(0)",
|
||||||
getAnnotationsByType = {"@BarInherited(value=0)"},
|
getAnnotationsByType = {"@BarInherited(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInherited(0)",
|
"@BarInherited(0)",
|
||||||
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
||||||
|
@ -57,8 +57,8 @@ class H {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainer("
|
getAnnotation = "@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})",
|
+ "{@BarInherited(1), @BarInherited(2)})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainer("
|
getAnnotationsByType = {"@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})"})
|
+ "{@BarInherited(1), @BarInherited(2)})"})
|
||||||
@BarInherited(value = 0)
|
@BarInherited(0)
|
||||||
class MixRepeatableAndOfficialContainerInheritedB2Test extends H {}
|
class MixRepeatableAndOfficialContainerInheritedB2Test extends H {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -36,8 +36,8 @@
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Foo.class,
|
value = Foo.class,
|
||||||
getAnnotation = "@Foo(value=0)",
|
getAnnotation = "@Foo(0)",
|
||||||
getAnnotationsByType = {"@Foo(value=0)"},
|
getAnnotationsByType = {"@Foo(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Foo(0)",
|
"@Foo(0)",
|
||||||
"@UnofficialContainer({@Foo(1), @Foo(2)})",
|
"@UnofficialContainer({@Foo(1), @Foo(2)})",
|
||||||
|
@ -53,17 +53,17 @@
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialContainer.class,
|
value = UnofficialContainer.class,
|
||||||
getAnnotation = "@UnofficialContainer("
|
getAnnotation = "@UnofficialContainer("
|
||||||
+ "value={@Foo(value=1), @Foo(value=2)})",
|
+ "{@Foo(1), @Foo(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialContainer("
|
getAnnotationsByType = {"@UnofficialContainer("
|
||||||
+ "value={@Foo(value=1), @Foo(value=2)})"})
|
+ "{@Foo(1), @Foo(2)})"})
|
||||||
@Foo(value = 0)
|
@Foo(0)
|
||||||
@UnofficialContainer(value = {@Foo(value = 1), @Foo(value = 2)})
|
@UnofficialContainer({@Foo(1), @Foo(2)})
|
||||||
class MixSingularAndUnofficialContainerBasicTest {
|
class MixSingularAndUnofficialContainerBasicTest {
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Foo.class,
|
value = Foo.class,
|
||||||
getAnnotation = "@Foo(value=0)",
|
getAnnotation = "@Foo(0)",
|
||||||
getAnnotationsByType = {"@Foo(value=0)"},
|
getAnnotationsByType = {"@Foo(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Foo(0)",
|
"@Foo(0)",
|
||||||
"@UnofficialContainer({@Foo(1), @Foo(2)})",
|
"@UnofficialContainer({@Foo(1), @Foo(2)})",
|
||||||
|
@ -79,17 +79,17 @@ class MixSingularAndUnofficialContainerBasicTest {
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialContainer.class,
|
value = UnofficialContainer.class,
|
||||||
getAnnotation = "@UnofficialContainer("
|
getAnnotation = "@UnofficialContainer("
|
||||||
+ "value={@Foo(value=1), @Foo(value=2)})",
|
+ "{@Foo(1), @Foo(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialContainer("
|
getAnnotationsByType = {"@UnofficialContainer("
|
||||||
+ "value={@Foo(value=1), @Foo(value=2)})"})
|
+ "{@Foo(1), @Foo(2)})"})
|
||||||
@Foo(value = 0)
|
@Foo(0)
|
||||||
@UnofficialContainer(value = {@Foo(value = 1), @Foo(value = 2)})
|
@UnofficialContainer({@Foo(1), @Foo(2)})
|
||||||
int testField = 0;
|
int testField = 0;
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Foo.class,
|
value = Foo.class,
|
||||||
getAnnotation = "@Foo(value=0)",
|
getAnnotation = "@Foo(0)",
|
||||||
getAnnotationsByType = {"@Foo(value=0)"},
|
getAnnotationsByType = {"@Foo(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Foo(0)",
|
"@Foo(0)",
|
||||||
"@UnofficialContainer({@Foo(1), @Foo(2)})",
|
"@UnofficialContainer({@Foo(1), @Foo(2)})",
|
||||||
|
@ -105,10 +105,10 @@ class MixSingularAndUnofficialContainerBasicTest {
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialContainer.class,
|
value = UnofficialContainer.class,
|
||||||
getAnnotation = "@UnofficialContainer("
|
getAnnotation = "@UnofficialContainer("
|
||||||
+ "value={@Foo(value=1), @Foo(value=2)})",
|
+ "{@Foo(1), @Foo(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialContainer("
|
getAnnotationsByType = {"@UnofficialContainer("
|
||||||
+ "value={@Foo(value=1), @Foo(value=2)})"})
|
+ "{@Foo(1), @Foo(2)})"})
|
||||||
@Foo(value = 0)
|
@Foo(0)
|
||||||
@UnofficialContainer(value = {@Foo(value = 1), @Foo(value = 2)})
|
@UnofficialContainer({@Foo(1), @Foo(2)})
|
||||||
void testMethod() {}
|
void testMethod() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,13 +35,13 @@
|
||||||
* MixSingularAndUnofficialContainerInheritedA1Test.java
|
* MixSingularAndUnofficialContainerInheritedA1Test.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@FooInherited(value = 0)
|
@FooInherited(0)
|
||||||
class L {}
|
class L {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = FooInherited.class,
|
value = FooInherited.class,
|
||||||
getAnnotation = "@FooInherited(value=0)",
|
getAnnotation = "@FooInherited(0)",
|
||||||
getAnnotationsByType = {"@FooInherited(value=0)"},
|
getAnnotationsByType = {"@FooInherited(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@FooInherited(0)",
|
"@FooInherited(0)",
|
||||||
"@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})",
|
"@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})",
|
||||||
|
@ -56,8 +56,8 @@ class L {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialInheritedContainer.class,
|
value = UnofficialInheritedContainer.class,
|
||||||
getAnnotation = "@UnofficialInheritedContainer("
|
getAnnotation = "@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})",
|
+ "{@FooInherited(1), @FooInherited(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})"})
|
+ "{@FooInherited(1), @FooInherited(2)})"})
|
||||||
@UnofficialInheritedContainer(value = {@FooInherited(value = 1), @FooInherited(value = 2)})
|
@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})
|
||||||
class MixSingularAndUnofficialContainerInheritedA1Test extends L {}
|
class MixSingularAndUnofficialContainerInheritedA1Test extends L {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,13 +35,13 @@
|
||||||
* MixSingularAndUnofficialContainerInheritedA2Test.java
|
* MixSingularAndUnofficialContainerInheritedA2Test.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@FooInherited(value = 0)
|
@FooInherited(0)
|
||||||
class K {}
|
class K {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = FooInherited.class,
|
value = FooInherited.class,
|
||||||
getAnnotation = "@FooInherited(value=3)",
|
getAnnotation = "@FooInherited(3)",
|
||||||
getAnnotationsByType = {"@FooInherited(value=3)"},
|
getAnnotationsByType = {"@FooInherited(3)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@FooInherited(3)",
|
"@FooInherited(3)",
|
||||||
"@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})",
|
"@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})",
|
||||||
|
@ -57,9 +57,9 @@ class K {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialInheritedContainer.class,
|
value = UnofficialInheritedContainer.class,
|
||||||
getAnnotation = "@UnofficialInheritedContainer("
|
getAnnotation = "@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})",
|
+ "{@FooInherited(1), @FooInherited(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})"})
|
+ "{@FooInherited(1), @FooInherited(2)})"})
|
||||||
@UnofficialInheritedContainer(value = {@FooInherited(value = 1), @FooInherited(value = 2)})
|
@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})
|
||||||
@FooInherited(value = 3)
|
@FooInherited(3)
|
||||||
class MixSingularAndUnofficialContainerInheritedA2Test extends K {}
|
class MixSingularAndUnofficialContainerInheritedA2Test extends K {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,13 +35,13 @@
|
||||||
* MixSingularAndUnofficialContainerInheritedB1Test.java
|
* MixSingularAndUnofficialContainerInheritedB1Test.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@UnofficialInheritedContainer(value = {@FooInherited(value = 1),@FooInherited(value = 2)})
|
@UnofficialInheritedContainer({@FooInherited(1),@FooInherited(2)})
|
||||||
class J {}
|
class J {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = FooInherited.class,
|
value = FooInherited.class,
|
||||||
getAnnotation = "@FooInherited(value=0)",
|
getAnnotation = "@FooInherited(0)",
|
||||||
getAnnotationsByType = {"@FooInherited(value=0)"},
|
getAnnotationsByType = {"@FooInherited(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@FooInherited(0)",
|
"@FooInherited(0)",
|
||||||
"@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})",
|
"@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})",
|
||||||
|
@ -56,8 +56,8 @@ class J {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialInheritedContainer.class,
|
value = UnofficialInheritedContainer.class,
|
||||||
getAnnotation = "@UnofficialInheritedContainer("
|
getAnnotation = "@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})",
|
+ "{@FooInherited(1), @FooInherited(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})"})
|
+ "{@FooInherited(1), @FooInherited(2)})"})
|
||||||
@FooInherited(value = 0)
|
@FooInherited(0)
|
||||||
class MixSingularAndUnofficialContainerInheritedB1Test extends J {}
|
class MixSingularAndUnofficialContainerInheritedB1Test extends J {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,14 +35,14 @@
|
||||||
* MixSingularAndUnofficialContainerInheritedB2Test.java
|
* MixSingularAndUnofficialContainerInheritedB2Test.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@UnofficialInheritedContainer(value = {@FooInherited(value = 1), @FooInherited(value = 2)})
|
@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})
|
||||||
@FooInherited(value = 3)
|
@FooInherited(3)
|
||||||
class G {}
|
class G {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = FooInherited.class,
|
value = FooInherited.class,
|
||||||
getAnnotation = "@FooInherited(value=0)",
|
getAnnotation = "@FooInherited(0)",
|
||||||
getAnnotationsByType = {"@FooInherited(value=0)"},
|
getAnnotationsByType = {"@FooInherited(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@FooInherited(0)",
|
"@FooInherited(0)",
|
||||||
"@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})",
|
"@UnofficialInheritedContainer({@FooInherited(1), @FooInherited(2)})",
|
||||||
|
@ -57,8 +57,8 @@ class G {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialInheritedContainer.class,
|
value = UnofficialInheritedContainer.class,
|
||||||
getAnnotation = "@UnofficialInheritedContainer("
|
getAnnotation = "@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})",
|
+ "{@FooInherited(1), @FooInherited(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})"})
|
+ "{@FooInherited(1), @FooInherited(2)})"})
|
||||||
@FooInherited(value = 0)
|
@FooInherited(0)
|
||||||
class MixSingularAndUnofficialContainerInheritedB2Test extends G{}
|
class MixSingularAndUnofficialContainerInheritedB2Test extends G{}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -38,8 +38,8 @@
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarContainer({@Bar(1), @Bar(2)})",
|
"@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
|
@ -53,17 +53,17 @@
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
@BarContainer({@Bar(1), @Bar(2)})
|
||||||
class OfficialContainerBasicTest {
|
class OfficialContainerBasicTest {
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarContainer({@Bar(1), @Bar(2)})",
|
"@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
|
@ -77,17 +77,17 @@ class OfficialContainerBasicTest {
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
@BarContainer({@Bar(1), @Bar(2)})
|
||||||
int testField = 0;
|
int testField = 0;
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarContainer({@Bar(1), @Bar(2)})",
|
"@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
|
@ -101,8 +101,8 @@ class OfficialContainerBasicTest {
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@BarContainer(value = {@Bar(value = 1), @Bar(value = 2)})
|
@BarContainer({@Bar(1), @Bar(2)})
|
||||||
void testMethod() {}
|
void testMethod() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,15 +34,15 @@
|
||||||
* @compile -processor ElementRepAnnoTester -proc:only OfficialContainerInheritedTest.java
|
* @compile -processor ElementRepAnnoTester -proc:only OfficialContainerInheritedTest.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@BarInheritedContainer(value = {@BarInherited(value = 1), @BarInherited(value = 2)})
|
@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})
|
||||||
class D {}
|
class D {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInherited.class,
|
value = BarInherited.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarInherited(value=1)",
|
"@BarInherited(1)",
|
||||||
"@BarInherited(value=2)"
|
"@BarInherited(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
||||||
|
@ -56,7 +56,7 @@ class D {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainer("
|
getAnnotation = "@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})",
|
+ "{@BarInherited(1), @BarInherited(2)})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainer("
|
getAnnotationsByType = {"@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})"})
|
+ "{@BarInherited(1), @BarInherited(2)})"})
|
||||||
class OfficialContainerInheritedTest extends D {}
|
class OfficialContainerInheritedTest extends D {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -38,8 +38,8 @@
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarContainer({@Bar(1), @Bar(2)})",
|
"@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
|
@ -53,18 +53,18 @@
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@Bar(value = 1)
|
@Bar(1)
|
||||||
@Bar(value = 2)
|
@Bar(2)
|
||||||
class RepeatableBasicTest {
|
class RepeatableBasicTest {
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarContainer({@Bar(1), @Bar(2)})",
|
"@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
|
@ -78,18 +78,18 @@ class RepeatableBasicTest {
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@Bar(value = 1)
|
@Bar(1)
|
||||||
@Bar(value = 2)
|
@Bar(2)
|
||||||
int testField = 0;
|
int testField = 0;
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Bar.class,
|
value = Bar.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@Bar(value=1)",
|
"@Bar(1)",
|
||||||
"@Bar(value=2)"
|
"@Bar(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarContainer({@Bar(1), @Bar(2)})",
|
"@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
|
@ -103,9 +103,9 @@ class RepeatableBasicTest {
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})",
|
getAnnotation = "@BarContainer({@Bar(1), @Bar(2)})",
|
||||||
getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"})
|
getAnnotationsByType = {"@BarContainer({@Bar(1), @Bar(2)})"})
|
||||||
@Bar(value = 1)
|
@Bar(1)
|
||||||
@Bar(value = 2)
|
@Bar(2)
|
||||||
void testMethod() {}
|
void testMethod() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,16 +34,16 @@
|
||||||
* @compile -processor ElementRepAnnoTester -proc:only RepeatableInheritedTest.java
|
* @compile -processor ElementRepAnnoTester -proc:only RepeatableInheritedTest.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@BarInherited(value = 1)
|
@BarInherited(1)
|
||||||
@BarInherited(value = 2)
|
@BarInherited(2)
|
||||||
class I {}
|
class I {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInherited.class,
|
value = BarInherited.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarInherited(value=1)",
|
"@BarInherited(1)",
|
||||||
"@BarInherited(value=2)"
|
"@BarInherited(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
||||||
|
@ -57,7 +57,7 @@ class I {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainer("
|
getAnnotation = "@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})",
|
+ "{@BarInherited(1), @BarInherited(2)})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainer("
|
getAnnotationsByType = {"@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})"})
|
+ "{@BarInherited(1), @BarInherited(2)})"})
|
||||||
class RepeatableInheritedTest extends I {}
|
class RepeatableInheritedTest extends I {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -52,10 +52,10 @@
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarContainer(value={@Bar(value=1)})",
|
"@BarContainer({@Bar(1)})",
|
||||||
"@BarContainer(value={@Bar(value=2)})"})
|
"@BarContainer({@Bar(2)})"})
|
||||||
@BarContainer(value = {@Bar(value = 1)})
|
@BarContainer({@Bar(1)})
|
||||||
@BarContainer(value = {@Bar(value = 2)})
|
@BarContainer({@Bar(2)})
|
||||||
class RepeatableOfficialContainerBasicTest {
|
class RepeatableOfficialContainerBasicTest {
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
|
@ -76,10 +76,10 @@ class RepeatableOfficialContainerBasicTest {
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarContainer(value={@Bar(value=1)})",
|
"@BarContainer({@Bar(1)})",
|
||||||
"@BarContainer(value={@Bar(value=2)})"})
|
"@BarContainer({@Bar(2)})"})
|
||||||
@BarContainer(value = {@Bar(value = 1)})
|
@BarContainer({@Bar(1)})
|
||||||
@BarContainer(value = {@Bar(value = 2)})
|
@BarContainer({@Bar(2)})
|
||||||
int testField = 0;
|
int testField = 0;
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
|
@ -100,9 +100,9 @@ class RepeatableOfficialContainerBasicTest {
|
||||||
value = BarContainer.class,
|
value = BarContainer.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarContainer(value={@Bar(value=1)})",
|
"@BarContainer({@Bar(1)})",
|
||||||
"@BarContainer(value={@Bar(value=2)})"})
|
"@BarContainer({@Bar(2)})"})
|
||||||
@BarContainer(value = {@Bar(value = 1)})
|
@BarContainer({@Bar(1)})
|
||||||
@BarContainer(value = {@Bar(value = 2)})
|
@BarContainer({@Bar(2)})
|
||||||
void testMethod() {}
|
void testMethod() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,16 +35,16 @@
|
||||||
* RepeatableOfficialContainerInheritedTest.java
|
* RepeatableOfficialContainerInheritedTest.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@BarInheritedContainer(value = {@BarInherited(value = 1)})
|
@BarInheritedContainer({@BarInherited(1)})
|
||||||
@BarInheritedContainer(value = {@BarInherited(value = 2)})
|
@BarInheritedContainer({@BarInherited(2)})
|
||||||
class O {}
|
class O {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarInheritedContainer(value={@BarInherited(value=1)})",
|
"@BarInheritedContainer({@BarInherited(1)})",
|
||||||
"@BarInheritedContainer(value={@BarInherited(value=2)})"
|
"@BarInheritedContainer({@BarInherited(2)})"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInheritedContainerContainer("
|
"@BarInheritedContainerContainer("
|
||||||
|
@ -60,9 +60,9 @@ class O {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainerContainer.class,
|
value = BarInheritedContainerContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainerContainer("
|
getAnnotation = "@BarInheritedContainerContainer("
|
||||||
+ "value={@BarInheritedContainer(value={@BarInherited(value=1)}),"
|
+ "{@BarInheritedContainer({@BarInherited(1)}),"
|
||||||
+ " @BarInheritedContainer(value={@BarInherited(value=2)})})",
|
+ " @BarInheritedContainer({@BarInherited(2)})})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainerContainer("
|
getAnnotationsByType = {"@BarInheritedContainerContainer("
|
||||||
+ "value={@BarInheritedContainer(value={@BarInherited(value=1)}),"
|
+ "{@BarInheritedContainer({@BarInherited(1)}),"
|
||||||
+ " @BarInheritedContainer(value={@BarInherited(value=2)})})"})
|
+ " @BarInheritedContainer({@BarInherited(2)})})"})
|
||||||
class RepeatableOfficialContainerInheritedTest extends O {}
|
class RepeatableOfficialContainerInheritedTest extends O {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,14 +34,14 @@
|
||||||
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideATest.java
|
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideATest.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@BarInherited(value = 1)
|
@BarInherited(1)
|
||||||
@BarInherited(value = 2)
|
@BarInherited(2)
|
||||||
class B {}
|
class B {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInherited.class,
|
value = BarInherited.class,
|
||||||
getAnnotation = "@BarInherited(value=3)",
|
getAnnotation = "@BarInherited(3)",
|
||||||
getAnnotationsByType = {"@BarInherited(value=3)"},
|
getAnnotationsByType = {"@BarInherited(3)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInherited(3)",
|
"@BarInherited(3)",
|
||||||
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
"@BarInheritedContainer({@BarInherited(1), @BarInherited(2)})",
|
||||||
|
@ -56,8 +56,8 @@ class B {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainer("
|
getAnnotation = "@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})",
|
+ "{@BarInherited(1), @BarInherited(2)})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainer("
|
getAnnotationsByType = {"@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})"})
|
+ "{@BarInherited(1), @BarInherited(2)})"})
|
||||||
@BarInherited(value = 3)
|
@BarInherited(3)
|
||||||
class RepeatableOverrideATest extends B {}
|
class RepeatableOverrideATest extends B {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,15 +34,15 @@
|
||||||
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideBTest.java
|
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideBTest.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@BarInherited(value = 0)
|
@BarInherited(0)
|
||||||
class C {}
|
class C {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = BarInherited.class,
|
value = BarInherited.class,
|
||||||
getAnnotation = "@BarInherited(value=0)",
|
getAnnotation = "@BarInherited(0)",
|
||||||
getAnnotationsByType = {
|
getAnnotationsByType = {
|
||||||
"@BarInherited(value=1)",
|
"@BarInherited(1)",
|
||||||
"@BarInherited(value=2)"
|
"@BarInherited(2)"
|
||||||
},
|
},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@BarInherited(0)",
|
"@BarInherited(0)",
|
||||||
|
@ -58,9 +58,9 @@ class C {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = BarInheritedContainer.class,
|
value = BarInheritedContainer.class,
|
||||||
getAnnotation = "@BarInheritedContainer("
|
getAnnotation = "@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})",
|
+ "{@BarInherited(1), @BarInherited(2)})",
|
||||||
getAnnotationsByType = {"@BarInheritedContainer("
|
getAnnotationsByType = {"@BarInheritedContainer("
|
||||||
+ "value={@BarInherited(value=1), @BarInherited(value=2)})"})
|
+ "{@BarInherited(1), @BarInherited(2)})"})
|
||||||
@BarInherited(value = 1)
|
@BarInherited(1)
|
||||||
@BarInherited(value = 2)
|
@BarInherited(2)
|
||||||
class RepeatableOverrideBTest extends C {}
|
class RepeatableOverrideBTest extends C {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -36,8 +36,8 @@
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Foo.class,
|
value = Foo.class,
|
||||||
getAnnotation = "@Foo(value=0)",
|
getAnnotation = "@Foo(0)",
|
||||||
getAnnotationsByType = {"@Foo(value=0)"},
|
getAnnotationsByType = {"@Foo(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Foo(0)",
|
"@Foo(0)",
|
||||||
"ExpectedBase",
|
"ExpectedBase",
|
||||||
|
@ -49,13 +49,13 @@
|
||||||
"ExpectedContainer"
|
"ExpectedContainer"
|
||||||
})
|
})
|
||||||
@ExpectedContainer
|
@ExpectedContainer
|
||||||
@Foo(value = 0)
|
@Foo(0)
|
||||||
public class SingularBasicTest {
|
public class SingularBasicTest {
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Foo.class,
|
value = Foo.class,
|
||||||
getAnnotation = "@Foo(value=0)",
|
getAnnotation = "@Foo(0)",
|
||||||
getAnnotationsByType = {"@Foo(value=0)"},
|
getAnnotationsByType = {"@Foo(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Foo(0)",
|
"@Foo(0)",
|
||||||
"ExpectedBase",
|
"ExpectedBase",
|
||||||
|
@ -67,13 +67,13 @@ public class SingularBasicTest {
|
||||||
"ExpectedContainer"
|
"ExpectedContainer"
|
||||||
})
|
})
|
||||||
@ExpectedContainer
|
@ExpectedContainer
|
||||||
@Foo(value = 0)
|
@Foo(0)
|
||||||
int testField = 0;
|
int testField = 0;
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = Foo.class,
|
value = Foo.class,
|
||||||
getAnnotation = "@Foo(value=0)",
|
getAnnotation = "@Foo(0)",
|
||||||
getAnnotationsByType = {"@Foo(value=0)"},
|
getAnnotationsByType = {"@Foo(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@Foo(0)",
|
"@Foo(0)",
|
||||||
"ExpectedBase",
|
"ExpectedBase",
|
||||||
|
@ -85,7 +85,7 @@ public class SingularBasicTest {
|
||||||
"ExpectedContainer"
|
"ExpectedContainer"
|
||||||
})
|
})
|
||||||
@ExpectedContainer
|
@ExpectedContainer
|
||||||
@Foo(value = 0)
|
@Foo(0)
|
||||||
void testMethod() {
|
void testMethod() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,13 +34,13 @@
|
||||||
* @compile -processor ElementRepAnnoTester -proc:only SingularInheritedATest.java
|
* @compile -processor ElementRepAnnoTester -proc:only SingularInheritedATest.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@FooInherited(value = 0)
|
@FooInherited(0)
|
||||||
class A {}
|
class A {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = FooInherited.class,
|
value = FooInherited.class,
|
||||||
getAnnotation = "@FooInherited(value=0)",
|
getAnnotation = "@FooInherited(0)",
|
||||||
getAnnotationsByType = {"@FooInherited(value=0)"},
|
getAnnotationsByType = {"@FooInherited(0)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@FooInherited(0)",
|
"@FooInherited(0)",
|
||||||
"ExpectedBase",
|
"ExpectedBase",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,13 +34,13 @@
|
||||||
* @compile -processor ElementRepAnnoTester -proc:only SingularInheritedBTest.java
|
* @compile -processor ElementRepAnnoTester -proc:only SingularInheritedBTest.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@FooInherited(value = 1)
|
@FooInherited(1)
|
||||||
class P {}
|
class P {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
value = FooInherited.class,
|
value = FooInherited.class,
|
||||||
getAnnotation = "@FooInherited(value=2)",
|
getAnnotation = "@FooInherited(2)",
|
||||||
getAnnotationsByType = {"@FooInherited(value=2)"},
|
getAnnotationsByType = {"@FooInherited(2)"},
|
||||||
getAllAnnotationMirrors = {
|
getAllAnnotationMirrors = {
|
||||||
"@FooInherited(2)",
|
"@FooInherited(2)",
|
||||||
"ExpectedBase",
|
"ExpectedBase",
|
||||||
|
@ -55,5 +55,5 @@ class P {}
|
||||||
value = UnofficialInheritedContainer.class,
|
value = UnofficialInheritedContainer.class,
|
||||||
getAnnotation = "null",
|
getAnnotation = "null",
|
||||||
getAnnotationsByType = {})
|
getAnnotationsByType = {})
|
||||||
@FooInherited(value = 2)
|
@FooInherited(2)
|
||||||
class SingularInheritedBTest extends P {}
|
class SingularInheritedBTest extends P {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -50,9 +50,9 @@
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialContainer.class,
|
value = UnofficialContainer.class,
|
||||||
getAnnotation = "@UnofficialContainer(value={@Foo(value=1), @Foo(value=2)})",
|
getAnnotation = "@UnofficialContainer({@Foo(1), @Foo(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialContainer(value={@Foo(value=1), @Foo(value=2)})"})
|
getAnnotationsByType = {"@UnofficialContainer({@Foo(1), @Foo(2)})"})
|
||||||
@UnofficialContainer(value = {@Foo(value = 1), @Foo(value = 2)})
|
@UnofficialContainer({@Foo(1), @Foo(2)})
|
||||||
class UnofficialContainerBasicTest {
|
class UnofficialContainerBasicTest {
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
|
@ -71,9 +71,9 @@ class UnofficialContainerBasicTest {
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialContainer.class,
|
value = UnofficialContainer.class,
|
||||||
getAnnotation = "@UnofficialContainer(value={@Foo(value=1), @Foo(value=2)})",
|
getAnnotation = "@UnofficialContainer({@Foo(1), @Foo(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialContainer(value={@Foo(value=1), @Foo(value=2)})"})
|
getAnnotationsByType = {"@UnofficialContainer({@Foo(1), @Foo(2)})"})
|
||||||
@UnofficialContainer(value = {@Foo(value = 1), @Foo(value = 2)})
|
@UnofficialContainer({@Foo(1), @Foo(2)})
|
||||||
int testField = 0;
|
int testField = 0;
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
|
@ -92,8 +92,8 @@ class UnofficialContainerBasicTest {
|
||||||
})
|
})
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialContainer.class,
|
value = UnofficialContainer.class,
|
||||||
getAnnotation = "@UnofficialContainer(value={@Foo(value=1), @Foo(value=2)})",
|
getAnnotation = "@UnofficialContainer({@Foo(1), @Foo(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialContainer(value={@Foo(value=1), @Foo(value=2)})"})
|
getAnnotationsByType = {"@UnofficialContainer({@Foo(1), @Foo(2)})"})
|
||||||
@UnofficialContainer(value = {@Foo(value = 1), @Foo(value = 2)})
|
@UnofficialContainer({@Foo(1), @Foo(2)})
|
||||||
void testMethod() {}
|
void testMethod() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
* UnofficialContainerInheritedTest.java
|
* UnofficialContainerInheritedTest.java
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@UnofficialInheritedContainer(value = {@FooInherited(value = 1),@FooInherited(value = 2)})
|
@UnofficialInheritedContainer({@FooInherited(1),@FooInherited(2)})
|
||||||
class F {}
|
class F {}
|
||||||
|
|
||||||
@ExpectedBase(
|
@ExpectedBase(
|
||||||
|
@ -54,7 +54,7 @@ class F {}
|
||||||
@ExpectedContainer(
|
@ExpectedContainer(
|
||||||
value = UnofficialInheritedContainer.class,
|
value = UnofficialInheritedContainer.class,
|
||||||
getAnnotation = "@UnofficialInheritedContainer("
|
getAnnotation = "@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})",
|
+ "{@FooInherited(1), @FooInherited(2)})",
|
||||||
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
getAnnotationsByType = {"@UnofficialInheritedContainer("
|
||||||
+ "value={@FooInherited(value=1), @FooInherited(value=2)})"})
|
+ "{@FooInherited(1), @FooInherited(2)})"})
|
||||||
class UnofficialContainerInheritedTest extends F {}
|
class UnofficialContainerInheritedTest extends F {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -128,16 +128,16 @@ public class ElementStructureTest {
|
||||||
(byte) 0xB7, (byte) 0x52, (byte) 0x0F, (byte) 0x68
|
(byte) 0xB7, (byte) 0x52, (byte) 0x0F, (byte) 0x68
|
||||||
};
|
};
|
||||||
static final byte[] hash7 = new byte[] {
|
static final byte[] hash7 = new byte[] {
|
||||||
(byte) 0x6B, (byte) 0xA2, (byte) 0xE9, (byte) 0x8E,
|
(byte) 0x3C, (byte) 0x03, (byte) 0xEA, (byte) 0x4A,
|
||||||
(byte) 0xE1, (byte) 0x8E, (byte) 0x60, (byte) 0xBE,
|
(byte) 0x62, (byte) 0xD2, (byte) 0x18, (byte) 0xE5,
|
||||||
(byte) 0x54, (byte) 0xC4, (byte) 0x33, (byte) 0x3E,
|
(byte) 0xA5, (byte) 0xC2, (byte) 0xB7, (byte) 0x85,
|
||||||
(byte) 0x0C, (byte) 0x2D, (byte) 0x3A, (byte) 0x7C
|
(byte) 0x90, (byte) 0xFA, (byte) 0x98, (byte) 0xCD
|
||||||
};
|
};
|
||||||
static final byte[] hash8 = new byte[] {
|
static final byte[] hash8 = new byte[] {
|
||||||
(byte) 0x44, (byte) 0x77, (byte) 0x6E, (byte) 0x52,
|
(byte) 0x0B, (byte) 0xEB, (byte) 0x16, (byte) 0xF5,
|
||||||
(byte) 0x2B, (byte) 0x16, (byte) 0xD3, (byte) 0x3C,
|
(byte) 0x7F, (byte) 0xB0, (byte) 0x18, (byte) 0xF1,
|
||||||
(byte) 0x78, (byte) 0x75, (byte) 0xF5, (byte) 0x0A,
|
(byte) 0x78, (byte) 0x11, (byte) 0xED, (byte) 0x30,
|
||||||
(byte) 0x01, (byte) 0x24, (byte) 0xBD, (byte) 0x2A
|
(byte) 0x19, (byte) 0x4D, (byte) 0xDE, (byte) 0x8A
|
||||||
};
|
};
|
||||||
|
|
||||||
final static Map<String, byte[]> version2Hash = new HashMap<>();
|
final static Map<String, byte[]> version2Hash = new HashMap<>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue