예제 #1
0
 @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;
   }
 }
예제 #2
0
 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;
 }
예제 #3
0
 private void assertBytecodeMajorLevel(int majorLevel, File classFile)
     throws ClassFormatException, IOException {
   assertTrue(classFile.canRead());
   JavaClass javaClass = new ClassParser(classFile.getAbsolutePath()).parse();
   assertEquals(majorLevel, javaClass.getMajor());
 }
예제 #4
0
 /** 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);
 }