commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: Newbie: Digester "clazz" ???
Date Thu, 02 Jan 2003 13:28:58 GMT

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,


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:   <>
> For additional commands, e-mail: <>

View raw message