public class ArchUtils
extends java.lang.Object
Important: The os.arch System Property returns the architecture used by the JVM not of the operating system.
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,Processor> |
ARCH_TO_PROCESSOR |
Constructor and Description |
---|
ArchUtils() |
Modifier and Type | Method and Description |
---|---|
private static void |
addProcessor(java.lang.String key,
Processor processor)
Adds the given
Processor with the given key String to the map. |
private static void |
addProcessors(Processor processor,
java.lang.String... keys)
Adds the given
Processor with the given keys to the map. |
static Processor |
getProcessor()
Returns a
Processor object of the current JVM. |
static Processor |
getProcessor(java.lang.String value)
Returns a
Processor object the given value String . |
private static void |
init_IA64_32Bit() |
private static void |
init_IA64_64Bit() |
private static void |
init_PPC_32Bit() |
private static void |
init_PPC_64Bit() |
private static void |
init_X86_32Bit() |
private static void |
init_X86_64Bit() |
private static void |
init() |
private static final java.util.Map<java.lang.String,Processor> ARCH_TO_PROCESSOR
private static void init()
private static void init_X86_32Bit()
private static void init_X86_64Bit()
private static void init_IA64_32Bit()
private static void init_IA64_64Bit()
private static void init_PPC_32Bit()
private static void init_PPC_64Bit()
private static void addProcessor(java.lang.String key, Processor processor) throws java.lang.IllegalStateException
Processor
with the given key String
to the map.key
- The key as String
.processor
- The Processor
to add.java.lang.IllegalStateException
- If the key already exists.private static void addProcessors(Processor processor, java.lang.String... keys) throws java.lang.IllegalStateException
Processor
with the given keys to the map.keys
- The keys.processor
- The Processor
to add.java.lang.IllegalStateException
- If the key already exists.public static Processor getProcessor()
Processor
object of the current JVM.
Important: The os.arch System Property returns the architecture used by the JVM not of the operating system.
Processor
when supported, else null
.public static Processor getProcessor(java.lang.String value)
Processor
object the given value String
. The String
must be
like a value returned by the os.arch System Property.value
- A String
like a value returned by the os.arch System Property.Processor
when it exists, else null
.