Record Class GoModuleInfo
java.lang.Object
java.lang.Record
ghidra.app.util.bin.format.golang.GoModuleInfo
- Record Components:
- path- module path
- version- module version
- sum- checksum
- replace- 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 SummaryConstructorsConstructorDescriptionGoModuleInfo(String path, String version, String sum, GoModuleInfo replace) Creates an instance of aGoModuleInforecord class.
- 
Method SummaryModifier 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- 
fromStringParses a GoModuleInfo from a formatted string "path[tab]version[tab]checksum".- Parameters:
- s- string to parse
- replace- 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
 
- 
getFormattedStringReturns a formatted version of the information in this instance.- Returns:
- formatted string
 
- 
asKeyValuePairsReturns 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
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
pathReturns the value of thepathrecord component.- Returns:
- the value of the pathrecord component
 
- 
versionReturns the value of theversionrecord component.- Returns:
- the value of the versionrecord component
 
- 
sumReturns the value of thesumrecord component.- Returns:
- the value of the sumrecord component
 
- 
replaceReturns the value of thereplacerecord component.- Returns:
- the value of the replacerecord component
 
 
-