Enum Architecture
java.lang.Object
java.lang.Enum<Architecture>
dev.dimlight.maven.plugin.shellcheck.Architecture
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Architecture>,java.lang.constant.Constable
public enum Architecture extends java.lang.Enum<Architecture>
Light-hearted os/arch detection, just enough to pick up the shellcheck binary.
Some arch-dependent logic is also here.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description Linux_aarch64Linux_armv6hfLinux_x86_64macOS_x86_64unsupportedWindows_x86 -
Method Summary
Modifier and Type Method Description static Architecturedetect()java.net.URLdownloadUrl()java.lang.StringembeddedBinPath()java.lang.StringidiomaticExecutableSuffix()booleanisUnixLike()voidmakeExecutable(java.nio.file.Path path)static java.lang.StringnotSupportedMessage(java.lang.String prefix)static java.lang.StringosArchKey()static ArchitecturevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Architecture[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
osArchKey
public static java.lang.String osArchKey() -
detect
-
embeddedBinPath
public java.lang.String embeddedBinPath()- Returns:
- the path (within our jar) of the shellcheck binary, according to the architecture.
-
isUnixLike
public boolean isUnixLike() -
downloadUrl
public java.net.URL downloadUrl()- Returns:
- the default download url for the detected architecture.
-
makeExecutable
public void makeExecutable(java.nio.file.Path path) throws java.io.IOException- Throws:
java.io.IOException
-
idiomaticExecutableSuffix
public java.lang.String idiomaticExecutableSuffix()- Returns:
- the idiomatic suffix for executables dependending on os/arch, i.e. "" for nixes and ".exe" for win.
-
notSupportedMessage
public static java.lang.String notSupportedMessage(java.lang.String prefix)
-