org.glassfish.pfl.tf.spi
Class Util

java.lang.Object
  extended by org.glassfish.pfl.tf.spi.Util

public class Util
extends Object

Some useful utilities for generating code using ASM. Nothing in here should be specific to the classfile enhancer for tracing.

Author:
ken

Constructor Summary
Util(boolean debug, int verbose)
           
 
Method Summary
 String augmentInfoMethodDescriptor(String desc)
           
 void emitIntConstant(org.glassfish.pfl.objectweb.asm.MethodVisitor mv, int val)
           
 void error(String str)
           
 boolean getDebug()
           
 String getFullMethodDescriptor(Method method)
           
 String getFullMethodDescriptor(org.glassfish.pfl.objectweb.asm.tree.MethodInsnNode mn)
           
 String getFullMethodDescriptor(org.glassfish.pfl.objectweb.asm.tree.MethodNode mn)
           
 String getFullMethodDescriptor(String name, String desc)
           
 boolean hasAccess(int access, int flag)
           
 void info(int level, String str)
           
 void initLocal(org.glassfish.pfl.objectweb.asm.MethodVisitor mv, org.glassfish.pfl.objectweb.asm.tree.LocalVariableNode var)
           
 void loadFromXReturn(org.glassfish.pfl.objectweb.asm.MethodVisitor mv, int returnOpcode, org.glassfish.pfl.objectweb.asm.tree.LocalVariableNode holder)
           
 void msg(String str)
           
 void newWithSimpleConstructor(org.glassfish.pfl.objectweb.asm.MethodVisitor mv, Class<?> cls)
           
static String opcodeToString(int opcode)
           
 void storeFromXReturn(org.glassfish.pfl.objectweb.asm.MethodVisitor mv, int returnOpcode, org.glassfish.pfl.objectweb.asm.tree.LocalVariableNode holder)
           
 byte[] transform(boolean debug, byte[] cls, org.glassfish.pfl.basic.func.UnaryFunction<org.glassfish.pfl.objectweb.asm.ClassVisitor,org.glassfish.pfl.objectweb.asm.ClassAdapter> factory)
           
 int wrapArg(org.glassfish.pfl.objectweb.asm.MethodVisitor mv, int argIndex, org.glassfish.pfl.objectweb.asm.Type atype)
           
 void wrapArgs(org.glassfish.pfl.objectweb.asm.MethodVisitor mv, int access, String desc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util(boolean debug,
            int verbose)
Method Detail

getDebug

public boolean getDebug()

info

public void info(int level,
                 String str)

msg

public void msg(String str)

error

public void error(String str)

initLocal

public void initLocal(org.glassfish.pfl.objectweb.asm.MethodVisitor mv,
                      org.glassfish.pfl.objectweb.asm.tree.LocalVariableNode var)

getFullMethodDescriptor

public String getFullMethodDescriptor(String name,
                                      String desc)

getFullMethodDescriptor

public String getFullMethodDescriptor(org.glassfish.pfl.objectweb.asm.tree.MethodNode mn)

getFullMethodDescriptor

public String getFullMethodDescriptor(org.glassfish.pfl.objectweb.asm.tree.MethodInsnNode mn)

getFullMethodDescriptor

public String getFullMethodDescriptor(Method method)

newWithSimpleConstructor

public void newWithSimpleConstructor(org.glassfish.pfl.objectweb.asm.MethodVisitor mv,
                                     Class<?> cls)

augmentInfoMethodDescriptor

public String augmentInfoMethodDescriptor(String desc)

emitIntConstant

public void emitIntConstant(org.glassfish.pfl.objectweb.asm.MethodVisitor mv,
                            int val)

wrapArg

public int wrapArg(org.glassfish.pfl.objectweb.asm.MethodVisitor mv,
                   int argIndex,
                   org.glassfish.pfl.objectweb.asm.Type atype)

wrapArgs

public void wrapArgs(org.glassfish.pfl.objectweb.asm.MethodVisitor mv,
                     int access,
                     String desc)

storeFromXReturn

public void storeFromXReturn(org.glassfish.pfl.objectweb.asm.MethodVisitor mv,
                             int returnOpcode,
                             org.glassfish.pfl.objectweb.asm.tree.LocalVariableNode holder)

loadFromXReturn

public void loadFromXReturn(org.glassfish.pfl.objectweb.asm.MethodVisitor mv,
                            int returnOpcode,
                            org.glassfish.pfl.objectweb.asm.tree.LocalVariableNode holder)

hasAccess

public boolean hasAccess(int access,
                         int flag)

opcodeToString

public static String opcodeToString(int opcode)

transform

public byte[] transform(boolean debug,
                        byte[] cls,
                        org.glassfish.pfl.basic.func.UnaryFunction<org.glassfish.pfl.objectweb.asm.ClassVisitor,org.glassfish.pfl.objectweb.asm.ClassAdapter> factory)


Copyright © 2013 Oracle. All Rights Reserved.