类 SignatureReader
java.lang.Object
cn.taketoday.bytecode.signature.SignatureReader
A parser for signature literals, as defined in the Java Virtual Machine Specification (JVMS), to
visit them with a SignatureVisitor.
- 作者:
- Thomas Hallgren, Eric Bruneton
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaccept(SignatureVisitor signatureVisitor) 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.
-
字段详细资料
-
signatureValue
The JVMS signature to be read.
-
-
构造器详细资料
-
SignatureReader
Constructs aSignatureReaderfor the given signature.- 参数:
signature- A JavaTypeSignature, ClassSignature or MethodSignature.
-
-
方法详细资料
-
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).- 参数:
signatureVisitor- 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, cn.taketoday.bytecode.Label, cn.taketoday.bytecode.Label, int)methods.- 参数:
signatureVisitor- the visitor that must visit this signature.
-
parseType
Parses a JavaTypeSignature and makes the given visitor visit it.- 参数:
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.- 返回:
- the index of the first character after the parsed signature.
-