Dump a Java class’s inheritance hierarchy

Recently I had the need to introspect a Java class for it’s inheritance hierarchy and didn’t have access to JavaDocs for the class. I used this simple ColdFusion code to loop through the hierarchy using getSuperClass method. Perhaps others will find this helpful.

#cls.getName()#

2 Responses to “Dump a Java class’s inheritance hierarchy”

  1. Paul Kenney says:

    I wrote a UDF some time ago that gives the complete metadata for a given Java object. It is called “getJavaMetadata” and can be found on cflib.org: http://www.cflib.org/udf.cfm?ID=1076

  2. Sam says:

    Nice UDF, but maybe a little bit of overkill if you just need some of the information. :-)

Leave a Reply