implements the visitor to filter out pre-1.8 classes, for 1.8+ classes, it creates the opcode stack and active stack ops

@param classContext
the context object of the currently parsed class
428871
@Override
    public void visitClassContext(ClassContext classContext) {
        currentClass = classContext.getJavaClass();

        if (currentClass.getMajor() >= Const.MAJOR_1_8) {
            try {
                stack = new OpcodeStack();
                activeStackOps = new ArrayDeque<>();
                super.visitClassContext(classContext);
            } finally {
                activeStackOps = null;
                stack = null;
            }
        }
        currentClass = null;
    }
21050
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            if ((throwableClass != null) && !isPre14Class(classContext.getJavaClass())) {
                stack = new OpcodeStack();
                catchInfos = new HashSet<>();
                exReg = new HashMap<>();
                super.visitClassContext(classContext);
            }
        } finally {
            stack = null;
            catchInfos = null;
            exceptions = null;
            exReg = null;
        }
    }
393538
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            nameOfThisClass = SignatureUtils.getNonAnonymousPortion(classContext.getJavaClass().getClassName());
            formatterLoggers = new HashSet<>();
            super.visitClassContext(classContext);
        } finally {
            formatterLoggers = null;
            stack = null;
        }
    }
54571
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            String clsName = classContext.getJavaClass().getClassName();
            isInnerClass = clsName.indexOf(Values.INNER_CLASS_SEPARATOR) >= 0;

            clsSignature = SignatureUtils.classToSignature(clsName);
            stack = new OpcodeStack();
            localSpecialObjects = new HashMap<>();
            fieldSpecialObjects = new HashMap<>();
            super.visitClassContext(classContext);

            if (!isInnerClass && !fieldSpecialObjects.isEmpty()) {

                for (Map.Entry<String, String> entry : fieldSpecialObjects.entrySet()) {
                    String fieldName = entry.getKey();
                    String signature = entry.getValue();
                    bugReporter.reportBug(
                            makeFieldBugInstance().addClass(this).addField(clsName, fieldName, signature, false));
                }
            }
        } finally {
            stack = null;
            localSpecialObjects = null;
            fieldSpecialObjects = null;
        }
    }
481095
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            JavaClass cls = classContext.getJavaClass();
            if (cls.getMajor() >= Const.MAJOR_1_4) {
                stack = new OpcodeStack();
                regValueType = new HashMap<Integer, State>();
                super.visitClassContext(classContext);
            }
        } finally {
            stack = null;
            regValueType = null;
        }
    }
414271
@Override
    public void visitClassContext(ClassContext classContext) {
        JavaClass jclass = classContext.getJavaClass();

        // We can ignore classes that were compiled for anything
        // less than JDK 1.5. This should avoid lots of unnecessary work
        // when analyzing code for older VM targets.
        if (BCELUtil.preTiger(jclass)) {
            return;
        }

        boolean sawUtilConcurrentLocks = false;
        for (Constant c : jclass.getConstantPool().getConstantPool()) {
            if (c instanceof ConstantMethodref) {
                ConstantMethodref m = (ConstantMethodref) c;
                ConstantClass cl = (ConstantClass) jclass.getConstantPool().getConstant(m.getClassIndex());
                ConstantUtf8 name = (ConstantUtf8) jclass.getConstantPool().getConstant(cl.getNameIndex());
                String nameAsString = name.getBytes();
                if (nameAsString.startsWith("java/util/concurrent/locks")) {
                    sawUtilConcurrentLocks = true;
                }

            }
        }
        if (sawUtilConcurrentLocks) {
            super.visitClassContext(classContext);
        }
    }
1155008
@Override
    public void visitClassContext(ClassContext clsContext) {
        try {
            if ((collectionCls == null) || (setCls == null) || (mapCls == null)) {
                return;
            }

            stack = new OpcodeStack();
            super.visitClassContext(clsContext);
        } finally {
            stack = null;
        }
    }
950742
@Override
	public void visitClassContext(ClassContext classContext) {
		try {
			stack = new OpcodeStack();
			localMethodCalls = new HashMap<>();
			fieldMethodCalls = new HashMap<>();
			staticMethodCalls = new HashMap<>();
			branchTargets = new BitSet();
			super.visitClassContext(classContext);
		} finally {
			stack = null;
			localMethodCalls = null;
			fieldMethodCalls = null;
			staticMethodCalls = null;
			branchTargets = null;
		}
	}
