Using Reflection can we find out details of inner classes in a class

Hello All,
Thanx in advance.
I intend to figure out the name of the inner class and methods declared inside it. How can this be done using reflection API's.
I need the above information to make an automated java doc creation tool for the project I am working in.
Thanx again...
VIkas

Thanx silkm,
Actually suggestion # 1 I have already tried. I used
getClasses() method which returned me a Class[] of
length = 0. i dunno Why?Because you are not using the reflection API correctly. If you read the javadocs you would know that it is structured so that all getXXX() methods return all XXX things that are public and are either declared by the target class or possibly inherited from superclasses.
As contrasted to that, getDeclaredXXX() methods can return all XXX things (including private) but only declared by the target class (not inherited).
You got an empty result back in your case most likely because all your nested/inner classes were non-public. Use getDeclaredClasses() instead.
As to suggestion # 2, the exercise I am doing is a
step before using the java doc tool. One has to insert
a javadoc comment before the method begins in order to
create a java doc. So thats it.This is independent of the reflection API but you might consider using the doclet API for this.

Similar Messages

  • Can you find out what packages a class has imported?

    Hi all, I start my final year at uni in september and at the moment i'm just experimenting with stuff while i try and decide what to do for my final year project.
    Without going into too much detail what i want to be able to do is for the client to "submit" a class file that is then dynamically loaded and run on the server. Obviously this has security implications so what i was wondering was if it is possible to determine what packages a class has imported from the actual classfile.
    I've looked through the vm spec but haven't been able to find anything theyre that looks like it'll help. Any suggestions or ideas (or solutions!) would be much appreciated.
    Thanks. Matt.

    You could use the Class.getDeclaredClasses() to see the class types that exist as members, but that won't do you any good since the class will have already undergone static initialization within your VM, and the security breach would have already been made. You could inspect the constant pool in the class data to check what other classes are referenced but then that brings up several questions:
    1 - How do you know which classes are bad? Even if you define a set, copies can be created in new packages (or simply aliased) so that the list is invalid.
    2 - How do you know the class you are loading is not malicious? A client class may not reference any external class but may be malicious itself.
    3 - The offending class might use reflection exclusively to reference classes without leaving a trace in the class file. This would be absolutely impossible to detect.
    Your only choices are (a) to use signed classes, and make it the responsibility of someone to review the classes and sign them, or (b) install your own Security Manager to catch all prohibited activity, or (c) check as classes are referenced in the classloader. Option (a) is the best method, but (b) or (c) might work in a very restricted environment.

  • How can I find out who has had unauthorised access to my iCloud account

    I have received an email to say that someone has accessed my iCloud account.  How can I find out details of who has done this ?

    You can't.  All you can do is change the password to deny future access.
    Are you sure the email is legitimate?  There have been numerous reports recently of forged emails like this trying to get people to click a link and disclose thier iCloud credentials.  Be sure you don't do this.  If you want to change your password, go to Apple's site here: https://iforgot.apple.com/password/verify/appleid?app_type=ext&app_id=93&languag e=AU-EN.

  • HT201407 how can i find out the carrier of my iphone?

    i bought this  iphone 3gs  but when i try to activate it. i tells me this iphone is not  supported with the carrier you are trying to use/ how can i find out  the carrier because when i bought it was saying unlocked. thanks

    The SIM has a carrier ID on it.  Too, you can try:  www.iphoneox.com.

  • Is there a way to find out details about, who approved the RMA on system using front end or back end?

    Is there a way to find out details about, who approved the RMA on system using front end or back end?

    But is there a way (simple or not-so-simple) to find
    out EVERY SINGLE FILE that's referenced on a
    timeline? (I have lots of stuff imported into the
    project that I know isn't used on any timeline, but
    I'm afraid of moving or deleting things for fear of
    never finding it again.)
    I'd love to get some sort of "printout" (a list or
    something) of every single file.
    There is, go to browser and cntrl click on any one of the columns,
    and select - show/source. A new column named "source" will pop up and will show where everything "lives". Click on the header at the top and it will justify the column as well. You'll notice this won't show anything for your seq.'s. of course, but will show stills/audio/motion files...
    Once you have the new column, you can drag it next to the "name" column and get a grab of it and print it if you like, or whatever.
    If you want to do this for just 1 seq., then can create a new bin and double click it to open it. Cntrl-A (select all) in your main seq. and just drag all into the new bin. You will see only what's in that seq. with the "source" column right next to it.
    From what I've read, you seem to get the MM thing and it's obviously what you'll need to do to archive as the guys said. But what your missing is a file path system to where everything resides.
    Hope this helps and that I've read you properly,
    Peace
    P-Book 1.5, 17" 2gsRAM   Mac OS X (10.4.4)   FCStudio

  • I have my personal music (not purchased from Itunes) stored in two locations, on my PC and on an external HD. How can I find out which directory itunes uses to access this music? I am using Itunes version 11.4.0.18. Thanks

    I have my personal music (not purchased from Itunes) stored in two locations, on my PC and on an external HD. How can I find out which directory itunes uses to access this music? I am using Itunes version 11.4.0.18. Thanks

    Many thanks JEM24 for your help.  Ive just spent the best part of six hundred pounds on a new Sony Rx100m2 compact camera, so I have no interest in the Ipods camera at all really. I doubt Ill be watching many videos on it as Im very lucky in that I have a good Android tablet. Its more as a stock music player that Ill be buying the Ipod for, if indeed I do end up buying one. I dont like the idea of paying the exorbitant amount added for more memory space that Apple along with most other companies charge. In fact I read an article on this very subject just yesterday in the tech section of Flipboard. It stated in the article that in the case of the Iphone  the actual cost of each additional  gigabyte of storage  to Apple et al is something in the order of 60p.. This is certainly not reflected in the price us the customer has to pay at the till.. Its for this reason primarily that Apple in particular, because their products do not allow adding expandable memory of your own in the form of cheap to buy cards, that nobody in their right mind buys the 64gig etc Iphones..I am aware that we are discussing my potential purchase of an Ipod Touch here but you see my point. Many thanks again though for helping me.

  • How can i find out what app is using data at 5am

    i have used an unusual amount of data this month.  something on my phone is using data at 5am every morning.  its not me.  how can i find out what it is?

    The times reported for data usage on your bill do not necessarily reflect the time the data was actually used. The system gathers information from the cell sites and reports on a schedule.

  • Today I deleted a gmail account using my computer.  I also added a new work gmail  address.  Now I want to sync my phone and tablet with the new email address.  I've looked all over and can't find  out how to do it.

    Today I deleted a gmail account using my computer.  I also added a new work gmail  address.  Now I want to sync my phone and tablet with the new email address.  I've looked all over and can't find  out how to do it.
    Peg

        Hi there T&P63385!
    Look no further! I have the answer for you! You can add a new email account to your android device by following these steps: http://support.verizonwireless.com/clc/devices/knowledge_base.html?id=31401
    Now I do want to let you know that your phone has a "main" gmail account. If this "main" gmail account was the one you deleted it may be best that you reset your phone and activate it to your new gmail address.
    The reason I recommend doing this is all of your purchased application information is also tied to your gmail.
    Ensure your personal information is backed up (contacts, pictures, etc) and follow these steps to Hard Reset your phone:http://support.verizonwireless.com/clc/devices/knowledge_base.html?id=31308
    Let me know if you have any other questions!
    Thanks,
    MelissaM_VZW
    Follow us on Twitter @vzwsupport

  • How can I find out the screen size of the users moniter using the Acrobat SDK?

    How can I find out the screen size of the users moniter using the Acrobat SDK? I need to know how much sreen real estate that is available on the users moniter. Is there some call that I can make from the SDK to discover the maximun X and Y coordinates?
    Thanks,
    Gregory

    Currently, I am testing on multiple moniters and it is defaulting to the moniter designated as the #1 moniter. For our purposes, this is acceptable. Once the two documents have loaded, the user can move and re-size at will.
    Gregory

  • Where can I find a detailed tutorial on how to use Finder?

    Where can I find a detailed tutorial on how to use Finder?

    Start with this one:
    http://support.apple.com/kb/HT2470?viewlocale=en_US

  • After burning a successful DVD in iDVD out of FCPX, how can I see the settings it used?   So I finally burned a DVD out of a Apple Pro Res file into iDVD in PAL format. My question now is how can I find out what the exact burn properties were so that I ca

    After burning a successful DVD in iDVD out of FCPX, how can I see the settings it used?
    So I finally burned a DVD out of a Apple Pro Res file into iDVD in PAL format. My question now is how can I find out what the exact burn properties were so that I can apply the same burn properties to a project in Compressor 4?
    Is it possible to see what iDVD did?

    I don't know any way you can interrogate iDVD to reveal settings to the extent that you can in a Compressor project. What you could do is open up the show's VOB in MPEG STreamclip, go to File and Reveal Stream Information; that will at least give you some rudimentary info like average bit rate. Perhaps someone, with more iDVD experience, can chime in here.
    The broader question is why use Compressor at all if your current workflow is doing the job to your satisfaction?
    The value of Compressor is that it gives you control over the many parameters that affect size quality.  and playability. The Compressor presets can give you a starting point for DVD delivery, Web, etc. From those presets, people typically experiment by adjusting the parameters until they get the desired results for their specific show. It's a little bit science and a little bit art. After experimenting, you may be able to get slightly better quality for the project you've successfully burned in iDVD by using Compressor and something likeToast…or maybe not.
    Good luck.
    Russ

  • How can one find out how much hard drive space the apps and media are using?

    how can one find out how much hard drive space the apps and media are using?

    See Here  >  Where did my Disk Space go?
    And Here  >  The Storage Display

  • How can i find out who is using my email in iMessage

    How can i find out what devices on my apple id are using my email for imessage?

    On the devices go to Settings>Messages>Send and Receive and look. There is no way of doing that remotely.

  • HT201342 How can I find out if an address is available. I current use bullet12@. I would like to change my address to bullet@

    How can I find out if an address is available. I current use bullet12@. I would like to change my address to bullet@

    The only way to find out is by trying to setup a new iCloud account using the address you want, or creating an email alias in your current account.
    See: http://help.apple.com/icloud/#mm6b1a490a
    It's highly unlikely that such a simple address is still available after over a decade of Apple letting people sign up for @mac.com, @me.com and @icloud.com addresses.

  • How can I find out whitch table are used in whitch document?

    How can I find out whitch table are used in whitch document?
    In the table EUL5_DOCUMENTS are stored the Documents and in the table EUL5_OBJS are stored the tables. How can I query these tables together?
    Are there other possiblities?
    Thanks

    Hi Dierk
    Please take a look at this thread: Re: An EUL query to list out All the Columns  (Fileds) for each Workbook
    I think you may well find what you are looking for in the answer that I gave there.
    Best wishes
    Michael

