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
ConstructorDescriptionGoModuleInfo
(String path, String version, String sum, GoModuleInfo replace) Creates an instance of aGoModuleInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionasKeyValuePairs
(String prefix) Returns the values in this object as elements of a map.final boolean
Indicates whether some other object is "equal to" this one.static GoModuleInfo
fromString
(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 int
hashCode()
Returns a hash code value for this object.path()
Returns the value of thepath
record component.replace()
Returns the value of thereplace
record component.sum()
Returns the value of thesum
record component.final String
toString()
Returns a string representation of this record class.version()
Returns the value of theversion
record 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 thepath
record component.- Returns:
- the value of the
path
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-
sum
Returns the value of thesum
record component.- Returns:
- the value of the
sum
record component
-
replace
Returns the value of thereplace
record component.- Returns:
- the value of the
replace
record component
-