Class Advice.Dispatcher.Inlining.Resolved

    • Field Detail

      • classReader

        protected final org.objectweb.asm.ClassReader classReader
        A class reader to query for the class file of the advice method.
      • offsetMappings

        protected final java.util.Map<java.lang.Integer,​Advice.OffsetMapping> offsetMappings
        An unresolved mapping of offsets of the advice method based on the annotations discovered on each method parameter.
    • Constructor Detail

      • Resolved

        protected Resolved​(MethodDescription.InDefinedShape adviceMethod,
                           java.util.List<Advice.OffsetMapping.Factory<?>> factories,
                           org.objectweb.asm.ClassReader classReader,
                           TypeDescription throwableType)
        Creates a new resolved version of a dispatcher.
        Parameters:
        adviceMethod - The represented advice method.
        factories - A list of factories to resolve for the parameters of the advice method.
        classReader - A class reader to query for the class file of the advice method.
        throwableType - The type to handle by a suppression handler or Advice.NoExceptionHandler to not handle any exceptions.
    • Method Detail

      • isAlive

        public boolean isAlive()
        Description copied from interface: Advice.Dispatcher
        Returns true if this dispatcher is alive.
        Specified by:
        isAlive in interface Advice.Dispatcher
        Returns:
        true if this dispatcher is alive.
      • apply

        protected abstract org.objectweb.asm.MethodVisitor apply​(org.objectweb.asm.MethodVisitor methodVisitor,
                                                                 Implementation.Context implementationContext,
                                                                 Assigner assigner,
                                                                 Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler,
                                                                 Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler,
                                                                 TypeDescription instrumentedType,
                                                                 MethodDescription instrumentedMethod,
                                                                 Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler)
        Applies a resolution for a given instrumented method.
        Parameters:
        methodVisitor - A method visitor for writing byte code to the instrumented method.
        implementationContext - The implementation context to use.
        assigner - The assigner to use.
        methodSizeHandler - A handler for computing the method size requirements.
        stackMapFrameHandler - A handler for translating and injecting stack map frames.
        instrumentedType - A description of the instrumented type.
        instrumentedMethod - A description of the instrumented method.
        suppressionHandler - The bound suppression handler that is used for suppressing exceptions of this advice method.
        Returns:
        A method visitor for visiting the advice method's byte code.
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object