public class VerifyingClassAdapter
extends org.objectweb.asm.ClassAdapter
ClassWriter
, and verifies properties of the class getting written.
Currently, it only checks to see if the methods are of the correct length
for Java methods (<64K).Modifier and Type | Class and Description |
---|---|
static class |
VerifyingClassAdapter.State
An enum which indicates whether the class in question is verified.
|
Constructor and Description |
---|
VerifyingClassAdapter(org.objectweb.asm.ClassWriter cw,
byte[] original,
String className) |
Modifier and Type | Method and Description |
---|---|
boolean |
isVerified()
Gets the verification state of this class.
|
byte[] |
toByteArray()
Returns the byte array that contains the byte code for this class.
|
void |
visitEnd() |
org.objectweb.asm.MethodVisitor |
visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions)
In addition, the returned
MethodVisitor will throw an exception
if the method is greater than 64K in length. |
public VerifyingClassAdapter(org.objectweb.asm.ClassWriter cw, byte[] original, String className)
cw
- A class writer that is wrapped by this class adapteroriginal
- the original bytecodeclassName
- the name of the class being examined.public org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
MethodVisitor
will throw an exception
if the method is greater than 64K in length.visitMethod
in interface org.objectweb.asm.ClassVisitor
visitMethod
in class org.objectweb.asm.ClassAdapter
public void visitEnd()
visitEnd
in interface org.objectweb.asm.ClassVisitor
visitEnd
in class org.objectweb.asm.ClassAdapter
public boolean isVerified()
public byte[] toByteArray()
Copyright © 2009-2013 Google, Inc.. All Rights Reserved.