Class ArrayLoadHook.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • hookDescriptor

        public ArrayLoadHook.Builder hookDescriptor​(HookDescriptor hookDescriptor)
        Sets the hook method invoked at each instrumented array load.
        Parameters:
        hookDescriptor - the hook method descriptor
        Returns:
        this builder
      • enabled

        public ArrayLoadHook.Builder enabled​(boolean enabled)
        Sets whether the hook is active.
        Parameters:
        enabled - true to enable the hook
        Returns:
        this builder
      • priority

        public ArrayLoadHook.Builder priority​(int priority)
        Sets the ordering priority relative to other hooks.
        Parameters:
        priority - the priority value
        Returns:
        this builder
      • passArray

        public ArrayLoadHook.Builder passArray​(boolean passArray)
        Sets whether the array reference is passed to the hook.
        Parameters:
        passArray - true to pass the array reference
        Returns:
        this builder
      • passIndex

        public ArrayLoadHook.Builder passIndex​(boolean passIndex)
        Sets whether the array index is passed to the hook.
        Parameters:
        passIndex - true to pass the index
        Returns:
        this builder
      • passValue

        public ArrayLoadHook.Builder passValue​(boolean passValue)
        Sets whether the loaded value is passed to the hook.
        Parameters:
        passValue - true to pass the loaded value
        Returns:
        this builder
      • arrayTypeFilter

        public ArrayLoadHook.Builder arrayTypeFilter​(String arrayTypeFilter)
        Sets the array element type filter; null instruments all array types.
        Parameters:
        arrayTypeFilter - the array type descriptor to match
        Returns:
        this builder
      • build

        public ArrayLoadHook build()
        Builds the configured array load hook.
        Returns:
        the new hook