|Literature about reflection Daniel.Vogelheim@post.rwth-aachen.de (Daniel Vogelheim) (1999-09-10)|
|Re: Literature about reflection email@example.com (Eric Marsden) (1999-09-11)|
|Re: Literature about reflection Daniel.Vogelheim@post.rwth-aachen.de (Daniel Vogelheim) (1999-09-20)|
|Re: Literature about reflection firstname.lastname@example.org (Eric Marsden) (1999-09-24)|
|From:||Daniel Vogelheim <Daniel.Vogelheim@post.rwth-aachen.de>|
|Date:||20 Sep 1999 12:01:15 -0400|
|Organization:||Aachen University of Technology (RWTH)|
Hello Eric and group,
> dv> I'm looking for literature about reflection (as in: Java 1.1
> dv> reflection API). Something that concisely explains what it is
> dv> and informs about alternatives and different approaches to the
> dv> problem.
>You can start with , and a number of the articles at . [...]
>You could also do a literature search for "metaobject protocol" [...]
>The literature on open languages/compilers is relevant too.
Thank you. Those references were exactly what I needed.
>the Java "Reflection" API only allows introspection (the metalevel
>observes the state and behaviour of the baselevel), which is only one
>side of reflection, the other being intercession (the metalevel
>controls the state/behaviour of the baselevel).
I don't understand. The way I understand the literature you pointed me
at, reflection capabilities can be categorized as follows:
1) The baselevel gets read only access to the metalevel. This means,
the base level can find out about it's own structure and state. E.g.,
an object can enumerate it's own member variables, and possibly print
2) The base gets access to the metalevel, which can observe and change
the baselevel. E.g., the program can find out about the variables of
another object and change their values through the metalevel. It could
also find the constructors for a class, call them, and thereby create
new baselevel objects through the metalevel.
3) The baselevel gets full access to the metalevel and can change the
metalevel. This means, a program could create new classes, or change
the meaning of e.g. inheritance or member variable access.
I thought the Java Reflection API provides 1) and 2). 3) is not
directly supported in Java, but could be implemented through dynamic
class loaders that change the JVM Bytecodes at run time. Your comment
seems to say Java can only do 1). What is right?
Return to the
Search the comp.compilers archives again.