Class ExecutableMethodsDefinitionWriter

java.lang.Object
io.micronaut.inject.writer.ExecutableMethodsDefinitionWriter
All Implemented Interfaces:
Buildable<OutputObjectDef>

@NullUnmarked @Internal public class ExecutableMethodsDefinitionWriter extends Object implements Buildable<OutputObjectDef>
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 Method GET_EXECUTABLE_AT_INDEX_METHOD
    • REQUIRES_METHOD_PROCESSING_METHOD

      public static final Method REQUIRES_METHOD_PROCESSING_METHOD
  • Constructor Details

  • Method Details

    • requiresMethodProcessing

      public boolean requiresMethodProcessing()
      By default, when the BeanContext is started, the ExecutableMethodProcessor instances unless this method returns true.
      Returns:
      Whether the bean definition requires method processing
      See Also:
    • setProxyType

      public void setProxyType(@Nullable io.micronaut.sourcegen.model.ClassTypeDef proxyType)
      Parameters:
      proxyType - The proxy type
    • getClassName

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

      public io.micronaut.sourcegen.model.ClassTypeDef getClassTypeDef()
      Returns:
      The generated class type.
    • isSupportsInterceptedProxy

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

      public void addExecutableMethod(TypedElement declaringType, MethodElement methodElement)
      Adds the given method to the executable methods definition.
      Parameters:
      declaringType - The declaring type
      methodElement - The method element
    • addBridgeMethod

      public final void addBridgeMethod(MethodElement methodElement, MethodElement proxyMethod)
    • findIndexOfExecutableMethod

      public final int findIndexOfExecutableMethod(MethodElement methodElement)
    • build

      public final OutputObjectDef build()
      Invoke to build the class model.
      Specified by:
      build in interface Buildable<OutputObjectDef>
      Returns:
      The builder result
    • getMethodsCount

      public int getMethodsCount()
      Retrieves the total count of methods.
      Returns:
      The number of methods available.
      Since:
      5.0
    • getMethodByIndex

      public MethodElement getMethodByIndex(int index)
      Retrieves the `MethodElement` at the specified index.
      Parameters:
      index - The index of the method to retrieve.
      Returns:
      The `MethodElement` corresponding to the specified index.
      Since:
      5.0