Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do you access inner class fields in refleciton?

skidmarksFeb 5 2011 — edited Feb 5 2011
I have:
class Outer {
    class Inner {
        int field;
    }
    Inner inner;
}
I am using reflection for get the field Outer.field and recognize that this is a reference to class Inner. What do I have to do to get inner.field (or anything that looks remotely like this like Inner.field)?

thanks are
This post has been answered by 796440 on Feb 5 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2011
Added on Feb 5 2011
19 comments
3,499 views