Package org.objectweb.asm.signature
Class SignatureReader
java.lang.Object
org.objectweb.asm.signature.SignatureReader
A parser for signature literals, as defined in the Java Virtual Machine Specification (JVMS), to
visit them with a SignatureVisitor.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSignatureReader(String signature) Constructs aSignatureReaderfor the given signature. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(SignatureVisitor signatureVistor) Makes the given visitor visit the signature of thisSignatureReader.voidacceptType(SignatureVisitor signatureVisitor) Makes the given visitor visit the signature of thisSignatureReader.private static intparseType(String signature, int startOffset, SignatureVisitor signatureVisitor) Parses a JavaTypeSignature and makes the given visitor visit it.
-
Field Details
-
signatureValue
The JVMS signature to be read.
-
-
Constructor Details
-
SignatureReader
Constructs aSignatureReaderfor the given signature.- Parameters:
signature- A JavaTypeSignature, ClassSignature or MethodSignature.
-
-
Method Details
-
accept
Makes the given visitor visit the signature of thisSignatureReader. This signature is the one specified in the constructor (seeSignatureReader(java.lang.String)). This method is intended to be called on aSignatureReaderthat was created using a ClassSignature (such as thesignatureparameter of theClassVisitor.visit(int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])method) or a MethodSignature (such as thesignatureparameter of theClassVisitor.visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])method).- Parameters:
signatureVistor- the visitor that must visit this signature.
-
acceptType
Makes the given visitor visit the signature of thisSignatureReader. This signature is the one specified in the constructor (seeSignatureReader(java.lang.String)). This method is intended to be called on aSignatureReaderthat was created using a JavaTypeSignature, such as thesignatureparameter of theClassVisitor.visitField(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)orMethodVisitor.visitLocalVariable(java.lang.String, java.lang.String, java.lang.String, org.objectweb.asm.Label, org.objectweb.asm.Label, int)methods.- Parameters:
signatureVisitor- the visitor that must visit this signature.
-
parseType
Parses a JavaTypeSignature and makes the given visitor visit it.- Parameters:
signature- a string containing the signature that must be parsed.startOffset- index of the first character of the signature to parsed.signatureVisitor- the visitor that must visit this signature.- Returns:
- the index of the first character after the parsed signature.
-