Class ExecutableMethodsDefinitionWriter

java.lang.Object
io.micronaut.inject.writer.AbstractClassFileWriter
io.micronaut.inject.writer.ExecutableMethodsDefinitionWriter
All Implemented Interfaces:
ClassOutputWriter, OriginatingElements, org.objectweb.asm.Opcodes

@Internal public class ExecutableMethodsDefinitionWriter extends AbstractClassFileWriter implements org.objectweb.asm.Opcodes
Writes out a ExecutableMethodsDefinition class.
Since:
3.0
Author:
Denis Stepanov
  • Field Details

    • CLASS_SUFFIX

      public static final String CLASS_SUFFIX
      See Also:
    • GET_EXECUTABLE_AT_INDEX_METHOD

      public static final org.objectweb.asm.commons.Method GET_EXECUTABLE_AT_INDEX_METHOD
    • SUPER_TYPE

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

  • Method Details

    • getClassName

      public String getClassName()
      Returns:
      The generated class name.
    • getClassType

      public org.objectweb.asm.Type getClassType()
      Returns:
      The generated class type.
    • isSupportsInterceptedProxy

      public boolean isSupportsInterceptedProxy()
      Does method support intercepted proxy.
      Returns:
      Does method support intercepted proxy
    • isAbstract

      public boolean isAbstract(int index)
      Is the method abstract.
      Parameters:
      index - The method index
      Returns:
      Is the method abstract
    • isInterface

      public boolean isInterface(int index)
      Is the method in an interface.
      Parameters:
      index - The method index
      Returns:
      Is the method in an interface
    • isDefault

      public boolean isDefault(int index)
      Is the method a default method.
      Parameters:
      index - The method index
      Returns:
      Is the method a default method
    • isSuspend

      public boolean isSuspend(int index)
      Is the method suspend.
      Parameters:
      index - The method index
      Returns:
      Is the method suspend
    • visitExecutableMethod

      public int visitExecutableMethod(TypedElement declaringType, MethodElement methodElement, String interceptedProxyClassName, String interceptedProxyBridgeMethodName)
      Visit a method that is to be made executable allow invocation of said method without reflection.
      Parameters:
      declaringType - The declaring type of the method. Either a Class or a string representing the name of the type
      methodElement - The method element
      interceptedProxyClassName - The intercepted proxy class name
      interceptedProxyBridgeMethodName - The intercepted proxy bridge method name
      Returns:
      The method index
    • accept

      public void accept(ClassWriterOutputVisitor classWriterOutputVisitor) throws IOException
      Description copied from interface: ClassOutputWriter
      Accept a ClassWriterOutputVisitor to write this writer to disk.
      Specified by:
      accept in interface ClassOutputWriter
      Parameters:
      classWriterOutputVisitor - The ClassWriterOutputVisitor
      Throws:
      IOException - if there is an error writing to disk
    • visitDefinitionEnd

      public final void visitDefinitionEnd()
      Invoke to build the class model.