Class GoVer
java.lang.Object
ghidra.app.util.bin.format.golang.GoVer
- All Implemented Interfaces:
Comparable<GoVer>
Golang version numbers
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
static GoVer
fromProgramProperties
(Program program) int
getMajor()
Major valueint
getMinor()
Minor valueint
hashCode()
boolean
Returns true if this version is between the specified min and max versions (inclusive).boolean
Compares this version to the specified other version and returns true if this version is greater than or equal to the other version.boolean
boolean
static GoVer
Parses a version string ("1.2") and returns a GoVer instance, or INVALID if no matching version or bad data.static void
toString()
-
Field Details
-
INVALID
-
ANY
-
V1_2
-
V1_16
-
V1_17
-
V1_18
-
GOLANG_VERSION_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
GoVer
public GoVer(int major, int minor)
-
-
Method Details
-
isInvalid
public boolean isInvalid() -
isWildcard
public boolean isWildcard() -
getMajor
public int getMajor()Major value- Returns:
- major
-
getMinor
public int getMinor()Minor value- Returns:
- minor
-
compareTo
- Specified by:
compareTo
in interfaceComparable<GoVer>
-
isAtLeast
Compares this version to the specified other version and returns true if this version is greater than or equal to the other version.- Parameters:
otherVersion
- version info to compare- Returns:
- true if this version is gte other version
-
inRange
Returns true if this version is between the specified min and max versions (inclusive).- Parameters:
min
- minimum version to allow (inclusive)max
- maximum version to allow (inclusive)- Returns:
- boolean true if this version is between the specified min and max versions
-
parse
Parses a version string ("1.2") and returns a GoVer instance, or INVALID if no matching version or bad data.- Parameters:
s
- string to parse- Returns:
- GoVer instance, or INVALID
-
fromProgramProperties
-
setProgramPropertiesWithOriginalVersionString
-
hashCode
public int hashCode() -
equals
-
toString
-