Class SignatureReader


  • public class SignatureReader
    extends java.lang.Object
    A parser for signature literals, as defined in the Java Virtual Machine Specification (JVMS), to visit them with a SignatureVisitor.
    See Also:
    JVMS 4.7.9.1
    • Constructor Detail

      • SignatureReader

        public SignatureReader​(java.lang.String signature)
        Constructs a SignatureReader for the given signature.
        Parameters:
        signature - A JavaTypeSignature, ClassSignature or MethodSignature.
    • Method Detail

      • accept

        public void accept​(SignatureVisitor signatureVistor)
        Makes the given visitor visit the signature of this SignatureReader. This signature is the one specified in the constructor (see SignatureReader(java.lang.String)). This method is intended to be called on a SignatureReader that was created using a ClassSignature (such as the signature parameter of the ClassVisitor#visit method) or a MethodSignature (such as the signature parameter of the ClassVisitor#visitMethod method).
        Parameters:
        signatureVistor - the visitor that must visit this signature.
      • acceptType

        public void acceptType​(SignatureVisitor signatureVisitor)
        Makes the given visitor visit the signature of this SignatureReader. This signature is the one specified in the constructor (see SignatureReader(java.lang.String)). This method is intended to be called on a SignatureReader that was created using a JavaTypeSignature, such as the signature parameter of the ClassVisitor#visitField or MethodVisitor#visitLocalVariable methods.
        Parameters:
        signatureVisitor - the visitor that must visit this signature.