org.siebengeisslein.client.instrument
Class InstrHelper

java.lang.Object
  extended by org.siebengeisslein.client.instrument.InstrHelper

public class InstrHelper
extends java.lang.Object


Field Summary
static java.lang.String CONSTRUCTOR_SIGNATURE
           
static java.lang.String DATA_INPUT
           
static java.lang.String EMPTY_SIGNATURE
           
static java.lang.String ENUM
           
static java.lang.String GET_REF_METHOD
           
static java.lang.String HASHMAP
           
static java.lang.String INSTR_HELPER
           
static java.lang.String INSTRUMENTED
           
static java.lang.String IO_HELPER
           
static int METHOD_READ_ONLY
           
static int METHOD_READ_WRITE
           
static int METHOD_TRANSIENT_ONLY
           
static java.lang.String OBJECT
           
static java.lang.String PERSISTENT
           
static java.lang.String PERSISTENT_CLASS
           
static java.lang.String READ_LOCK_METHOD
           
static java.lang.String REF
           
static java.lang.String REF_CLASS
           
static java.lang.String REF_GET_METHOD
           
static java.lang.String REF_TYPE
           
static java.lang.String STRING
           
static java.lang.String TO_PERSISTENT_METHOD
           
static java.lang.String TO_REF_METHOD
           
static java.lang.String USER_LOCAL
           
static java.lang.String USER_LOCAL_TYPE
           
static java.lang.String WRITE_LOCK_METHOD
           
 
Method Summary
static org.objectweb.asm.MethodVisitor createClearUserLocals(org.objectweb.asm.ClassVisitor cv, java.lang.String superName)
           
static org.objectweb.asm.MethodVisitor createConstructorStart(org.objectweb.asm.ClassVisitor cv, java.lang.String superClassName)
           
static org.objectweb.asm.MethodVisitor createWriteExternal(org.objectweb.asm.ClassVisitor cv, java.lang.String superClassName)
           
static boolean isArrayLoad(int opcode)
           
static boolean isArrayStore(int opcode)
           
static boolean isConstructor(java.lang.String name)
           
static boolean isEnum(org.objectweb.asm.Type type, java.lang.ClassLoader cl)
           
static boolean isEnum(org.objectweb.asm.Type type, org.objectweb.asm.tree.ClassNode cn)
           
static boolean isInstrumented(org.objectweb.asm.tree.ClassNode classNode)
           
static boolean isPersistent(org.objectweb.asm.tree.ClassNode classNode, java.lang.ClassLoader loader)
           
static boolean isRefArrayLoad(int opcode)
           
static boolean isRefArrayStore(int opcode)
           
static boolean isRefType(org.objectweb.asm.Type type)
           
static boolean isSimpleOrStringType(org.objectweb.asm.Type type)
           
static boolean isSimpleType(org.objectweb.asm.Type type)
           
static boolean isStringType(org.objectweb.asm.Type type)
           
static org.objectweb.asm.tree.ClassNode loadClass(java.lang.ClassLoader loader, java.lang.String classname)
           
static void loadFromMigrationMap(org.objectweb.asm.MethodVisitor mv, java.lang.String name, PType type)
           
static void persistentToRef(org.objectweb.asm.MethodVisitor cv)
           
static void readLock(org.objectweb.asm.MethodVisitor cv)
           
static void refToPersistent(org.objectweb.asm.MethodVisitor cv, java.lang.String typeDescriptor)
           
static java.lang.String toMethodName(java.lang.String prefix, org.objectweb.asm.Type type)
           
static void visitLoad(org.objectweb.asm.MethodVisitor mv, org.objectweb.asm.Type type, int index)
           
static void visitMethodInvocation(org.objectweb.asm.MethodVisitor mv, java.lang.String name, java.lang.String descriptor, java.lang.String targetClass, boolean special, boolean isStatic, boolean isInterface)
           
static void visitReturn(org.objectweb.asm.MethodVisitor mv, org.objectweb.asm.Type type)
           
