This write-up isn't finalized yet and may contain errors!
Tiny v1 consists of a list of flat (non-hierarchical) mapping entries. Every line in the content section corresponds to a new entry. Supported elements are classes, fields and methods; for parameters, variables, comments and a generally more space-efficient format, it's recommended to use its successor, Tiny v2.
Example:
v1 official intermediary named # INTERMEDIARY-COUNTER class 289 # INTERMEDIARY-COUNTER field 945 # INTERMEDIARY-COUNTER method 1204 CLASS a class_123 pkg/SomeClass FIELD a [I a field_789 someField FIELD a Lyj; b field_790 someField2 METHOD a (III)V a method_456 someMethod METHOD a ()F b method_479 someMethod2 CLASS b class_234 pkg/xy/AnotherClass METHOD b (Ljava/lang/String;)I a method_567 anotherMethod
<file> ::= <header> | <header> <content> <header> ::= 'v1' <tab> <namespace-a> <tab> <namespace-b> <extra-namespaces> <eol> <properties> <namespace-a> ::= <namespace> <namespace-b> ::= <namespace> <extra-namespaces> ::= '' | <tab> <namespace> <extra-namespaces> <namespace> ::= <safe-string> <properties> ::= '' | '#' <space> <property> <eol> <properties> <property> ::= <property-key> | <property-key> <space> <property-value> <property-key> ::= <safe-string> <property-value> ::= <spaceless-safe-string> <content> ::= '' | <mapping-entry> <content> <properties> <mapping-entry> ::= <class-entry> | <field-entry> | <method-entry> <class-entry> ::= 'CLASS' <tab> <class-name-a> <tab> <class-name-b> <extra-ns-class-names> <class-name-a> ::= <class-name> <class-name-b> ::= <optional-class-name> <optional-class-name> ::= '' | <class-name> <extra-ns-cls-names> ::= '' | <tab> <optional-class-name> <extra-ns-class-names> <class-name> ::= <safe-string> <field-entry> ::= 'FIELD' <tab> <parent-class-name-a> <tab> <field-desc-a> <tab> <field-name-a> <tab> <field-name-b> <extra-ns-field-names> <field-name-a> ::= <field-name> <field-name-b> ::= <optional-field-name> <optional-field-name> ::= '' | <field-name> <extra-ns-field-names> ::= '' | <tab> <optional-field-name> <extra-ns-field-names> <field-name> ::= <safe-string> <field-desc-a> ::= <field-desc> <field-desc> ::= <safe-string> <method-entry> ::= 'METHOD' <tab> <parent-class-name-a> <tab> <method-desc-a> <tab> <method-name-a> <tab> <method-name-b> <extra-ns-method-names> <method-name-a> ::= <method-name> <method-name-b> ::= <optional-method-name> <optional-method-name> ::= '' | <method-name> <extra-ns-method-names> ::= '' | <tab> <optional-method-name> <extra-ns-method-names> <method-name> ::= <safe-string> <method-desc-a> ::= <method-desc> <method-desc> ::= <safe-string>
<tab>
is \t
.<space>
is the space character (U+0020
).<eol>
is \n
or \r\n
.<safe-string>
is a non-empty string that must not contain:\
,\n
,\r
,\t
or\0
.<spaceless-safe-string>
is the same as <safe-string>
, but in addition mustn't contain <space>
as well.<properties>
are either in the <header>
or at the bottom of the file, not scattered across both locations.<class-name>
is the binary name of a class as specified in JVMS SE 8 §4.2.1. Nested class identifiers are typically separated with $
(e.g. some/package/class$nested$subnested
). Outer names must not be omitted for any namespace.<parent-class-name-a>
is the <class-name>
of the entry's parent (owning) class.<field-name>
/<method-name>
is the unqualified name of a field/method specified in JVMS SE 8 §4.2.2.<field-desc>
is a field descriptor as specified in JVMS SE 8 §4.3.2.<method-desc>
is a method descriptor as specified in JVMS SE 8 §4.3.3.extra-ns-*-names
definition have to match. They are associated by their relative position, like the mandatory namespaces a
and b
that are associated by the suffix, e.g. namespace-a
covers class-name-a
, field-name-a
, field-desc-a
, method-name-a
and method-desc-a
.