@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            refClasses = new HashSet<>();
            refClasses.add(classContext.getJavaClass().getClassName());
            state = State.COLLECT;
            super.visitClassContext(classContext);
            state = State.SEEN_NOTHING;
            super.visitClassContext(classContext);
        } finally {
            refClasses = null;
        }
    }
@ Override public void visitClassContext ( ClassContext classContext ) { try { refClasses = new HashSet < > ( ) ; refClasses . add ( classContext . getJavaClass ( ) . getClassName ( ) ) ; state = State . COLLECT ; super . visitClassContext ( classContext ) ; state = State . SEEN_NOTHING ; super . visitClassContext ( classContext ) ; } finally { refClasses = null ; } }
overrides the visitor to collect all class references

@param classContext
the class context of the currently visited class