Record Class GoModuleInfo
java.lang.Object
java.lang.Record
ghidra.app.util.bin.format.golang.GoModuleInfo
- Record Components:
path- module pathversion- module versionsum- checksumreplace- replacement module info (may be null)
public record GoModuleInfo(String path, String version, String sum, GoModuleInfo replace)
extends Record
Represents information about a single golang module dependency.
-
Constructor Summary
ConstructorsConstructorDescriptionGoModuleInfo(String path, String version, String sum, GoModuleInfo replace) Creates an instance of aGoModuleInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionasKeyValuePairs(String prefix) Returns the values in this object as elements of a map.final booleanIndicates whether some other object is "equal to" this one.static GoModuleInfofromString(String s, GoModuleInfo replace) Parses a GoModuleInfo from a formatted string "path[tab]version[tab]checksum".Returns a formatted version of the information in this instance.final inthashCode()Returns a hash code value for this object.path()Returns the value of thepathrecord component.replace()Returns the value of thereplacerecord component.sum()Returns the value of thesumrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
Method Details
-
fromString
Parses a GoModuleInfo from a formatted string "path[tab]version[tab]checksum".- Parameters:
s- string to parsereplace- GoModuleInfo that is the replacement for this module, or null if no replacement specified- Returns:
- new GoModuleInfo instance, never null
- Throws:
IOException- if error parsing string
-
getFormattedString
Returns a formatted version of the information in this instance.- Returns:
- formatted string
-
asKeyValuePairs
Returns the values in this object as elements of a map.- Parameters:
prefix- String prefix to put in front of each value name- Returns:
- map of String → 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. -
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). -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
sum
Returns the value of thesumrecord component.- Returns:
- the value of the
sumrecord component
-
replace
Returns the value of thereplacerecord component.- Returns:
- the value of the
replacerecord component
-