Interface ConstructorInvocationContext<T>

  • Type Parameters:
    T - The bean type
    All Superinterfaces:
    io.micronaut.core.annotation.AnnotationMetadata, io.micronaut.core.annotation.AnnotationMetadataDelegate, io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, io.micronaut.core.attr.AttributeHolder, io.micronaut.core.type.Executable<T,​T>, InvocationContext<T,​T>, io.micronaut.core.attr.MutableAttributeHolder
    All Known Implementing Classes:
    ConstructorInterceptorChain

    public interface ConstructorInvocationContext<T>
    extends InvocationContext<T,​T>
    An InvocationContext for construction invocation.
    Since:
    3.0.0
    • Field Summary

      • Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata

        CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
      • Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

        EMPTY
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      io.micronaut.core.beans.BeanConstructor<T> getConstructor()  
      default java.lang.Class<T> getDeclaringType()  
      T proceed()
      Proceeds with the invocation.
      T proceed​(Interceptor from)
      Proceeds with the invocation using the given interceptor as a position to start from.
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata

        getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate

        booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider

        getAnnotationMetadata
      • Methods inherited from interface io.micronaut.core.attr.AttributeHolder

        getAttribute, getAttribute
      • Methods inherited from interface io.micronaut.core.type.Executable

        getArguments, invoke
      • Methods inherited from interface io.micronaut.core.attr.MutableAttributeHolder

        getAttributes, removeAttribute
    • Method Detail

      • getConstructor

        @NonNull
        io.micronaut.core.beans.BeanConstructor<T> getConstructor()
        Returns:
        The bean type.
      • getDeclaringType

        default java.lang.Class<T> getDeclaringType()
        Specified by:
        getDeclaringType in interface io.micronaut.core.type.Executable<T,​T>
        Specified by:
        getDeclaringType in interface InvocationContext<T,​T>
      • proceed

        @NonNull
        T proceed()
           throws java.lang.RuntimeException
        Description copied from interface: InvocationContext
        Proceeds with the invocation. If this is the last interceptor in the chain then the final implementation method is invoked
        Specified by:
        proceed in interface InvocationContext<T,​T>
        Returns:
        The return value of the method
        Throws:
        java.lang.RuntimeException - chain may throw RTE
      • proceed

        @NonNull
        T proceed​(Interceptor from)
           throws java.lang.RuntimeException
        Description copied from interface: InvocationContext
        Proceeds with the invocation using the given interceptor as a position to start from. Mainly useful for Introduction advise where you want to invoke the target multiple times or where you want to repeat the entire chain.
        Specified by:
        proceed in interface InvocationContext<T,​T>
        Parameters:
        from - The interceptor to start from (note: will not be included in the execution)
        Returns:
        The return value of the method
        Throws:
        java.lang.RuntimeException - chain may throw RTE