commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Miller" ...@howardmiller.co.uk>
Subject Re: Newbie: Digester "clazz" ???
Date Thu, 02 Jan 2003 15:59:20 GMT
Thanks!

It occurred to me after posting the question (in the supermarket in 
fact), that it was a *really* stupid question! I see what the .class is for 
now. I just hadn't come across it before.

HM

On 2 Jan 2003 at 8:28, Henri Yandell wrote:

> 
> It's a feature of Java. You can specify the java.lang.Class object for a
> class as a literal:  java.lang.String.class  or
> org.apache.log4j.Log.class etc. These are then automatically turned into
> the Class object [as found through getClass() on an object of that class].
> 
> As 'class' is a reserved word, people often use 'clss' or 'clazz' as a
> variable name for it.
> 
> My apologies if I've not understood the question,
> 
> Hen
> 
> On Thu, 2 Jan 2003, Howard Miller wrote:
> 
> > Hi,
> >
> > Sorry this is going to be a stupid newbie question....
> >
> > In the Javadocs for the Digester components, a number of the rule
> > setting methods have parameters in the form "java.lang.Class
> > clazz". This has got me worried, as I don't understand what is going
> > on here. My expectation is that if the rule just created a new object it
> > would be "java.lang.Object object", so I have obviously failed to
> > understand something. What are the ZZs all about?
> >
> > Furthermore an example I found the The O'Reilly site used this
> > method with a (actual) parameter looking like "Catalog.class", I
> > haven't seen the ".class" method used before, and I'm not that new
> > to Java!!
> >
> > What's going on here? Help appreciated.
> >
> > Howard Miller
> >
> > --
> > To unsubscribe, e-mail:   <mailto:commons-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:commons-user-help@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-user-help@jakarta.apache.org>
> 
> 



Mime
View raw message