tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22867] - Tag handlers can't be inner/nested classes
Date Thu, 11 Sep 2003 00:04:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22867

Tag handlers can't be inner/nested classes





------- Additional Comments From kin-man.chung@sun.com  2003-09-11 00:04 -------
Yeah, I also prefer binary names ("outter$inner") instead of canonical names
("outter.inner").  However, the J2EE folks still have not made a offical
decision yet.

There is simple algirithm that can let one compute the canonical name from a
Class object, without the restriction that the top-level class name not
continaing '$'.  The following is based on an algorithm by Mark Roth, the JSP
spec lead:

String getCanonicalName(Class c) {

    Class outer = c.getDeclaringClass(c);
    if (outer == null) {
        return c.getName();
    } else {
        String innerName = c.getName().substring(outer.getName().length()+1);
        return getCanonicalName(outer) + "." + innerName; 
    }
}

This is slightly more compilicated than replacing '$' with '.', but it covers
all cases.

Mime
View raw message