8004699: Add type annotation storage to Constructor, Field and Method
Reviewed-by: darcy, dholmes
This commit is contained in:
parent
407aefdc02
commit
6fec53905c
jdk/src/share/classes/java/lang/reflect
@ -66,6 +66,8 @@ public final class Constructor<T> extends Executable {
|
||||
private transient ConstructorRepository genericInfo;
|
||||
private byte[] annotations;
|
||||
private byte[] parameterAnnotations;
|
||||
// This is set by the vm at Constructor creation
|
||||
private byte[] typeAnnotations;
|
||||
|
||||
// Generics infrastructure
|
||||
// Accessor for factory
|
||||
@ -138,6 +140,8 @@ public final class Constructor<T> extends Executable {
|
||||
res.root = this;
|
||||
// Might as well eagerly propagate this if already present
|
||||
res.constructorAccessor = constructorAccessor;
|
||||
|
||||
res.typeAnnotations = typeAnnotations;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,8 @@ class Field extends AccessibleObject implements Member {
|
||||
// currently only two levels deep (i.e., one root Field and
|
||||
// potentially many Field objects pointing to it.)
|
||||
private Field root;
|
||||
// This is set by the vm at Field creation
|
||||
private byte[] typeAnnotations;
|
||||
|
||||
// Generics infrastructure
|
||||
|
||||
@ -144,6 +146,8 @@ class Field extends AccessibleObject implements Member {
|
||||
// Might as well eagerly propagate this if already present
|
||||
res.fieldAccessor = fieldAccessor;
|
||||
res.overrideFieldAccessor = overrideFieldAccessor;
|
||||
|
||||
res.typeAnnotations = typeAnnotations;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,8 @@ public final class Method extends Executable {
|
||||
// currently only two levels deep (i.e., one root Method and
|
||||
// potentially many Method objects pointing to it.)
|
||||
private Method root;
|
||||
|
||||
// This is set by the vm at Method creation
|
||||
private byte[] typeAnnotations;
|
||||
|
||||
// Generics infrastructure
|
||||
private String getGenericSignature() {return signature;}
|
||||
@ -150,6 +151,8 @@ public final class Method extends Executable {
|
||||
res.root = this;
|
||||
// Might as well eagerly propagate this if already present
|
||||
res.methodAccessor = methodAccessor;
|
||||
|
||||
res.typeAnnotations = typeAnnotations;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user