AbiFormatter

public class AbiFormatter
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.AbiFormatter


Utility class for abi.

Summary

Constants

String ABI_REGEX

Special marker to be used as a placeholder in strings, that can be then replaced with the help of formatCmdForAbi(String, String).

String FORCE_ABI_DESCRIPTION

String FORCE_ABI_STRING

Public constructors

AbiFormatter()

Public methods

static String formatCmdForAbi(String str, String abi)

Helper method that formats a given string to include abi specific values to it by replacing a given marker.

static String getDefaultAbi(ITestDevice device, String bitness)

Helper method to get the default abi name for the given bitness

static String[] getSupportedAbis(ITestDevice device, String bitness)

Helper method to get the list of supported abis for the given bitness

Constants

ABI_REGEX

String ABI_REGEX

Special marker to be used as a placeholder in strings, that can be then replaced with the help of formatCmdForAbi(String, String).

Constant Value: "\|#ABI(\d*)#\|"

FORCE_ABI_DESCRIPTION

String FORCE_ABI_DESCRIPTION

Constant Value: "The abi to use, can be either 32 or 64."

FORCE_ABI_STRING

String FORCE_ABI_STRING

Constant Value: "force-abi"

Public constructors

AbiFormatter

AbiFormatter ()

Public methods

formatCmdForAbi

String formatCmdForAbi (String str, 
                String abi)

Helper method that formats a given string to include abi specific values to it by replacing a given marker.

Parameters
str String: String to format which includes special markers | .ABI_REGEX to be replaced
abi String: String of the abi we desire to run on.
Returns
String formatted string.

getDefaultAbi

String getDefaultAbi (ITestDevice device, 
                String bitness)

Helper method to get the default abi name for the given bitness

Returns
String the default abi name for the given abi
Throws
DeviceNotAvailableException

getSupportedAbis

String[] getSupportedAbis (ITestDevice device, 
                String bitness)

Helper method to get the list of supported abis for the given bitness

Parameters
bitness String: 32 or 64
Returns
String[] the supported abi list of that bitness
Throws
DeviceNotAvailableException