documentation:tiny
                This is an old revision of the document!
Table of Contents
Tiny v1
 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 body 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 method 1204 # INTERMEDIARY-COUNTER field 945 # SORTED-HIERARCHY 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
Grammar
<file> ::= <header> | <header> <entries> <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> ::= '' | '# ' <property> <eol> <properties> <property> ::= <property-key> | <property-key> <space> <property-value> <property-key> ::= <safe-string> <property-value> ::= <spaceless-safe-string> <entries> ::= '' | <mapping-entry> <entries> <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>
Notes
- <tab>is- \t.
- <space>is the space character (- U+0020).
- <eol>is- \nor- \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.
- <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.
Miscellaneous Notes
- The encoding for the entire file is UTF-8.
- Properties with unknown keys should be skipped without generating an error.
- The amount of extra namespaces defined in the header and the amount of names in everyextra-ns-*-namesdefinition have to match. They are associated by their relative position, like the mandatory namespacesaandbthat are associated by the suffix, e.g.namespace-acoversclass-name-a,field-name-a,field-desc-a,method-name-aandmethod-desc-a.
- Entries representing the same element should not be repeated, so there can be only one entry for a specific class, member or property.
- Mappings without any (useful) names should be omitted.
- Entries without any (useful) mappings should be omitted.
Standard Properties
These are required to be in the header.
- SORTED-HIERARCHY: all member entries are directly beneath their parent class entries, and fields are before methods
documentation/tiny.1694869780.txt.gz · Last modified: 2023/09/16 13:09 by nebelnidas
                
                