Maybe you are looking for

  • Error while installing NW '04 SR1

    Hi all, I have installed java 1.4.2_07 and Oracle 9.2. Then when I try to install NW'04 SR1 J2EE installation, I get the following error at phase 2 (of 34) i.e. <i>SAP System Installation</i>::::: <b>ERROR 2005-07-21 18:56:06 FSL-00001  System call f

  • Fulltext search help

    Hi this might be the wrong place to put this question but i need help as i'm a newbie What I want to do if create a full search for my users so they can search my database on fishing locations in the UK, I have set up a database with 1 table and 7 co

  • Reducing file size for transmission to photo store

    I'm using PSE4 under WinXP Home SP2. I want to try out Ritz processing of transmitted photos. My photo file sizes seem to average about 1.3M, which takes an inordinately long time to transmit. I doubt that I need that big a file to get quality 4x6 pr

  • Error Propogation after Dynamic Routing

    Hi All, I'm having difficulty propagating SOAP Faults generated as the result of a dynamic routing call to another Proxy Service. In my Service Error Handler, I can Log the $fault variable. I've even attempted to replace the contents of $body with $f

  • Everytime I try to launch Safari, a window pops up and says Safari quit unexpectedly.  What can I do?

    I was downloading a new font, and suddenly Safari quit.  Now I can't open it, I keep getting a message saying Safari quit unexpectedly.  What can I do?