Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Class from IClassFile
Class from IClassFile [message #140416] Mon, 09 February 2004 11:20 Go to next message
Eclipse UserFriend
Originally posted by: lists.thisremove.luebken.com

Hi

how do I get the Java Class from an IClassFile ?

I want to examine some Classes from a Jar. Now I got the IClassFile for
each class but I need to load the corresponding class to get thy bytecode.


Thanks
Matt
Re: Class from IClassFile [message #140423 is a reply to message #140416] Mon, 09 February 2004 11:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olivier_thomann.ca.ibm.comNOSPAM

Le Mon, 09 Feb 2004 17:20:42 +0100, matthias
<lists@thisremove.luebken.com> a écrit :
>I want to examine some Classes from a Jar. Now I got the IClassFile for
>each class but I need to load the corresponding class to get thy bytecode.
You should not need it.
Have a look at:

org.eclipse.jdt.core.ToolFactory.createDefaultClassFileReade r(IClassFile
classfile, int decodingFlag)
Set the decoding flag to
org.eclipse.jdt.core.util.IClassFileReader.ALL.

Then you can get each IMethodInfo -> getCodeAttribute() ->
getBytecodes().

HTH,
--
Olivier
Re: Class from IClassFile [message #140431 is a reply to message #140416] Mon, 09 February 2004 11:28 Go to previous message
Eclipse UserFriend
See ToolFactory.createDefaultClassFileReader(IClassFile, int)

Jerome

"matthias" <lists@thisremove.luebken.com> wrote in message
news:c08brv$hbh$1@eclipse.org...
> Hi
>
> how do I get the Java Class from an IClassFile ?
>
> I want to examine some Classes from a Jar. Now I got the IClassFile for
> each class but I need to load the corresponding class to get thy bytecode.
>
>
> Thanks
> Matt
Previous Topic:How to uninstall a plugin?
Next Topic:Line wrapping?
Goto Forum:
  


Current Time: Sun Jun 08 06:41:20 EDT 2025

Powered by FUDForum. Page generated in 0.02975 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top