Class Advice.AssignReturned.ToFields.Handler

    • Field Detail

      • index

        private final int index
        The index in the array that is returned which represents the assigned value or a negative value if assigning a scalar value.
      • name

        private final java.lang.String name
        The accessed field's name or an empty string if the field name should be inferred from the method's accessor name.
      • declaringType

        private final TypeDescription declaringType
        The field's declaring type or void if the type should be found within the instrumented type's hierarchy.
      • typing

        private final Assigner.Typing typing
        The typing to apply when assigning the returned value to the targeted value.
    • Constructor Detail

      • Handler

        protected Handler​(int index,
                          java.lang.String name,
                          TypeDescription declaringType,
                          Assigner.Typing typing)
        Creates a new handler for a Advice.AssignReturned.ToReturned annotation.
        Parameters:
        index - The index in the array that is returned which represents the assigned value or a negative value if assigning a scalar value.
        name - The accessed field's name or an empty string if the field name should be inferred from the method's accessor name.
        declaringType - The field's declaring type or void if the type should be found within the instrumented type's hierarchy.
        typing - The typing to apply when assigning the returned value to the targeted value.
    • Method Detail

      • getIndex

        public int getIndex()
        Returns the array offset which this handler intends to assign or a negative value if this handler intends to assign a scalar value.
        Specified by:
        getIndex in interface Advice.AssignReturned.Handler
        Returns:
        The array offset which this handler intends to assign or a negative value if this handler intends to assign a scalar value.