Re: Project reflection

From: Robert Olofsson (d94-rol_at_tjatte.nada.kth.se)
Date: 12/17/03

  • Next message: Gandu: "PLEASE HELP!! Very odd Castor problem"
    Date: Wed, 17 Dec 2003 22:06:05 +0000 (UTC)
    
    

    In comp.lang.java.programmer Shirley <sjung_99@yahoo.com> wrote:
    : How would you get package and class names given the project name as a
    : String? For example, given a project name I need to be able to get
    : all it's contained packages and classes.

    You can not get all contained packages and classes, you can get a
    good approximation if you dont care about strange class loaders.

    For a good approximation:
    Look up the classpath, check all directories and jar/zip files in it.
      For each directory: check if you have any *.class files in it, go down
        in every directory and start over.
      For each jar/zip file: open it and check what files it contains,
        files that are called *.class are good candiates

    You will have to filter out inner classes and such things...

    If you have a project that uses an URL class loader (loads the class
    from the internet, then this will not work, you will not be able to
    search the internet) or a Random class loader (generates a class from
    a ranom number generator (I have not seen this, but in principle it
    could come upt))....

    /robo


  • Next message: Gandu: "PLEASE HELP!! Very odd Castor problem"

    Relevant Pages

    • Re: Project reflection
      ... all it's contained packages and classes. ... check all directories and jar/zip files in it. ... If you have a project that uses an URL class loader (loads the class ... search the internet) or a Random class loader (generates a class from ...
      (comp.lang.java.help)
    • Re: Project reflection
      ... all it's contained packages and classes. ... check all directories and jar/zip files in it. ... If you have a project that uses an URL class loader (loads the class ... search the internet) or a Random class loader (generates a class from ...
      (comp.lang.java.programmer)
    • SuSE Security Announcement: sendmail (SuSE-SA:2003:013)
      ... versions of sendmail that come with SuSE products. ... detail and the wide distribution of sendmail in the internet causes this ... vulnerability to be considered an error of major severity. ... the update packages as offered at the locations as listed below. ...
      (Bugtraq)
    • [Full-Disclosure] SuSE Security Announcement: sendmail (SuSE-SA:2003:013)
      ... versions of sendmail that come with SuSE products. ... detail and the wide distribution of sendmail in the internet causes this ... vulnerability to be considered an error of major severity. ... the update packages as offered at the locations as listed below. ...
      (Full-Disclosure)
    • Re: Newbie Warnng! : Fedora Core Offline Updates
      ... We are investigating Fedora Core right now and one of the concerns is that the FC system will not be connected (or allowed to connect to the internet). ... All updates will have to be done offline. ... I haven't used rsync and perhaps it does this automatically, but you can also use wget with a list of packages that you have installed, set to only update files that have changed. ...
      (Fedora)