-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim,

Tim Lucia wrote:
> If you have an instance, then of course you have a this and of course you
> can call getClass().  If you haven't got an instance, you can't call
> getClass().  I.e.,
> 
> public Foo {
> }
> 
> Foo.getClass() -- illegal.

This is never legal, unless you implement your own static Foo.getClass
method, which doesn't make too much sense. The use of a singleton or any
other idiom is irrelevant.

> Foo.class.getResourceAsStream() -- legal
> 
> Presumably the poster above meant "singleton" (private default constructor)
> rather than Static, as classes aren't static.  In this case, you cannot
> instantiate an instance and so you can't have a this pointer.

If the constructor is private, there's still a "this" pointer available.
 I think this is an academic argument anyway, since the OP was
complaining that their InputStream was "blank" (whatever that means)
instead of NULL, which is what one would expect if the file wasn't being
loaded properly.

It's clear that compiling isn't the problem... runtime behavior is what
is not working.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGIpTH9CaO5/Lv0PARAqI3AJ4/SPMT2OUxyot1aRg2LyTgDfL6UACePhgU
O1kidhsnHVXoeTcZjFrTBNA=
=kUWm
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to