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

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    Linux_aarch64  
    Linux_armv6hf  
    Linux_x86_64  
    macOS_x86_64  
    unsupported  
    Windows_x86  
  • Method Summary

    Modifier and Type Method Description
    static Architecture detect()  
    java.net.URL downloadUrl()  
    java.lang.String embeddedBinPath()  
    java.lang.String idiomaticExecutableSuffix()  
    boolean isUnixLike()  
    void makeExecutable​(java.nio.file.Path path)  
    static java.lang.String notSupportedMessage​(java.lang.String prefix)  
    static java.lang.String osArchKey()  
    static Architecture valueOf​(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.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static Architecture[] 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

      public static Architecture valueOf​(java.lang.String name)
      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 name
      java.lang.NullPointerException - if the argument is null
    • osArchKey

      public static java.lang.String osArchKey()
    • detect

      public static Architecture 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)