java.lang.Object
org.simpleflatmapper.reflect.asm.AsmUtils

public class AsmUtils extends Object
  • Field Details

    • ASM_DUMP_TARGET_DIR

      public static final String ASM_DUMP_TARGET_DIR
      See Also:
    • EMPTY_TYPE_ARRAY

      public static final Type[] EMPTY_TYPE_ARRAY
    • API

      public static final int API
  • Constructor Details

    • AsmUtils

      public AsmUtils()
  • Method Details

    • toAsmType

      public static String toAsmType(String name)
    • toAsmType

      public static String toAsmType(Type type)
    • toTargetTypeDeclaration

      public static String toTargetTypeDeclaration(Type targetType)
    • toTargetTypeDeclaration

      public static String toTargetTypeDeclaration(String targetType)
    • toGenericAsmType

      public static String toGenericAsmType(Type type)
    • writeClassToFile

      public static byte[] writeClassToFile(String className, byte[] bytes) throws IOException
      Throws:
      IOException
    • writeClassToFileInDir

      public static byte[] writeClassToFileInDir(String className, byte[] bytes, File targetDir) throws IOException
      Throws:
      IOException
    • toGenericType

      public static Type toGenericType(String sig, List<String> genericTypeNames, Type target) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • findClosestPublicTypeExposing

      public static Type findClosestPublicTypeExposing(Type type, Class<?> expose)
    • findTypeInHierarchy

      public static Type findTypeInHierarchy(Type type, org.simpleflatmapper.util.Predicate<Type> predicate)
    • invoke

      public static void invoke(org.simpleflatmapper.ow2asm.MethodVisitor mv, Method method)
    • invoke

      public static void invoke(org.simpleflatmapper.ow2asm.MethodVisitor mv, Type target, String method, String sig)
    • toWrapperClass

      public static Class<?> toWrapperClass(Type type)
    • toWrapperType

      public static String toWrapperType(Type type)
    • extractGenericTypeNames

      public static List<String> extractGenericTypeNames(String sig)
    • extractTypeNamesFromSignature

      public static List<String> extractTypeNamesFromSignature(String sig)
    • toSignature

      public static String toSignature(Method exec)
    • getLoadOps

      public static int getLoadOps(Class<?> parameterType)
    • getStoreOps

      public static int getStoreOps(Class<?> type)
    • addIndex

      public static void addIndex(org.simpleflatmapper.ow2asm.MethodVisitor mv, int i)