jasm.verifier
Class ClassFileVerifier
java.lang.Object
jasm.verifier.ClassFileVerifier
public class ClassFileVerifier
- extends java.lang.Object
The purpose of validation is to check that a given class conforms to the JVM
spec. There are numerous checks that need to be made, which break into
several categories:
Class-Level Checks
- That no class contains two methods with identical types.
- That every referenced constant-pool item exists, and is of the correc
type.
Method-Level Checks
- That no method contains two identical labels.
- That the stack height is always consistent
- That type modifiers on bytecodes are correct
- Author:
- David J. Pearce
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassFileVerifier
public ClassFileVerifier()
apply
public void apply(ClassFile cf)
checkNoIdenticalMethod
public void checkNoIdenticalMethod(ClassFile cf)
checkMethod
public void checkMethod(ClassFile.Method method,
ClassFile parent)
checkCode
public void checkCode(Code code,
ClassFile.Method method,
ClassFile parent)
checkLabels
public void checkLabels(Code code,
ClassFile.Method method,
ClassFile parent)
Copyright © 2013 David J. Pearce. All Rights Reserved.