info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java question?


From: Noel Yap
Subject: Re: java question?
Date: Fri, 5 Jul 2002 05:04:54 -0700 (PDT)

--- pootle monster <address@hidden> wrote:
> 
> This is really a java question not a CVS one
> 
> I use CVS for my java tree with each class haveing a
> public String that is 
> updated for each version.
> (This all works fine)

I hope it's static final as well.

> But when I use an application I want to be able to
> get the version of each 
> of the classes I use.
> So Ideally I would build up a set of classes used in
> the application (and 
> the classes that those classes use, etc, etc)
> as I did this I would filter for things that start
> with my class hierarchy.

Hopefully, you're using a separate package name which
would make this part easier.

> and I would save the public String of each class
> that stores the version.
> Then heypresto I would have a list of all the
> classes of mine that are used 
> and their version numbers.

I'm not sure, but you might be able to use the
ClassLoader and reflection to achieve this although I
suppose you'll want this info before run-time.  OTOH,
in order to build a set of classes used by the
application (and not have any false negatives), using
the ClassLoader will give you exactly that set.

> I do know that you can 'tag' an application with a
> global version number 
> (for the whole application), but I dont want to do
> this as I have loads of 
> classes and each are being updated individually,
> which I will want each 
> application to use.
> Also I dont want to update all the applications that
> use a util class when 
> that gets updated.

>From experience, if you do it the way you want, you'll
have to contend with a lot of version-to-version
dependency issues (eg which versions of class X will
work with which versions of class Y?).  It's much
easier to deal with these issues from a larger-grained
perspective (eg which versions of
component/package/module X will work with which
versions of component/package/module Y).

IMHO, tagging is the way to go.

HTH,
Noel


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]