@ Override public void visitClassContext ( ClassContext clsContext ) { try { JavaClass cls = clsContext . getJavaClass ( ) ; String superName = cls . getSuperclassName ( ) ; if ( ! Values . DOTTED_JAVA_LANG_OBJECT . equals ( superName ) ) { this . classContext = clsContext ; superclassCode = new HashMap <> ( ) ; JavaClass superCls = cls . getSuperClass ( ) ; childPoolGen = new ConstantPoolGen ( cls . getConstantPool ( ) ) ; parentPoolGen = new ConstantPoolGen ( superCls . getConstantPool ( ) ) ; Method [ ] methods = superCls . getMethods ( ) ; for ( Method m : methods ) { String methodName = m . getName ( ) ; if ( m . isPublic ( ) && ! m . isAbstract ( ) && ! m . isSynthetic ( ) && ! Values . CONSTRUCTOR . equals ( methodName ) && ! Values . STATIC_INITIALIZER . equals ( methodName ) ) { String methodInfo = methodName + ' ' + m . getSignature ( ) ; superclassCode . put ( methodInfo , new CodeInfo ( m . getCode ( ) , m . getAccessFlags ( ) ) ) ; } } cls . accept ( this ) ; } } catch ( ClassNotFoundException cnfe ) { bugReporter . reportMissingClass ( cnfe ) ; } finally { superclassCode = null ; this . classContext = null ; childPoolGen = null ; parentPoolGen = null ; } }
overrides the visitor to accept classes derived from non java . lang . Object classes .