Tom Tromey wrote:
>>>>>> "Andrew" == Andrew Haley <[EMAIL PROTECTED]> writes:
>
> Andrew> Yes, but gcj's implementation was also broken.  This is the
> Andrew> current gcj code; please let me know if you think it's still
> Andrew> wrong.
>
> I think looking for a "$" in general is wrong.  I think instead the
> name should be looked up in the InnerClasses attribute.  AFAIK that's
> the only guaranteed-reliable way to do this.

I don't understand where you think the problem lies.  As far as I can
see the form of a name is guaranteed, and therefore using '$' is OK.


"Class.getName():

"If this class object represents a reference type that is not an array
type then the binary name of the class is returned"


# The binary name of a top-level type is its canonical name (§6.7).

# The binary name of a member type consists of the binary name of its
  immediately enclosing type, followed by $, followed by the simple
  name of the member.

# The binary name of a local class (§14.3) consists of the binary name
  of its immediately enclosing type, followed by $, followed by a
  non-empty sequence of digits, followed by the simple name of the
  local class.

# The binary name of an anonymous class (§15.9.5) consists of the
  binary name of its immediately enclosing type, followed by $,
  followed by a non-empty sequence of digits.


Andrew.


Reply via email to