Re: Extracting class data from a jar



On Mon, 23 Oct 2006 20:01:10 +0000, Ian Shef wrote:

Tony Burrows <tony@xxxxxxxxxxxxxxx> wrote in
news:pan.2006.10.22.14.31.47.791436@xxxxxxxxxxxxxxx:

I'm building an app which lets users drag and drop classes into a tree,
followed by code generation. For this, I need to have (a) a list of all
the classes which can be dragged and (b) for each class, which of the
others can be a parent in the tree.

All the relevant classes are in a jar file (j3dcore.jar) as well as
other abstract classes and there is standard generated documentation.

Any idea how I could extract the relevant data? Hand coding it would be
just too much.

Tony


I will have to make some assumptions here, because you:
Didn't describe what this tree represents.
Didn't describe what the parent/child relationship is in the tree.
Didn't describe what is in the jar file.
Didn't describe what "relevant data" means to you.

Thanks for that, though I finally got as far as using the JarFile class
yesterday.

I was trying to keep things as simple as possible in my query, wrongly.

The actual classes are Java3D ones to build a representation of a J3D
scenegraph, which is a tree (later I'll generate the matching code). The
main classes are all in j3dcore.jar, plus a couple of utility classes.
Other do exist but can't be connected to the scenegraph.

In fact, the classes descend from one of four parents, Group, Leaf,
NodeComponent or unspecified. Leaf nodes can be added to Group nodes so
once I extract the two types I can control what can be dropped where.
NodeComponent nodes can only be dropped on leaf nodes, with 1 exception,
but not all node components on all leaf nodes! The unspecified are
similar. What I've managed is to extract the nodes, but then manually had
to adjust which node components and unspecified objects can be added to
the other nodes, and the numbers allowed (that varies too).

I was trying to avoid the labour of hand coding it all, since the API is
still evolving, but I think it will have to be a blend of the two.

Tony
.



Relevant Pages

  • Re: Would it matter if ZF was inconsistent?
    ... the infinite cartesian product to define the infinite case. ... a tree of level n. ... your leaf nodes are not leaf ... nodes of the complete binary tree but rather of certain ...
    (sci.logic)
  • Re: Would it matter if ZF was inconsistent?
    ... the infinite cartesian product to define the infinite case. ... at level n in the binary tree, ... we will call *leaf nodes* ... Extending the definitions to the transfinite, ...
    (sci.logic)
  • Re: infinity
    ... >>> if one were to consider an unending tree, each path through it would be ... >>> unending, so there would be some infinite number of branches, but there ... >>> would also be zero leaf nodes. ... >> root node corresponds to the digital point. ...
    (sci.math)
  • Re: ** says: Definition: sum{i in N} i = 0
    ... have leaf nodes must apply to paths not having leaf nodes also. ... Does WM deny that for every finite binary tree in which all paths are of ... when the tree becomes infinite, ...
    (sci.math)
  • Extracting class data from a jar
    ... I'm building an app which lets users drag and drop classes into a tree, ... followed by code generation. ... All the relevant classes are in a jar file as well as ...
    (comp.lang.java)