Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
TfObjectTracker
public
class
TfObjectTracker
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.invoker.logger.TfObjectTracker
|
Utilitas untuk melacak penggunaan berbagai objek Federasi Perdagangan.
Ringkasan
Metode publik |
static
void
|
clearTracking()
Berhenti melacak pemanggilan saat ini.
|
static
void
|
countWithParents(Class<?> object)
Menghitung kemunculan class tertentu dan class supernya hingga antarmuka Tradefed.
|
static
void
|
directCount(String className, long occurrences)
Menghitung satu class dan kemunculan class tersebut secara eksplisit
|
static
|
getUsage()
Menampilkan penggunaan objek yang dilacak.
|
Kolom
TF_OBJECTS_TRACKING_KEY
public static final String TF_OBJECTS_TRACKING_KEY
Metode publik
clearTracking
public static void clearTracking ()
Berhenti melacak pemanggilan saat ini. Ini dipanggil secara otomatis oleh harness.
countWithParents
public static void countWithParents (Class<?> object)
Menghitung kemunculan class tertentu dan class supernya hingga antarmuka Tradefed.
directCount
public static void directCount (String className,
long occurrences)
Menghitung satu class dan kemunculan class tersebut secara eksplisit
Parameter |
className |
String : Objek yang akan dilacak |
occurrences |
long : jumlah kemunculan yang diketahui saat ini |
getUsage
public static getUsage ()
Menampilkan penggunaan objek yang dilacak.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# TfObjectTracker\n===============\n\n\n`\npublic\n\n\nclass\nTfObjectTracker\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.invoker.logger.TfObjectTracker |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA utility to track the usage of the different Trade Fedederation objects.\n\nSummary\n-------\n\n| ### Fields ||\n|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public static final String` | [TF_OBJECTS_TRACKING_KEY](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#TF_OBJECTS_TRACKING_KEY) |\n\n| ### Public methods ||\n|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static void` | ` `[clearTracking](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#clearTracking())`() ` Stop tracking the current invocation. |\n| ` static void` | ` `[countWithParents](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#countWithParents(java.lang.Class\u003c?\u003e))`(Class\u003c?\u003e object) ` Count the occurrence of a give class and its super classes until the Tradefed interface. |\n| ` static void` | ` `[directCount](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#directCount(java.lang.String,%20long))`(String className, long occurrences) ` Count explicitly one class and its occurrences |\n| ` static ` | ` `[getUsage](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#getUsage())`() ` Returns the usage of the tracked objects. |\n\nFields\n------\n\n### TF_OBJECTS_TRACKING_KEY\n\n```\npublic static final String TF_OBJECTS_TRACKING_KEY\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### clearTracking\n\n```\npublic static void clearTracking ()\n```\n\nStop tracking the current invocation. This is called automatically by the harness.\n\n\u003cbr /\u003e\n\n### countWithParents\n\n```\npublic static void countWithParents (Class\u003c?\u003e object)\n```\n\nCount the occurrence of a give class and its super classes until the Tradefed interface.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------|\n| `object` | `Class` \u003cbr /\u003e |\n\n### directCount\n\n```\npublic static void directCount (String className, \n long occurrences)\n```\n\nCount explicitly one class and its occurrences\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|-------------------------------------------------|\n| `className` | `String`: The object to track \u003cbr /\u003e |\n| `occurrences` | `long`: current num of known occurrences \u003cbr /\u003e |\n\n### getUsage\n\n```\npublic static getUsage ()\n```\n\nReturns the usage of the tracked objects.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |"]]