Returns the unique ID that identifies this kind of attribute (Signature, LineNumberTable,...)
Returns the unique ID that identifies this kind of attribute (Signature, LineNumberTable,...)
This id can then be used in a switch statement to efficiently identify the attribute.
(attribute.id : @scala.annotation.switch) match { case Signature.Id => ... }
The unique ids are manually associated with the attributes. The attributes use the following IDs:
Converts this signature into its JVM representation.
Converts this signature into its JVM representation. (See the JVM 5 or later specification for further details.)
An attribute-level signature as defined in the JVM specification.
To match
Signature
objects the predefined matchers/extractors can be used. * @exampleExample 1
ClassSignature:
Ljava/lang/Object;Ljava/util/function/Function<Ljava/lang/Object;Ljava/lang/Void;>;
Example 2
interface Col<C> { /*empty*/ }
ClassSignature:
<C:Ljava/lang/Object;>Ljava/lang/Object;
Example 3
ClassSignature:
Ljava/lang/Object;LCol<Ljava/lang/Object;>;
Example 4
ClassSignature:
<E:Ljava/lang/Error;>Ljava/lang/Object;LCol<TE;>;
Example 5
AST of
mico
:Matching Signatures
Scala REPL: