Class HookDescriptor.Builder

  • Enclosing class:
    HookDescriptor

    public static class HookDescriptor.Builder
    extends Object
    Builder for HookDescriptor instances.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • owner

        public HookDescriptor.Builder owner​(String owner)
        Sets the hook class internal name.
        Parameters:
        owner - the owner class internal name
        Returns:
        this builder
      • name

        public HookDescriptor.Builder name​(String name)
        Sets the hook method name.
        Parameters:
        name - the hook method name
        Returns:
        this builder
      • descriptor

        public HookDescriptor.Builder descriptor​(String descriptor)
        Sets the hook method descriptor.
        Parameters:
        descriptor - the hook method descriptor
        Returns:
        this builder
      • invokeType

        public HookDescriptor.Builder invokeType​(InvokeType invokeType)
        Sets the invocation type used to call the hook.
        Parameters:
        invokeType - the invocation type
        Returns:
        this builder
      • replacesValue

        public HookDescriptor.Builder replacesValue​(boolean replacesValue)
        Sets whether the hook's return value replaces the original value.
        Parameters:
        replacesValue - true if the hook result replaces the value
        Returns:
        this builder
      • build

        public HookDescriptor build()
        Builds the hook descriptor.
        Returns:
        the built HookDescriptor