instanceof in CNI

Per Bothner
Sat Mar 25 21:05:00 GMT 2000

Tom Tromey <> writes:

> Lately I've been thinking gcjh could generate a per-class inline
> function named something like "$class"; I got this idea because
> apparently javac generates an internal function named "class$" to
> implement the ".class" notation.

The compiler generates a static field the the actuall
Class object.  If we picked a good name for this,
we could have gcjg also emit it.

class java::lang::String : public java::lang::Object
  java::lang::Class $class;

Then you'd just reference String::$class .
	--Per Bothner

More information about the Java mailing list