Class Advice.Delegator.ForRegularInvocation

    • Constructor Detail

      • ForRegularInvocation

        protected ForRegularInvocation​(MethodDescription.InDefinedShape adviceMethod)
        Creates a delegator for a regular invocation.
        Parameters:
        adviceMethod - The advice method.
    • Method Detail

      • apply

        public StackManipulation apply​(TypeDescription instrumentedType,
                                       MethodDescription instrumentedMethod)
        Materializes an invocation.
        Specified by:
        apply in interface Advice.Delegator
        Parameters:
        instrumentedType - The instrumented type.
        instrumentedMethod - The instrumented method.
        Returns:
        An appropriate stack manipulation which needs to consume all arguments for the advice method and needs to provide a compatible return type.
      • assertVisibility

        public void assertVisibility​(TypeDescription instrumentedType)
        Asserts the visibility of the delegation target.
        Specified by:
        assertVisibility in interface Advice.Delegator
        Parameters:
        instrumentedType - The instrumented type.