[jdom-interest] How about a general purpose Object reference?

Ken Rune Helland kenh at csc.no
Mon Oct 9 03:29:31 PDT 2000


Hello, Im quite new to JDOM but it looks great.

My question is: I'd like to add temporary 
information to objects in a JDOM document
tree (for exsample locking information), so I tought
it woud be neat if the Document, Element and so
fort classes had a general purpose Object
reference for use by application programmers
wich woud be ignored by JDOM itself.

Someting like :

protected Object gpObjectRef;

public Object getGpObjectRef()
{
 return gpObjectRef;
}


public void setGpObjectRef(Object object)
{
  gpObjectRef = object;
}  

or just:

public Object gpObjectRef


coud be added to the Document class, Element class and so fort.


Is there any compelling reasons not to do this? 

I can see it will dirty up the api somewhat but
it woud be wery flexible.


Best Regards
Ken Rune Helland




More information about the jdom-interest mailing list