Package io.github.slimjar.relocation
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 Summary
ConstructorsConstructorDescriptionRelocationRule(@NotNull String original, @NotNull String relocated) RelocationRule(@NotNull String originalPackagePattern, @NotNull String relocatedPackagePattern, @NotNull Collection<String> exclusions, @NotNull Collection<String> inclusions) Creates an instance of aRelocationRulerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.@NotNull Collection<String>Returns the value of theexclusionsrecord component.inthashCode()Returns a hash code value for this object.@NotNull Collection<String>Returns the value of theinclusionsrecord component.@NotNull StringReturns the value of theoriginalPackagePatternrecord component.static @NotNull RelocationRule@NotNull StringReturns the value of therelocatedPackagePatternrecord component.@NotNull StringtoString()Returns a string representation of this record class.voidwrite(@NotNull DataOutput out)
-
Constructor Details
-
RelocationRule
-
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 aRelocationRulerecord class.- Parameters:
originalPackagePattern- the value for theoriginalPackagePatternrecord componentrelocatedPackagePattern- the value for therelocatedPackagePatternrecord componentexclusions- the value for theexclusionsrecord componentinclusions- the value for theinclusionsrecord component
-
-
Method Details
-
read
@NotNull @Contract(pure=true) public static @NotNull RelocationRule read(@NotNull @NotNull DataInput in) throws IOException - Throws:
IOException
-
write
- Throws:
IOException
-
equals
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 withObjects::equals(Object,Object). -
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. -
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. -
originalPackagePattern
Returns the value of theoriginalPackagePatternrecord component.- Returns:
- the value of the
originalPackagePatternrecord component
-
relocatedPackagePattern
Returns the value of therelocatedPackagePatternrecord component.- Returns:
- the value of the
relocatedPackagePatternrecord component
-
exclusions
Returns the value of theexclusionsrecord component.- Returns:
- the value of the
exclusionsrecord component
-
inclusions
Returns the value of theinclusionsrecord component.- Returns:
- the value of the
inclusionsrecord component
-