Top Description Fields Constructors Methods
org.apache.commons.lang3

public Class ArchUtils

extends Object
Class Inheritance
Imports
java.util.HashMap, .Map, org.apache.commons.lang3.arch.Processor, org.apache.commons.lang3.stream.Streams

Provides methods for identifying the architecture of the current JVM based on the "os.arch" system property.

Important Note

The "os.arch" system property returns the architecture used by the JVM not of the operating system.

Since
3.6

Field Summary

Modifier and TypeField and Description
private static final Map<String, Processor>

Constructor Summary

AccessConstructor and Description
public
ArchUtils()
Deprecated TODO Make private in 4.0.

Make private in 4.0.

Method Summary

Modifier and TypeMethod and Description
private static void
addProcessor(final String
The key as String.
key
,
final Processor
The Processor to add.
processor
)

Adds the given Processor with the given key String to the map.

private static void
addProcessors(final Processor
The Processor to add.
processor
,
final String...
The keys.
keys
)

Adds the given Processor with the given keys to the map.

public static Processor

Returns:

A Processor when supported, else null.
getProcessor
()

Gets a Processor object of the current JVM.

public static Processor

Returns:

A Processor when it exists, else null.
getProcessor
(final String
A String like a value returned by the os.arch System Property.
value
)

Gets a Processor object the given value String.

private static void
init()

private static void
private static void
private static void
private static void
private static void
private static void
private static void
private static void
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ARCH_TO_PROCESSORback to summary
private static final Map<String, Processor> ARCH_TO_PROCESSOR

Constructor Detail

ArchUtilsback to summary
public ArchUtils()

Deprecated

TODO Make private in 4.0.

Make private in 4.0.

Annotations
@Deprecated

Method Detail

addProcessorback to summary
private static void addProcessor(final String key, final Processor processor)

Adds the given Processor with the given key String to the map.

Parameters
key:String

The key as String.

processor:Processor

The Processor to add.

Exceptions
IllegalStateException:
If the key already exists.
addProcessorsback to summary
private static void addProcessors(final Processor processor, final String... keys)

Adds the given Processor with the given keys to the map.

Parameters
processor:Processor

The Processor to add.

keys:String[]

The keys.

Exceptions
IllegalStateException:
If the key already exists.
getProcessorback to summary
public static Processor getProcessor()

Gets a Processor object of the current JVM.

Important Note

The "os.arch" system property returns the architecture used by the JVM not of the operating system.

Returns:Processor

A Processor when supported, else null.

getProcessorback to summary
public static Processor getProcessor(final String value)

Gets a Processor object the given value String. The String must be like a value returned by the "os.arch" system property.

Parameters
value:String

A String like a value returned by the os.arch System Property.

Returns:Processor

A Processor when it exists, else null.

initback to summary
private static void init()
init_Aarch_64Bitback to summary
private static void init_Aarch_64Bit()
init_IA64_32Bitback to summary
private static void init_IA64_32Bit()
init_IA64_64Bitback to summary
private static void init_IA64_64Bit()
init_PPC_32Bitback to summary
private static void init_PPC_32Bit()
init_PPC_64Bitback to summary
private static void init_PPC_64Bit()
init_RISCV_32Bitback to summary
private static void init_RISCV_32Bit()
init_RISCV_64Bitback to summary
private static void init_RISCV_64Bit()
init_X86_32Bitback to summary
private static void init_X86_32Bit()
init_X86_64Bitback to summary
private static void init_X86_64Bit()