@Override public void visitClassContext(ClassContext classContext) { try { JavaClass cls = classContext.getJavaClass(); if (cls.getMajor() >= MAJOR_1_4) { stack = new OpcodeStack(); regValueType = new HashMap<Integer, State>(); super.visitClassContext(classContext); } } finally { stack = null; regValueType = null; } }
public JavaArrayClass(String className, JavaClass et, int dimension) { super( et.getClassNameIndex(), et.getSuperclassNameIndex(), et.getFileName(), et.getMajor(), et.getMinor(), et.getAccessFlags(), et.getConstantPool(), et.getInterfaceIndices(), et.getFields(), et.getMethods(), et.getAttributes()); this.dimension = dimension; this.className = className; isBasicType = false; }
private void assertBytecodeMajorLevel(int majorLevel, File classFile) throws ClassFormatException, IOException { assertTrue(classFile.canRead()); JavaClass javaClass = new ClassParser(classFile.getAbsolutePath()).parse(); assertEquals(majorLevel, javaClass.getMajor()); }
/** Checks if classfile was compiled for pre 1.5 target */ public static boolean preTiger(JavaClass jclass) { return jclass.getMajor() < JDK15_MAJOR || (jclass.getMajor() == JDK15_MAJOR && jclass.getMinor() < JDK15_MINOR); }