Class ExecutableMethodWriter

    • Field Detail

      • METHOD_INVOKE_INTERNAL

        public static final org.objectweb.asm.commons.Method METHOD_INVOKE_INTERNAL
      • METHOD_IS_ABSTRACT

        protected static final org.objectweb.asm.commons.Method METHOD_IS_ABSTRACT
      • METHOD_IS_SUSPEND

        protected static final org.objectweb.asm.commons.Method METHOD_IS_SUSPEND
      • METHOD_GET_TARGET

        protected static final org.objectweb.asm.commons.Method METHOD_GET_TARGET
      • methodType

        protected final org.objectweb.asm.Type methodType
    • Constructor Detail

      • ExecutableMethodWriter

        public ExecutableMethodWriter​(java.lang.String methodClassName,
                                      boolean isInterface,
                                      boolean isAbstract,
                                      boolean isDefault,
                                      boolean isSuspend,
                                      OriginatingElements originatingElements,
                                      io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
                                      java.lang.String interceptedProxyClassName,
                                      java.lang.String interceptedProxyBridgeMethodName)
        Parameters:
        methodClassName - The method class name
        isInterface - Whether is an interface
        isAbstract - Whether the method is abstract
        isDefault - Whether the method is a default method
        isSuspend - Whether the method is Kotlin suspend function
        originatingElements - The originating elements
        annotationMetadata - The annotation metadata
        interceptedProxyClassName - The intercepted proxy class name
        interceptedProxyBridgeMethodName - The intercepted proxy bridge method name
    • Method Detail

      • isSupportsInterceptedProxy

        public boolean isSupportsInterceptedProxy()
        Returns:
        Is supports intercepted proxy.
      • isAbstract

        public boolean isAbstract()
        Returns:
        Is the method abstract.
      • isInterface

        public boolean isInterface()
        Returns:
        Is the method in an interface.
      • isDefault

        public boolean isDefault()
        Returns:
        Is the method a default method.
      • isSuspend

        public boolean isSuspend()
        Returns:
        Is the method suspend.
      • getClassName

        public java.lang.String getClassName()
        Returns:
        The class name
      • getInternalName

        public java.lang.String getInternalName()
        Returns:
        The internal name
      • visitMethod

        public void visitMethod​(TypedElement declaringType,
                                MethodElement methodElement)
        Write the method.
        Parameters:
        declaringType - The declaring type
        methodElement - The method element
      • beginAnnotationMetadataMethod

        @NonNull
        protected final org.objectweb.asm.commons.GeneratorAdapter beginAnnotationMetadataMethod​(org.objectweb.asm.ClassWriter classWriter)
        Description copied from class: AbstractAnnotationMetadataWriter
        Returns the generator adaptor for the method that resolves the annotation metadata.
        Overrides:
        beginAnnotationMetadataMethod in class AbstractAnnotationMetadataWriter
        Parameters:
        classWriter - The class writer
        Returns:
        The generator adapter
      • buildInvokeMethod

        protected void buildInvokeMethod​(org.objectweb.asm.Type declaringTypeObject,
                                         java.lang.String methodName,
                                         ClassElement returnType,
                                         java.util.Collection<ParameterElement> argumentTypes,
                                         org.objectweb.asm.commons.GeneratorAdapter invokeMethodVisitor)
        Parameters:
        declaringTypeObject - The declaring object type
        methodName - The method name
        returnType - The return type
        argumentTypes - The argument types
        invokeMethodVisitor - The invoke method visitor