Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31699

Re: get a list of classes at runtime

From j4n bur53 <janburse@fastmail.fm>
Newsgroups comp.lang.java.programmer
Subject Re: get a list of classes at runtime
Date 2015-05-13 17:47 +0200
Organization albasani.net
Message-ID <mivrmb$o2d$1@news.albasani.net> (permalink)
References <mivd25$2m28$1@ariadne.rz.tu-clausthal.de>

Show all headers | View raw


Hi,

You can skim the class paths for entries of the
form *.class. A class path is either a directory
or an archive.

If its a directory, you have to recursively traverse
the directory. If its an archive you basically have
to read a zip file and skim its entries.

The most annoying thing is getting the class paths
in the first place.

Bye

Philipp Kraus schrieb:
> Hello,
>
>
> I would like to get a list of all loadable classes, because I create an
> UI which should be list on the user input, which classes are existst
> e.g. the user types ABC and I will get the full class name with
> packages, e.g. package1.subpackage.ABC and package2.ABC
>
>
> I have taken a look into https://github.com/ronmamo/reflections but I
> don't find a call to filter all class names. How I can get the full
> class name list during runtime (all my classes are stored within a Jar
> file and the search should be also add the Java base classes e.g. String)
>
>
> Thanks a lot
>
>
> Phil
>

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

get a list of classes at runtime Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-05-13 14:47 +0200
  Re: get a list of classes at runtime Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-05-13 10:06 -0400
    Re: get a list of classes at runtime Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-05-13 16:14 +0200
      Re: get a list of classes at runtime Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-05-13 11:23 -0400
        Re: get a list of classes at runtime Arne Vajhøj <arne@vajhoej.dk> - 2015-05-17 19:29 -0400
      Re: get a list of classes at runtime Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2015-05-13 22:15 -0500
    Re: get a list of classes at runtime e.d.programmer@gmail.com - 2015-05-13 08:59 -0700
      Re: get a list of classes at runtime Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-05-13 16:05 -0400
        Re: get a list of classes at runtime Martin Gregorie <martin@address-in-sig.invalid> - 2015-05-13 22:43 +0000
  Re: get a list of classes at runtime Joerg Meier <joergmmeier@arcor.de> - 2015-05-13 16:20 +0200
  Re: get a list of classes at runtime j4n bur53 <janburse@fastmail.fm> - 2015-05-13 17:47 +0200
  Re: get a list of classes at runtime Arne Vajhøj <arne@vajhoej.dk> - 2015-05-17 19:09 -0400

csiph-web