Record Class RelocationRule

java.lang.Object
java.lang.Record
io.github.slimjar.relocation.RelocationRule
All Implemented Interfaces:
Serializable

public record RelocationRule(@NotNull String originalPackagePattern, @NotNull String relocatedPackagePattern, @NotNull Collection<String> exclusions, @NotNull Collection<String> inclusions) extends Record implements Serializable
See Also:
  • Constructor Details

    • RelocationRule

      public RelocationRule(@NotNull @NotNull String original, @NotNull @NotNull String relocated)
    • RelocationRule

      public RelocationRule(@NotNull @NotNull String originalPackagePattern, @NotNull @NotNull String relocatedPackagePattern, @NotNull @NotNull Collection<String> exclusions, @NotNull @NotNull Collection<String> inclusions)
      Creates an instance of a RelocationRule record class.
      Parameters:
      originalPackagePattern - the value for the originalPackagePattern record component
      relocatedPackagePattern - the value for the relocatedPackagePattern record component
      exclusions - the value for the exclusions record component
      inclusions - the value for the inclusions record component
  • Method Details

    • read

      @NotNull @Contract(pure=true) public static @NotNull RelocationRule read(@NotNull @NotNull DataInput in) throws IOException
      Throws:
      IOException
    • write

      public void write(@NotNull @NotNull DataOutput out) throws IOException
      Throws:
      IOException
    • equals

      public boolean equals(@Nullable @Nullable Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      @NotNull public @NotNull String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • originalPackagePattern

      @NotNull public @NotNull String originalPackagePattern()
      Returns the value of the originalPackagePattern record component.
      Returns:
      the value of the originalPackagePattern record component
    • relocatedPackagePattern

      @NotNull public @NotNull String relocatedPackagePattern()
      Returns the value of the relocatedPackagePattern record component.
      Returns:
      the value of the relocatedPackagePattern record component
    • exclusions

      @NotNull public @NotNull Collection<String> exclusions()
      Returns the value of the exclusions record component.
      Returns:
      the value of the exclusions record component
    • inclusions

      @NotNull public @NotNull Collection<String> inclusions()
      Returns the value of the inclusions record component.
      Returns:
      the value of the inclusions record component