Inner classes are defined as an attribute of the java class. So
JavaClass.getAttributes returns an array of Attributes, one of which is of
type InnerClasses. Casting to that will allow you to see what classes are
inner classes (anonymous or not).
----- Original Message -----
From: "Pico Florin" <[EMAIL PROTECTED]>
To: <bcel-user@jakarta.apache.org>
Sent: Thursday, March 02, 2006 10:21 AM
Subject: Get InnerClass and AnonymousClass fusing BCEL API
Hi!
I'm new in BCEL. I've just tested your API and I want to ask you this:
1.how can I obtain the Inner Classes and Anonymous as JavaClass class in
order to treat them like this(i.e. to see what are their fields, methods
etc). To be more specific, I want to have the same functionality like the
method getDeclaredClasses() from the java.lang.Class. Is this possible
with your API?
2. It is possible with your API to obtain the anonymous class defined
in a code like this(the method mentioned above getDeclaredClasses doesn't
report it)
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
Thank you in advance,
Florin
---------------------------------
Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with
voicemail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]