Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
TryCF Gist
* returns an array with the class hierarchy of the object
function getClassHierarchy(object){
var hierarchy = [];
var class = object.getClass();
while (!isNull(class)){
class = class.getSuperClass();
return hierarchy;
hierarchy = getClassHierarchy(getPageContext());
numClasses = hierarchy.len();
for (i=numClasses; i>0; i--){
class = hierarchy[i];
writeOutput('<div style="padding-left: #numClasses - i#em; #class == 'javax.servlet.jsp.PageContext' ? 'font-weight: bold;' : ''#">#class#</div>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment