public class SignatureParser extends Object
The various structures that the parser returns (e.g. SignatureParser.ClassTypeSignature) all have Object.toString() methods that convert them into nice, human-readable strings. This conversion can be customized
using SignatureParser(Options) and passing a custom SignatureParser.Options object.
| Modifier and Type | Class and Description |
|---|---|
static class |
SignatureParser.ArrayTypeSignature
Representation of the "ArrayTypeSignature" clause.
|
static class |
SignatureParser.ClassSignature
Representation of the "ClassSignature" clause.
|
static class |
SignatureParser.ClassTypeSignature
Representation of the "ClassTypeSignature" clause, e.g.
|
static interface |
SignatureParser.FieldTypeSignature
Representation of the "FieldTypeSignature" clause.
|
static interface |
SignatureParser.FieldTypeSignatureVisitor<T,EX extends Throwable> |
static class |
SignatureParser.FormalTypeParameter
Representation of the "FormalTypeParameter" clause, e.g.
|
static class |
SignatureParser.MethodTypeSignature
Representation of the "MethodTypeSignature" clause.
|
static interface |
SignatureParser.Options |
static class |
SignatureParser.PrimitiveTypeSignature
Representation of the "PrimitiveTypeSignature" clause, i.e.
|
static class |
SignatureParser.SignatureException
Signalizes am malformed signature.
|
static class |
SignatureParser.SimpleClassTypeSignature
Representation of the "SimpleClassTypeSignature" clause, e.g.
|
static interface |
SignatureParser.ThrowsSignature
Representation of the "ThrowsSignature" clause.
|
static class |
SignatureParser.TypeArgument
Representation of the "TypeArgument" clause.
|
static interface |
SignatureParser.TypeSignature
Representation of the "TypeSignature" clause.
|
static class |
SignatureParser.TypeVariableSignature
Representation of the "TypeVariableSignature" clause, e.g.
|
| Modifier and Type | Field and Description |
|---|---|
static SignatureParser.PrimitiveTypeSignature |
BOOLEAN
The primitive '
boolean' type. |
static SignatureParser.PrimitiveTypeSignature |
BYTE
The primitive '
byte' type. |
static SignatureParser.PrimitiveTypeSignature |
CHAR
The primitive '
char' type. |
static SignatureParser.Options |
DEFAULT_OPTIONS
A trivial implementation of
SignatureParser.Options. |
static SignatureParser.PrimitiveTypeSignature |
DOUBLE
The primitive '
double' type. |
static SignatureParser.PrimitiveTypeSignature |
FLOAT
The primitive '
float' type. |
static SignatureParser.PrimitiveTypeSignature |
INT
The primitive '
int' type. |
static SignatureParser.PrimitiveTypeSignature |
LONG
The primitive '
long' type. |
SignatureParser.ClassTypeSignature |
object
The class type signature of the
Object class. |
static SignatureParser.PrimitiveTypeSignature |
SHORT
The primitive '
short' type. |
static SignatureParser.TypeSignature |
VOID
Representation of the 'void' type.
|
| Constructor and Description |
|---|
SignatureParser() |
SignatureParser(SignatureParser.Options options) |
| Modifier and Type | Method and Description |
|---|---|
SignatureParser.TypeSignature |
decodeClassNameOrFieldDescriptor(String s)
Decodes a "class-name-or-field-descriptor" as defined in JLS8 4.4.1 ("name_index").
|
SignatureParser.ClassSignature |
decodeClassSignature(String s)
Decodes a 'class signature' as defined in JVMS7 4.3.4 / JVMS8 4.7.9.1.
|
SignatureParser.TypeSignature |
decodeFieldDescriptor(String s)
Decodes a 'field descriptor' as defined in JLS7 4.3.2.
|
SignatureParser.FieldTypeSignature |
decodeFieldTypeSignature(String s)
Decodes a 'field type signature' as defined in JVMS7 4.3.4 / JVMS8 4.7.9.1.
|
SignatureParser.MethodTypeSignature |
decodeMethodDescriptor(String s)
Decodes a 'method descriptor' as defined in JVMS[78] 4.3.3.
|
SignatureParser.MethodTypeSignature |
decodeMethodTypeSignature(String s)
Decodes a 'method type signature' as defined in JVMS7 4.3.4 / JVMS8 4.7.9.1.
|
SignatureParser.TypeSignature |
decodeReturnType(String s)
Decodes a 'return type' as defined in JVMS7 4.3.4 / JVMS8 4.7.9.1.
|
SignatureParser.TypeSignature |
decodeTypeSignature(String s)
Decodes a 'type signature' as defined in JVMS7 4.3.4 / JVMS8 4.7.9.1.
|
public static final SignatureParser.Options DEFAULT_OPTIONS
SignatureParser.Options.public final SignatureParser.ClassTypeSignature object
Object class.public static final SignatureParser.PrimitiveTypeSignature BYTE
byte' type.public static final SignatureParser.PrimitiveTypeSignature CHAR
char' type.public static final SignatureParser.PrimitiveTypeSignature DOUBLE
double' type.public static final SignatureParser.PrimitiveTypeSignature FLOAT
float' type.public static final SignatureParser.PrimitiveTypeSignature INT
int' type.public static final SignatureParser.PrimitiveTypeSignature LONG
long' type.public static final SignatureParser.PrimitiveTypeSignature SHORT
short' type.public static final SignatureParser.PrimitiveTypeSignature BOOLEAN
boolean' type.public static final SignatureParser.TypeSignature VOID
public SignatureParser()
public SignatureParser(SignatureParser.Options options)
public SignatureParser.ClassSignature decodeClassSignature(String s) throws SignatureParser.SignatureException
public SignatureParser.MethodTypeSignature decodeMethodTypeSignature(String s) throws SignatureParser.SignatureException
public SignatureParser.TypeSignature decodeTypeSignature(String s) throws SignatureParser.SignatureException
public SignatureParser.FieldTypeSignature decodeFieldTypeSignature(String s) throws SignatureParser.SignatureException
public SignatureParser.MethodTypeSignature decodeMethodDescriptor(String s) throws SignatureParser.SignatureException
"(Object[]) => java.util.stream.Stream" or "join()" (void method)SignatureParser.SignatureExceptionpublic SignatureParser.TypeSignature decodeFieldDescriptor(String s) throws SignatureParser.SignatureException
public SignatureParser.TypeSignature decodeClassNameOrFieldDescriptor(String s) throws SignatureParser.SignatureException
public SignatureParser.TypeSignature decodeReturnType(String s) throws SignatureParser.SignatureException
Copyright © 2022. All rights reserved.