À partir du 27 mars 2025, nous vous recommandons d'utiliser android-latest-release
au lieu de aosp-main
pour créer et contribuer à AOSP. Pour en savoir plus, consultez la section Modifications apportées à AOSP.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
public
class
AbiFormatter
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.AbiFormatter
|
Classe utilitaire pour l'ABI.
Résumé
Méthodes publiques |
static
String
|
formatCmdForAbi(String str, String abi)
Méthode d'assistance qui met en forme une chaîne donnée pour y inclure des valeurs spécifiques à l'ABI en remplaçant un repère donné.
|
static
String
|
getDefaultAbi(ITestDevice device, String bitness)
Méthode d'assistance permettant d'obtenir le nom de l'ABI par défaut pour la taille d'octet donnée
|
static
String[]
|
getSupportedAbis(ITestDevice device, String bitness)
Méthode d'assistance permettant d'obtenir la liste des ABI compatibles pour la taille d'octet donnée
|
Champs
FORCE_ABI_DESCRIPTION
public static final String FORCE_ABI_DESCRIPTION
FORCE_ABI_STRING
public static final String FORCE_ABI_STRING
Constructeurs publics
Méthodes publiques
public static String formatCmdForAbi (String str,
String abi)
Méthode d'assistance qui met en forme une chaîne donnée pour y inclure des valeurs spécifiques à l'ABI en remplaçant un repère donné.
Paramètres |
str |
String : String à mettre en forme, y compris les repères spéciaux |
.ABI_REGEX à remplacer |
abi |
String : String de l'ABI sur laquelle nous souhaitons exécuter. |
Renvoie |
String |
chaîne formatée. |
getDefaultAbi
public static String getDefaultAbi (ITestDevice device,
String bitness)
Méthode d'assistance permettant d'obtenir le nom de l'ABI par défaut pour la taille d'octet donnée
Renvoie |
String |
Nom de l'ABI par défaut pour l'ABI donnée. Renvoie la valeur "null" en cas de problème. |
getSupportedAbis
public static String[] getSupportedAbis (ITestDevice device,
String bitness)
Méthode d'assistance permettant d'obtenir la liste des ABI compatibles pour la taille d'octet donnée
Paramètres |
bitness |
String : 32 ou 64 ou chaîne vide |
Renvoie |
String[] |
la liste des ABI compatibles avec cette taille d'octet |
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/27 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/27 (UTC)."],[],[],null,["# AbiFormatter\n============\n\n\n`\npublic\n\n\nclass\nAbiFormatter\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|----------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.util.AbiFormatter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nUtility class for abi.\n\nSummary\n-------\n\n| ### Fields ||\n|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| ` public static final String` | [FORCE_ABI_DESCRIPTION](../../../../../../reference/tradefed/com/android/tradefed/util/AbiFormatter.html#FORCE_ABI_DESCRIPTION) |\n| ` public static final String` | [FORCE_ABI_STRING](../../../../../../reference/tradefed/com/android/tradefed/util/AbiFormatter.html#FORCE_ABI_STRING) |\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[AbiFormatter](../../../../../../reference/tradefed/com/android/tradefed/util/AbiFormatter.html#AbiFormatter())`() ` |\n\n| ### Public methods ||\n|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static String` | ` `[formatCmdForAbi](../../../../../../reference/tradefed/com/android/tradefed/util/AbiFormatter.html#formatCmdForAbi(java.lang.String,%20java.lang.String))`(String str, String abi) ` Helper method that formats a given string to include abi specific values to it by replacing a given marker. |\n| ` static String` | ` `[getDefaultAbi](../../../../../../reference/tradefed/com/android/tradefed/util/AbiFormatter.html#getDefaultAbi(com.android.tradefed.device.ITestDevice,%20java.lang.String))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device, String bitness) ` Helper method to get the default abi name for the given bitness |\n| ` static String[]` | ` `[getSupportedAbis](../../../../../../reference/tradefed/com/android/tradefed/util/AbiFormatter.html#getSupportedAbis(com.android.tradefed.device.ITestDevice,%20java.lang.String))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device, String bitness) ` Helper method to get the list of supported abis for the given bitness |\n\nFields\n------\n\n### FORCE_ABI_DESCRIPTION\n\n```\npublic static final String FORCE_ABI_DESCRIPTION\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### FORCE_ABI_STRING\n\n```\npublic static final String FORCE_ABI_STRING\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic constructors\n-------------------\n\n### AbiFormatter\n\n```\npublic AbiFormatter ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### formatCmdForAbi\n\n```\npublic static String formatCmdForAbi (String str, \n String abi)\n```\n\nHelper method that formats a given string to include abi specific\nvalues to it by replacing a given marker.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `str` | `String`: [String](../../../../../../reference/tradefed/java/lang/String.html) to format which includes special markers \\| [.ABI_REGEX](../../../../../../) to be replaced \u003cbr /\u003e |\n| `abi` | `String`: [String](../../../../../../reference/tradefed/java/lang/String.html) of the abi we desire to run on. \u003cbr /\u003e |\n\n| Returns ||\n|----------|--------------------------|\n| `String` | formatted string. \u003cbr /\u003e |\n\n### getDefaultAbi\n\n```\npublic static String getDefaultAbi (ITestDevice device, \n String bitness)\n```\n\nHelper method to get the default abi name for the given bitness\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------------------------------------------------------------------------------------|\n| `String` | the default abi name for the given abi. Returns null if something went wrong. \u003cbr /\u003e |\n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| | com.android.tradefed.device.DeviceNotAvailableException |\n| [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |\n\n### getSupportedAbis\n\n```\npublic static String[] getSupportedAbis (ITestDevice device, \n String bitness)\n```\n\nHelper method to get the list of supported abis for the given bitness\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|-------------------------------------------|\n| `bitness` | `String`: 32 or 64 or empty string \u003cbr /\u003e |\n\n| Returns ||\n|------------|-----------------------------------------------|\n| `String[]` | the supported abi list of that bitness \u003cbr /\u003e |\n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| | com.android.tradefed.device.DeviceNotAvailableException |\n| [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |"]]