Getting Java Class objects, and JSS
john at synchromesh.com
Wed Jul 8 11:42:22 UTC 2015
Thanks for pointing out getClass(), I should've thought of that myself...
And thanks for the JSS information, I'll have a look into that.
On 8 July 2015 at 08:27, Mark Evenson <evenson at panix.com> wrote:
> > On 07 Jul 2015, at 22:24, John Pallister <john at synchromesh.com> wrote:
> > Some of the tutorials have code like:
> > context.addServlet(HelloServlet.class, "/");
> > Is it possible to get Class objects for Java classes I've made with
> JNEW-RUNTIME-CLASS (or indeed for any other Java class)?
> Since all Java references to non-primitive types descend from
> one may always get a reference to the class object by [calling the
> > I've been using "raw" JCLASS & JMETHOD etc. calls to experience just how
> > painful that really is, but I'm apprehensive about using JSS and paying
> > runtime dynamic dispatch penalty, given that on GAE time is money.
> > more like a SLIME plug-in that looked up & cached classes, methods &
> fields at
> > editing time (perhaps also parsing Java expressions) and generated
> > typed" code would be nice (possibly using code from e.g. JDEE and/or
> CEDET) -
> > has anyone else thought about this?
> I wouldn’t necessarily be afraid of the “penalty" for using JSS, or at
> least, I
> might benchmark the difference in performance before shying away from JSS
> the outset.
> JSS [already creates a cache of all classes that on the classpath].
> JSS:JAVA-CLASS-METHOD-NAMES provides a listing of all methods of a class,
> is not currently cached, but could be. Extending this to java fields
> would be
> useful. I would welcome patches to JSS which extends these introspection
> facilities as the basis for the tooling you wish to build.
> : http://abcl.org/trac/browser/trunk/abcl/contrib/jss/invoke.lisp#L299
> : http://abcl.org/trac/browser/trunk/abcl/contrib/jss/invoke.lisp#L469
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the armedbear-devel