Package one.nio.gen

Class BytecodeGenerator

java.lang.Object
java.lang.ClassLoader
one.nio.gen.BytecodeGenerator
All Implemented Interfaces:
BytecodeGeneratorMXBean, org.objectweb.asm.Opcodes
Direct Known Subclasses:
DateFormatGenerator, DelegateGenerator, RequestHandlerGenerator, StubGenerator

public class BytecodeGenerator extends ClassLoader implements BytecodeGeneratorMXBean, org.objectweb.asm.Opcodes
  • Field Details

  • Constructor Details

    • BytecodeGenerator

      public BytecodeGenerator()
    • BytecodeGenerator

      public BytecodeGenerator(ClassLoader parent)
  • Method Details

    • defineClass

      public Class<?> defineClass(byte[] classData)
    • defineClassIfNotExists

      public Class<?> defineClassIfNotExists(String className, byte[] classData)
    • instantiate

      public <T> T instantiate(byte[] classData, Class<T> iface)
    • dumpClass

      public void dumpClass(byte[] classData, String className)
    • emitGetField

      public static void emitGetField(org.objectweb.asm.MethodVisitor mv, Field f)
    • emitPutField

      public static void emitPutField(org.objectweb.asm.MethodVisitor mv, Field f)
    • emitInvoke

      public static void emitInvoke(org.objectweb.asm.MethodVisitor mv, Method m)
    • emitInvoke

      public static void emitInvoke(org.objectweb.asm.MethodVisitor mv, MethodHandleInfo m)
    • emitInvoke

      public static void emitInvoke(org.objectweb.asm.MethodVisitor mv, Constructor c)
    • emitThrow

      public static void emitThrow(org.objectweb.asm.MethodVisitor mv, String exceptionClass, String message)
    • emitInt

      public static void emitInt(org.objectweb.asm.MethodVisitor mv, int c)
    • emitLong

      public static void emitLong(org.objectweb.asm.MethodVisitor mv, long c)
    • emitFloat

      public static void emitFloat(org.objectweb.asm.MethodVisitor mv, float c)
    • emitDouble

      public static void emitDouble(org.objectweb.asm.MethodVisitor mv, double c)
    • emitBoxing

      public static void emitBoxing(org.objectweb.asm.MethodVisitor mv, Class type)
    • emitUnboxing

      public static void emitUnboxing(org.objectweb.asm.MethodVisitor mv, Class type)
    • getDumpPath

      public String getDumpPath()
      Specified by:
      getDumpPath in interface BytecodeGeneratorMXBean
    • setDumpPath

      public void setDumpPath(String dumpPath)
      Specified by:
      setDumpPath in interface BytecodeGeneratorMXBean
    • getTotalClasses

      public int getTotalClasses()
      Specified by:
      getTotalClasses in interface BytecodeGeneratorMXBean
    • getTotalBytes

      public int getTotalBytes()
      Specified by:
      getTotalBytes in interface BytecodeGeneratorMXBean