Expand description
Platform symbols: render IntDef/LongDef magic numbers as their
constant names (view.setVisibility(8) → android.view.View.GONE).
Two inputs, both from an Android SDK platform directory:
android.jar— classfileConstantValueattributes give every static final field’s value (android.view.View.GONE = 8).data/annotations.zip— per-method-parameter@IntDef/@LongDefdomains asannotations.xmlitems (the SDK’s metalava metadata — the jar itself does not retain them).
A call site rewrites only on an EXACT domain match: flag domains (combinable values such as Intent flags) stay numeric for combined literals and render named for single values.
Structs§
Functions§
- classfile_
constants - installed
- Whether a symbol table is available (explicit or built-in).
- named_
constant - The named constant for a call argument, when the platform knows the parameter’s domain and the literal matches exactly one member. Rendered dotted-and-qualified (the output has no imports).
- set_
symbols - Install the symbol table for this run (the driver installs the
built-in default or an explicit
--symbolsbuild, before workers start — same pattern as the case-rename registry).
Type Aliases§
- Class
Constants - Read every static-final field’s constant value out of one classfile. Only the pieces a constant lookup needs survive: the constant pool (Utf8/Class/Integer/Long/String entries), field_info with its ConstantValue attribute, and method descriptors for domain keys. (owner, field) → value; (owner, method, descriptor) list.