[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kuml-devel
Subject:    Re: Argo sources
From:       Jake Fear <fear1 () home ! com>
Date:       2000-02-21 23:23:29
[Download RAW message or body]

Java provides a feature called introspection (AKA reflection).  It
gives programmers the ability to ask Java objects for their methods,
attributes, constructors, superclasses and implemented interfaces.  Methods and
constructors are also treated as obejcts.  A java.lang.reflect.Method object
has a method called "invoke(Object, Object[] params)" that allows it to be
called, a method that returns the class of the methods return type and some
other "metadata" is provided as well.  Constructors have similar capabilities. 
There also Java's very strong notion of a class, represented by the
java.lang.Class class.  Each class loaded into the JRE has an object (a
singleton) associated with it.  You can ask a class for its name, all of its
methods, all of its constructors many other attributes of the class. All this
is useful for dynamic programming chores, like scripting environments (read
about ECMA script), and is part of the backbone of the JavaBeans component
model.  Beans leverage introspection to "discover" each others event signatures
and development tools use the introspection to allows programmers/integrators
to configure the publicly exposed properties of a bean before it is serialized.
Reading the JavaDoc for java.lang.Class and the classes in the
java.lang.reflect package should give you great insight into Java's
introspection/reflection abilities.

On Mon, 21 Feb 2000, you wrote:
> Jake Fear wrote:
>  
> > I have been looking over the argo sources, and the prospect of doing a Java
> > rewrite is probably going to give me nightmares.  There is (limited) use of the
> > Java introspection APIs, and some other issues that make this a daunting task.
> 
> I don't know what is the meaning of 'introspection' : could you give me
> a hint about it ?
> 
> > I am not suggesting we abandon the idea, I just want to know exactly what
> > everyone thinks it will buy us.
> 
> I don't know enough about the subjects we are discussing about, but I
> have the strange feeling that there are many things to borrow from
> ArgoUML, and among them, their file formats.
> 
> > I still need to study the model for Argo to
> > understand the model implemented by the sources, but regardless of that I
> > suspect that we can find a way to reep the same benifites without hand
> > converting thousands of lines of generated Java code.
> > 1.) Does Argo use XML/XMI data formats in memory or just for persistent store?
> > 2.) Has anyone experimented with any C++ XML libraries?  I know there are
> > several, but I have no direct XML experience.
> 
> So do I, no direct experience. As argoUml uses xml4java, I made a few
> searches and I found several libs concerning XML. I tried to download
> xml4c from alphaworks.ibm.com, but because of a very low bandwith, I had
> to give up. I also noticed that gnome project has a few things related
> to XML, but don't know more. It seems that KOffice will make some use of
> XML (if not using it as its main standard).
> 
> So, to conclude, I have to be very humble on that subject because of my
> lack of knowledge, so I can't tell what way is the right one, but be
> sure I'll actively follow.
-- 
Jake Fear

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic