Class TypeUtils

java.lang.Object
io.micronaut.sourcegen.bytecode.TypeUtils

@Internal public final class TypeUtils extends Object
Internal bytecode type utils.
Since:
1.5
Author:
Denis Stepanov
  • Field Details

    • OBJECT_TYPE

      public static final org.objectweb.asm.Type OBJECT_TYPE
  • Constructor Details

    • TypeUtils

      public TypeUtils()
  • Method Details

    • getMethodDescriptor

      public static String getMethodDescriptor(@Nullable ObjectDef objectDef, MethodDef methodDef)
      The descriptor of a method outside the write of an inner class: no variables of an enclosing class are in scope.
      Parameters:
      objectDef - The definition, if any
      methodDef - The method
      Returns:
      The descriptor
    • getMethodDescriptor

      public static String getMethodDescriptor(@Nullable ObjectDef objectDef, MethodDef methodDef, EnclosingScope enclosingScope)
    • getScopedType

      public static org.objectweb.asm.Type getScopedType(TypeDef typeDef, MethodContext context)
      The type of a value in a method body, erased in the scope of the method: a variable it declares shadows one of the class of the same name.
      Parameters:
      typeDef - The type
      context - The method being written
      Returns:
      The erased type
      Since:
      2.3
    • getType

      public static org.objectweb.asm.Type getType(TypeDef typeDef, @Nullable ObjectDef objectDef)
      The type of a type outside the write of an inner class: no variables of an enclosing class are in scope.
      Parameters:
      typeDef - The type
      objectDef - The definition, if any
      Returns:
      The erased type
    • getType

      public static org.objectweb.asm.Type getType(TypeDef typeDef, @Nullable ObjectDef objectDef, EnclosingScope enclosingScope)
    • getType

      public static org.objectweb.asm.Type getType(TypeDef.Primitive primitive)
    • getType

      public static org.objectweb.asm.Type getType(String className, org.objectweb.asm.Type... genericTypes)
    • getType

      public static org.objectweb.asm.Type getType(ClassTypeDef classTypeDef)
    • getType

      public static org.objectweb.asm.Type getType(String className)