Package com.diffplug.common.swt.os
Enum Arch
- java.lang.Object
-
- java.lang.Enum<Arch>
-
- com.diffplug.common.swt.os.Arch
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArchgetNative()Returns the Arch for the native platform: 32-bit JVM on 64-bit Windows returns Arch.x64.static ArchgetRunning()Returns the Arch for the native platform: 32-bit JVM on 64-bit Windows returns Arch.x86.static java.lang.UnsupportedOperationExceptionunsupportedException(Arch arch)Returns an UnsupportedOperationException for the given arch.static ArchvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Arch[]values()Returns an array containing the constants of this enum type, in the order they are declared.<T> Tx64arm64(T val64, T arm64)Returns the appropriate value depending on the arch.<T> Tx86x64(T val86, T val64)Returns the appropriate value depending on the arch.<T> Tx86x64arm64(T val86, T val64, T arm64)Returns the appropriate value depending on the arch.<T> Tx86x64arm64unknown(T val86, T val64, T arm64, T unknown)Returns the appropriate value depending on the arch.
-
-
-
Method Detail
-
values
public static Arch[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Arch c : Arch.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Arch 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 namejava.lang.NullPointerException- if the argument is null
-
x86x64
public <T> T x86x64(T val86, T val64)Returns the appropriate value depending on the arch.
-
x64arm64
public <T> T x64arm64(T val64, T arm64)Returns the appropriate value depending on the arch.
-
x86x64arm64
public <T> T x86x64arm64(T val86, T val64, T arm64)Returns the appropriate value depending on the arch.
-
x86x64arm64unknown
public <T> T x86x64arm64unknown(T val86, T val64, T arm64, T unknown)Returns the appropriate value depending on the arch.
-
getNative
public static Arch getNative()
Returns the Arch for the native platform: 32-bit JVM on 64-bit Windows returns Arch.x64.
-
getRunning
public static Arch getRunning()
Returns the Arch for the native platform: 32-bit JVM on 64-bit Windows returns Arch.x86.
-
unsupportedException
public static java.lang.UnsupportedOperationException unsupportedException(Arch arch)
Returns an UnsupportedOperationException for the given arch.
-
-