Record Class BuildInfo
java.lang.Object
java.lang.Record
com.palmergames.bukkit.towny.object.BuildInfo
- Record Components:
commit
- The full SHA-1 hash of the most recent commit.commitShort
- The shortened hash of the most recent commit.branch
- The branch this jar was built from.repositoryUrl
- The url for the remote git repository.message
- The subject of the most recent commit.
@Internal
public record BuildInfo(String commit, String commitShort, String branch, String repositoryUrl, String message)
extends Record
Represents git build information for a Towny jar file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbranch()
Returns the value of thebranch
record component.commit()
Returns the value of thecommit
record component.Returns the value of thecommitShort
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.message()
Returns the value of themessage
record component.Returns the value of therepositoryUrl
record component.static BuildInfo
retrieveBuildInfo
(Towny plugin) final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
BuildInfo
public BuildInfo(String commit, String commitShort, String branch, String repositoryUrl, String message) Creates an instance of aBuildInfo
record class.- Parameters:
commit
- the value for thecommit
record componentcommitShort
- the value for thecommitShort
record componentbranch
- the value for thebranch
record componentrepositoryUrl
- the value for therepositoryUrl
record componentmessage
- the value for themessage
record component
-
-
Method Details
-
retrieveBuildInfo
- Throws:
IOException
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
commit
Returns the value of thecommit
record component.- Returns:
- the value of the
commit
record component
-
commitShort
Returns the value of thecommitShort
record component.- Returns:
- the value of the
commitShort
record component
-
branch
Returns the value of thebranch
record component.- Returns:
- the value of the
branch
record component
-
repositoryUrl
Returns the value of therepositoryUrl
record component.- Returns:
- the value of the
repositoryUrl
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-