432320
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            guiInterfaces = new HashSet<>();
            JavaClass cls = classContext.getJavaClass();
            JavaClass[] infs = cls.getAllInterfaces();
            for (JavaClass inf : infs) {
                String name = inf.getClassName();
                if ((name.startsWith("java.awt.") || name.startsWith("javax.swing.")) && name.endsWith("Listener")) {
                    guiInterfaces.add(inf);
                }
            }

            if (!guiInterfaces.isEmpty()) {
                listenerCode = new LinkedHashMap<>();
                expensiveThisCalls = new HashSet<>();
                super.visitClassContext(classContext);
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            guiInterfaces = null;
            listenerCode = null;
            expensiveThisCalls = null;
        }
    }
228851
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            possibleForLoops = new HashSet<>();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            possibleForLoops = null;
        }
    }
750995
public static ClassLoader getContextClassLoader(Class<?> contextClass) {
        return Objects.firstNonNull(
                Thread.currentThread().getContextClassLoader(),
                contextClass.getClassLoader()
        );
    }
1249269
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            JavaClass cls = classContext.getJavaClass();
            if (cls.isAbstract()) {
                interfaceMethods = collectInterfaceMethods(cls);
                super.visitClassContext(classContext);
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            interfaceMethods = null;
        }
    }
569924
@Override
    public void visitClassContext(ClassContext classContext) {

        try {
            if ((collectionClass == null) || (mapClass == null)) {
                return;
            }
            stack = new OpcodeStack();
            fieldUserValues = new HashMap<>();
            classContext.getJavaClass().accept(this);
        } finally {
            fieldUserValues = null;
            stack = null;
        }
    }
1196145
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            if ((collectionClass != null) && (mapClass != null)) {
                collectionFields = new HashMap<>();
                aliases = new HashMap<>();
                stack = new OpcodeStack();
                JavaClass cls = classContext.getJavaClass();
                className = cls.getClassName();
                super.visitClassContext(classContext);
                for (FieldInfo fi : collectionFields.values()) {
                    if (fi.isSynchronized()) {
                        bugReporter.reportBug(new BugInstance(this, BugType.NMCS_NEEDLESS_MEMBER_COLLECTION_SYNCHRONIZATION.name(), NORMAL_PRIORITY)
                                .addClass(this).addField(fi.getFieldAnnotation()));
                    }
                }
            }
        } finally {
            collectionFields = null;
            aliases = null;
            stack = null;
        }
    }
455279
public ClassContext getClassContext(JavaClass javaClass) {
        // This is a bit silly since we're doing an unnecessary
        // ClassDescriptor->JavaClass lookup.
        // However, we can be assured that it will succeed.

        ClassDescriptor classDescriptor = DescriptorFactory.instance().getClassDescriptor(
                ClassName.toSlashedClassName(javaClass.getClassName()));

        try {
            return Global.getAnalysisCache().getClassAnalysis(ClassContext.class, classDescriptor);
        } catch (CheckedAnalysisException e) {
            IllegalStateException ise = new IllegalStateException("Could not get ClassContext for JavaClass");
            ise.initCause(e);
            throw ise;
        }
    }
459784
@Override
    public void visitClassContext(final ClassContext classContext) {
        try {
            JavaClass cls = classContext.getJavaClass();
            packageName = cls.getPackageName();
            clsName = cls.getClassName();
            parentClassName = cls.getSuperclassName();
            stack = new OpcodeStack();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            clsAccessCount = null;
            packageName = null;
            clsName = null;
            parentClassName = null;
        }
    }
1249529
static ClassLoader setContextClassLoader(final ClassLoader cl)
   {
      if (System.getSecurityManager() == null)
      {
         ClassLoader result = Thread.currentThread().getContextClassLoader();
         if (cl != null)
            Thread.currentThread().setContextClassLoader(cl);
         return result;
      }
      else
      {
         try
         {
            return AccessController.doPrivileged(new PrivilegedExceptionAction<ClassLoader>() {
               public ClassLoader run() throws Exception
               {
                  try
                  {
                     ClassLoader result = Thread.currentThread().getContextClassLoader();
                     if (cl != null)
                        Thread.currentThread().setContextClassLoader(cl);
                     return result;
                  }
                  catch (Exception e)
                  {
                     throw e;
                  }
                  catch (Error e)
                  {
                     throw e;
                  }
                  catch (Throwable e)
                  {
                     throw new RuntimeException("Error setting context classloader", e);
                  }
               }
            });
         }
         catch (PrivilegedActionException e)
         {
            throw new RuntimeException("Error running privileged action", e.getCause());
         }
      }
   }