Class GoVer
java.lang.Object
ghidra.app.util.bin.format.golang.GoVer
- All Implemented Interfaces:
Comparable<GoVer>
Golang version numbers
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic GoVerfromProgramProperties(Program program) intgetMajor()Major valueintgetMinor()Minor valueinthashCode()booleanReturns true if this version is between the specified min and max versions (inclusive).booleanCompares this version to the specified other version and returns true if this version is greater than or equal to the other version.booleanbooleanstatic GoVerParses a version string ("1.2") and returns a GoVer instance, or INVALID if no matching version or bad data.static voidtoString()
-
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:
compareToin 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
-