自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
TombstoneParser
public
class
TombstoneParser
extends Object
java.lang.Object
|
↳ |
com.android.sts.common.util.TombstoneParser
|
解析墓碑文件或 Logcat 中的墓碑。
摘要
公共方法 |
static
final
List<TombstoneProtos.Tombstone>
|
parseLogcat(String logcat)
解析 Logcat 代码段并构建墓碑列表
|
static
long
|
parsePointer(String pointerString)
|
static
boolean
|
parseTombstone(String tombstoneBlob, TombstoneProtos.Tombstone.Builder tombstoneBuilder)
|
公共构造函数
TombstoneParser
public TombstoneParser ()
公共方法
parseLogcat
public static final List<TombstoneProtos.Tombstone> parseLogcat (String logcat)
解析 Logcat 代码段并构建墓碑列表
返回 |
List<TombstoneProtos.Tombstone> |
|
parsePointer
public static long parsePointer (String pointerString)
parseTombstone
public static boolean parseTombstone (String tombstoneBlob,
TombstoneProtos.Tombstone.Builder tombstoneBuilder)
参数 |
tombstoneBlob |
String |
tombstoneBuilder |
TombstoneProtos.Tombstone.Builder |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# TombstoneParser\n===============\n\n\n`\npublic\n\n\nclass\nTombstoneParser\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.sts.common.util.TombstoneParser |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nParses tombstones and from a tombstone file or logcat.\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[TombstoneParser](../../../../../../../reference/sts/com/android/sts/common/util/TombstoneParser.html#TombstoneParser())`() ` |\n\n| ### Public methods ||\n|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static final List\u003cTombstoneProtos.Tombstone\u003e` | ` `[parseLogcat](../../../../../../../reference/sts/com/android/sts/common/util/TombstoneParser.html#parseLogcat(java.lang.String))`(String logcat) ` Parse a logcat snippet and build a list of tombstones |\n| ` static long` | ` `[parsePointer](../../../../../../../reference/sts/com/android/sts/common/util/TombstoneParser.html#parsePointer(java.lang.String))`(String pointerString) ` |\n| ` static boolean` | ` `[parseTombstone](../../../../../../../reference/sts/com/android/sts/common/util/TombstoneParser.html#parseTombstone(java.lang.String,%20com.android.server.os.TombstoneProtos.Tombstone.Builder))`(String tombstoneBlob, TombstoneProtos.Tombstone.Builder tombstoneBuilder) ` |\n\nPublic constructors\n-------------------\n\n### TombstoneParser\n\n```\npublic TombstoneParser ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### parseLogcat\n\n```\npublic static final List\u003cTombstoneProtos.Tombstone\u003e parseLogcat (String logcat)\n```\n\nParse a logcat snippet and build a list of tombstones\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------|\n| `logcat` | `String` \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------|--------|\n| `List\u003cTombstoneProtos.Tombstone\u003e` | \u003cbr /\u003e |\n\n### parsePointer\n\n```\npublic static long parsePointer (String pointerString)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------------|-----------------|\n| `pointerString` | `String` \u003cbr /\u003e |\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |\n\n### parseTombstone\n\n```\npublic static boolean parseTombstone (String tombstoneBlob, \n TombstoneProtos.Tombstone.Builder tombstoneBuilder)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------------|--------------------------------------------|\n| `tombstoneBlob` | `String` \u003cbr /\u003e |\n| `tombstoneBuilder` | `TombstoneProtos.Tombstone.Builder` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |"]]