Class ArrayStoreHook.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • hookDescriptor

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

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

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

        public ArrayStoreHook.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 ArrayStoreHook.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 ArrayStoreHook.Builder passValue​(boolean passValue)
        Sets whether the stored value is passed to the hook.
        Parameters:
        passValue - true to pass the stored value
        Returns:
        this builder
      • canModifyValue

        public ArrayStoreHook.Builder canModifyValue​(boolean canModifyValue)
        Sets whether the hook's return value replaces the stored value.
        Parameters:
        canModifyValue - true to let the hook substitute the value
        Returns:
        this builder
      • arrayTypeFilter

        public ArrayStoreHook.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 ArrayStoreHook build()
        Builds the configured array store hook.
        Returns:
        the new hook