Class Hook.Smart

java.lang.Object
com.jcabi.github.Hook.Smart
All Implemented Interfaces:
Hook, JsonReadable
Enclosing interface:
Hook

@Immutable @Loggable(1) public static final class Hook.Smart extends Object implements Hook
Smart Hook with extra features.
Since:
0.8
  • Constructor Details

    • Smart

      public Smart(Hook hoo)
      Public ctor.
      Parameters:
      hoo - Hook
  • Method Details

    • name

      public String name() throws IOException
      Get its name.
      Returns:
      Name of hook
      Throws:
      IOException - If there is any I/O problem
    • repo

      public Repo repo()
      Description copied from interface: Hook
      Repository we're in.
      Specified by:
      repo in interface Hook
      Returns:
      Repo
    • number

      public int number()
      Description copied from interface: Hook
      Get its number.
      Specified by:
      number in interface Hook
      Returns:
      Hook number
    • json

      public jakarta.json.JsonObject json() throws IOException
      Description copied from interface: JsonReadable
      Describe it in a JSON object.
      Specified by:
      json in interface JsonReadable
      Returns:
      JSON object
      Throws:
      IOException - If there is any I/O problem