Accessing protected fields

90 views
Skip to first unread message

Maciej Biłas

unread,
Apr 8, 2011, 7:24:09 PM4/8/11
to reflecta...@googlegroups.com
Hey,

I'm trying out ReflectASM. From what I found it's not possible to
access protected fields. Is it technically possible to change this
behaviour? I'd gladly do it myself, but before diving into it I'd
rather consult someone with more experience in the JVM bytecodes.

Many thanks for the great library!

Best wishes,
Maciej
--
Maciej Biłas

Nate

unread,
Apr 9, 2011, 3:24:04 AM4/9/11
to reflecta...@googlegroups.com
Hi Maciej,

ReflectASM can access default access and protected methods in some cases. See this issue:
http://code.google.com/p/kryo/issues/detail?id=25
This is the SVN checkin which added the feature:
http://code.google.com/p/reflectasm/source/detail?r=14

Basically, it works if "setAccessible" can succeed. If you are running with restricted permissions (eg, an unsinged applet) then it will not work. AFAIK, there is no workaround.

-Nate



--
You received this message because you are subscribed to the "reflectasm-users" group.
http://groups.google.com/group/reflectasm-users

Reply all
Reply to author
Forward
0 new messages