提交 72449f01 编写于 作者: D darcy

8004699: Add type annotation storage to Constructor, Field and Method

Reviewed-by: darcy, dholmes
Contributed-by: joel.franck@oracle.com
上级 37425784
...@@ -66,6 +66,8 @@ public final class Constructor<T> extends Executable { ...@@ -66,6 +66,8 @@ public final class Constructor<T> extends Executable {
private transient ConstructorRepository genericInfo; private transient ConstructorRepository genericInfo;
private byte[] annotations; private byte[] annotations;
private byte[] parameterAnnotations; private byte[] parameterAnnotations;
// This is set by the vm at Constructor creation
private byte[] typeAnnotations;
// Generics infrastructure // Generics infrastructure
// Accessor for factory // Accessor for factory
...@@ -138,6 +140,8 @@ public final class Constructor<T> extends Executable { ...@@ -138,6 +140,8 @@ public final class Constructor<T> extends Executable {
res.root = this; res.root = this;
// Might as well eagerly propagate this if already present // Might as well eagerly propagate this if already present
res.constructorAccessor = constructorAccessor; res.constructorAccessor = constructorAccessor;
res.typeAnnotations = typeAnnotations;
return res; return res;
} }
......
...@@ -80,6 +80,8 @@ class Field extends AccessibleObject implements Member { ...@@ -80,6 +80,8 @@ class Field extends AccessibleObject implements Member {
// currently only two levels deep (i.e., one root Field and // currently only two levels deep (i.e., one root Field and
// potentially many Field objects pointing to it.) // potentially many Field objects pointing to it.)
private Field root; private Field root;
// This is set by the vm at Field creation
private byte[] typeAnnotations;
// Generics infrastructure // Generics infrastructure
...@@ -144,6 +146,8 @@ class Field extends AccessibleObject implements Member { ...@@ -144,6 +146,8 @@ class Field extends AccessibleObject implements Member {
// Might as well eagerly propagate this if already present // Might as well eagerly propagate this if already present
res.fieldAccessor = fieldAccessor; res.fieldAccessor = fieldAccessor;
res.overrideFieldAccessor = overrideFieldAccessor; res.overrideFieldAccessor = overrideFieldAccessor;
res.typeAnnotations = typeAnnotations;
return res; return res;
} }
......
...@@ -79,7 +79,8 @@ public final class Method extends Executable { ...@@ -79,7 +79,8 @@ public final class Method extends Executable {
// currently only two levels deep (i.e., one root Method and // currently only two levels deep (i.e., one root Method and
// potentially many Method objects pointing to it.) // potentially many Method objects pointing to it.)
private Method root; private Method root;
// This is set by the vm at Method creation
private byte[] typeAnnotations;
// Generics infrastructure // Generics infrastructure
private String getGenericSignature() {return signature;} private String getGenericSignature() {return signature;}
...@@ -150,6 +151,8 @@ public final class Method extends Executable { ...@@ -150,6 +151,8 @@ public final class Method extends Executable {
res.root = this; res.root = this;
// Might as well eagerly propagate this if already present // Might as well eagerly propagate this if already present
res.methodAccessor = methodAccessor; res.methodAccessor = methodAccessor;
res.typeAnnotations = typeAnnotations;
return res; return res;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册