static void writeLock(org.objectweb.asm.MethodVisitor cv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ_LOCK_METHOD

public static final java.lang.String READ_LOCK_METHOD
See Also:
Constant Field Values

WRITE_LOCK_METHOD

public static final java.lang.String WRITE_LOCK_METHOD
See Also:
Constant Field Values

TO_REF_METHOD

public static final java.lang.String TO_REF_METHOD
See Also:
Constant Field Values

PERSISTENT_CLASS

public static final java.lang.String PERSISTENT_CLASS
See Also:
Constant Field Values

TO_PERSISTENT_METHOD

public static final java.lang.String TO_PERSISTENT_METHOD
See Also:
Constant Field Values

IO_HELPER

public static final java.lang.String IO_HELPER

INSTR_HELPER

public static final java.lang.String INSTR_HELPER

USER_LOCAL

public static final java.lang.String USER_LOCAL

OBJECT

public static final java.lang.String OBJECT
See Also:
Constant Field Values

DATA_INPUT

public static final java.lang.String DATA_INPUT
See Also:
Constant Field Values

REF_CLASS

public static final java.lang.String REF_CLASS
See Also:
Constant Field Values

CONSTRUCTOR_SIGNATURE

public static final java.lang.String CONSTRUCTOR_SIGNATURE
See Also:
Constant Field Values

EMPTY_SIGNATURE

public static final java.lang.String EMPTY_SIGNATURE
See Also:
Constant Field Values

STRING

public static final java.lang.String STRING
See Also:
Constant Field Values

METHOD_TRANSIENT_ONLY

public static final int METHOD_TRANSIENT_ONLY
See Also:
Constant Field Values

METHOD_READ_ONLY

public static final int METHOD_READ_ONLY
See Also:
Constant Field Values

METHOD_READ_WRITE

public static final int METHOD_READ_WRITE
See Also:
Constant Field Values

INSTRUMENTED

public static final java.lang.String INSTRUMENTED

PERSISTENT

public static final java.lang.String PERSISTENT

REF

public static final java.lang.String REF

ENUM

public static final java.lang.String ENUM

REF_TYPE

public static final java.lang.String REF_TYPE

USER_LOCAL_TYPE

public static final java.lang.String USER_LOCAL_TYPE

HASHMAP

public static final java.lang.String HASHMAP
See Also:
Constant Field Values

REF_GET_METHOD

public static final java.lang.String REF_GET_METHOD
See Also:
Constant Field Values

GET_REF_METHOD

public static final java.lang.String GET_REF_METHOD
See Also:
Constant Field Values
Method Detail

isInstrumented

public static boolean isInstrumented(org.objectweb.asm.tree.ClassNode classNode)

isPersistent

public static boolean isPersistent(org.objectweb.asm.tree.ClassNode classNode,
                                   java.lang.ClassLoader loader)
                            throws java.io.IOException
Throws:
java.io.IOException

loadClass

public static org.objectweb.asm.tree.ClassNode loadClass(java.lang.ClassLoader loader,
                                                         java.lang.String classname)
                                                  throws java.io.IOException
Throws:
java.io.IOException

isSimpleOrStringType

public static boolean isSimpleOrStringType(org.objectweb.asm.Type type)

isSimpleType

public static boolean isSimpleType(org.objectweb.asm.Type type)

isStringType

public static boolean isStringType(org.objectweb.asm.Type type)

createConstructorStart

public static org.objectweb.asm.MethodVisitor createConstructorStart(org.objectweb.asm.ClassVisitor cv,
                                                                     java.lang.String superClassName)

createWriteExternal

public static org.objectweb.asm.MethodVisitor createWriteExternal(org.objectweb.asm.ClassVisitor cv,
                                                                  java.lang.String superClassName)

visitReturn

public static void visitReturn(org.objectweb.asm.MethodVisitor mv,
                               org.objectweb.asm.Type type)

visitLoad

public static void visitLoad(org.objectweb.asm.MethodVisitor mv,
                             org.objectweb.asm.Type type,
                             int index)

persistentToRef

public static void persistentToRef(org.objectweb.asm.MethodVisitor cv)

refToPersistent

public static void refToPersistent(org.objectweb.asm.MethodVisitor cv,
                                   java.lang.String typeDescriptor)

readLock

public static void readLock(org.objectweb.asm.MethodVisitor cv)

writeLock

public static void writeLock(org.objectweb.asm.MethodVisitor cv)

toMethodName

public static java.lang.String toMethodName(java.lang.String prefix,
                                            org.objectweb.asm.Type type)

isArrayStore

public static boolean isArrayStore(int opcode)

isArrayLoad

public static boolean isArrayLoad(int opcode)

isRefArrayLoad

public static boolean isRefArrayLoad(int opcode)

isRefArrayStore

public static boolean isRefArrayStore(int opcode)

loadFromMigrationMap

public static void loadFromMigrationMap(org.objectweb.asm.MethodVisitor mv,
                                        java.lang.String name,
                                        PType type)

isEnum

public static boolean isEnum(org.objectweb.asm.Type type,
                             java.lang.ClassLoader cl)
                      throws java.io.IOException
Throws:
java.io.IOException

isEnum

public static boolean isEnum(org.objectweb.asm.Type type,
                             org.objectweb.asm.tree.ClassNode cn)
                      throws java.io.IOException
Throws:
java.io.IOException

isRefType

public static boolean isRefType(org.objectweb.asm.Type type)

isConstructor

public static boolean isConstructor(java.lang.String name)

visitMethodInvocation

public static void visitMethodInvocation(org.objectweb.asm.MethodVisitor mv,
                                         java.lang.String name,
                                         java.lang.String descriptor,
                                         java.lang.String targetClass,
                                         boolean special,
                                         boolean isStatic,
                                         boolean isInterface)

createClearUserLocals

public static org.objectweb.asm.MethodVisitor createClearUserLocals(org.objectweb.asm.ClassVisitor cv,
                                                                    java.lang.String superName)