Record Class GoVer
java.lang.Object
java.lang.Record
ghidra.app.util.bin.format.golang.GoVer
- Record Components:
major- currently just 1minor- second part of version number, ranges from 0..unknown upper limitpatch- third part of version number, ranges from 0..unknown upper limit per minor version
- All Implemented Interfaces:
Comparable<GoVer>
Represents a Go version number (major.minor.patch), with some special sentinel values
for wildcarding.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGoVer(int major, int minor, int patch) Creates an instance of aGoVerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.static GoVerfromProgramProperties(Program program) Parses a version string found in a Ghidra program info properties listintgetMajor()Returns major value.intgetMinor()Returns minor value.intgetPatch()Returns patch value.final inthashCode()Returns a hash code value for this object.booleanbooleanintmajor()Returns the value of themajorrecord component.intminor()Returns the value of theminorrecord component.static GoVerParses a version string ("1.2.0") and returns a GoVer instance, or INVALID if bad data.static GoVerParses a version string ("1.2.0") and returns a GoVer instance, or INVALID if bad data.intpatch()Returns the value of thepatchrecord component.static voidWrites a version string to a Ghidra program info properties list.toString()Returns a string representation of this record class.withPatch(int newPatchNum)
-
Field Details
-
GOLANG_VERSION_PROPERTY_NAME
- See Also:
-
INVALID
-
ANY
-
-
Constructor Details
-
GoVer
-
-
Method Details
-
parse
-
parseWildcardPatch
-
fromProgramProperties
-
setProgramPropertiesWithOriginalVersionString
-
isInvalid
public boolean isInvalid() -
isWildcard
public boolean isWildcard() -
getMajor
public int getMajor()Returns major value.- Returns:
- major value
-
getMinor
public int getMinor()Returns minor value.- Returns:
- minor value
-
getPatch
public int getPatch()Returns patch value.- Returns:
- patch value
-
prevPatch
-
withPatch
-
compareTo
- Specified by:
compareToin interfaceComparable<GoVer>
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
major
-
minor
-
patch
-