sebastian.sickelmann at gmx.de
Sun Nov 13 20:18:33 PST 2011
Hi, i unfortunatly send my previous mail to hs-comp-dev but i think it
should be hs-runtime-dev.
So crossposting hs-comp-dev here to end the thread and move to
I found the a part of the answer by myself. The bytes of the typeArray
are exactly the bytes
after the attribute_length field in RuntimeVisibleAnnotations_attribute
I checked the indices it with the constant-pool and it matches exactly
with my expectations.
The second-part of my question is still unanswered and i hope to get
I want to implement a class that helps me processing the
annotation(type-array), my idea
is to create a annotationKlass class so that i can code something like this:
annotationKlass::cast(typeArrayOop annotationTypeArray) and some
to easiliy work with annotations inside the vm.
Or is there any implementation that does the annotation access-part that
i haven't found yet?
Am 10.11.2011 15:14, schrieb Sebastian Sickelmann:
> i actually explore how i could implement
> "Removing public fields without breaking binary
> compatibility" inside of the vm.
> In  i made an early prototype with annotations and
> class-weaving(changing) at load-time.
> Now i want to shift this prototype to an inside-the-vm implementation.
> The first place i ran into is the verifier. Here i need to return true
> if there is are methods
> annotated with the new AccessorMethod-Annotation (which i made part of
> java/lang in my
> private openjdk clone). Just for completeness: the methods parameters
> and return value must
> fit to the expected field (said in other words "one get and one set
> I tried to hack on Reflection::verify_field_access and added something
> like this to access the
> methods and their annotations. I tried it in various ways (and after
> some errors on my side) i
> get an typeArrayOop/typeArrayKlass which i think i can access the
> annotations. Asking the
> typeArrayKlass for its name/external-name/dimensions answers [B/[B/1
> which seems to be an
> one-dimensional byte-array. Is this the structure of the
> RuntimeVisibleAnnotation described in
> Must i access its byte content and parse it, or have i missed an
> "annotationKlass" impl?
> If i first must implement such a annotationKlass-implementation. Is
> there a good starting for this?
> Some hints to get me working on this again would be fine.
> Kind regards
More information about the hotspot-compiler-dev