Class Advice.ArgumentHandler.ForInstrumentedMethod.Default

    • Field Detail

      • instrumentedMethod

        protected final MethodDescription instrumentedMethod
        The instrumented method.
      • exitType

        protected final TypeDefinition exitType
        The exit type or void if no exit type is defined.
      • namedTypes

        protected final java.util.TreeMap<java.lang.String,​TypeDefinition> namedTypes
        A mapping of all available local variables by their name to their type.
      • enterType

        protected final TypeDefinition enterType
        The enter type or void if no enter type is defined.
    • Constructor Detail

      • Default

        protected Default​(MethodDescription instrumentedMethod,
                          TypeDefinition exitType,
                          java.util.TreeMap<java.lang.String,​TypeDefinition> namedTypes,
                          TypeDefinition enterType)
        Creates a new default argument handler for an instrumented method.
        Parameters:
        instrumentedMethod - The instrumented method.
        exitType - The exit type or void if no exit type is defined.
        namedTypes - A mapping of all available local variables by their name to their type.
        enterType - The enter type or void if no enter type is defined.
    • Method Detail

      • exit

        public int exit()
        Resolves the offset of the exit value of the exit advice.
        Specified by:
        exit in interface Advice.ArgumentHandler
        Returns:
        The offset of the exit value.
      • named

        public int named​(java.lang.String name)
        Returns the offset of the local variable with the given name.
        Specified by:
        named in interface Advice.ArgumentHandler
        Parameters:
        name - The name of the local variable being accessed.
        Returns:
        The named variable's offset.
      • enter

        public int enter()
        Resolves the offset of the enter value of the enter advice.
        Specified by:
        enter in interface Advice.ArgumentHandler
        Returns:
        The offset of the enter value.
      • returned

        public int returned()
        Resolves the offset of the returned value of the instrumented method.
        Specified by:
        returned in interface Advice.ArgumentHandler
        Returns:
        The offset of the returned value of the instrumented method.
      • thrown

        public int thrown()
        Resolves the offset of the thrown exception of the instrumented method.
        Specified by:
        thrown in interface Advice.ArgumentHandler
        Returns:
        The offset of the thrown exception of the instrumented method.