org.mvel2.asm.signature
Class SignatureReader

java.lang.Object
  extended by org.mvel2.asm.signature.SignatureReader

public class SignatureReader
extends Object

A parser for signature literals, as defined in the Java Virtual Machine Specification (JVMS), to visit them with a SignatureVisitor.

Author:
Thomas Hallgren, Eric Bruneton
See Also:
JVMS 4.7.9.1

Constructor Summary
SignatureReader(String signature)
          Constructs a SignatureReader for the given signature.
 
Method Summary
 void accept(SignatureVisitor signatureVistor)
          Makes the given visitor visit the signature of this SignatureReader.
 void acceptType(SignatureVisitor signatureVisitor)
          Makes the given visitor visit the signature of this SignatureReader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignatureReader

public SignatureReader(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(int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) method) or a MethodSignature (such as the signature parameter of the ClassVisitor.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

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(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object) or MethodVisitor.visitLocalVariable(java.lang.String, java.lang.String, java.lang.String, org.mvel2.asm.Label, org.mvel2.asm.Label, int) methods.

Parameters:
signatureVisitor - the visitor that must visit this signature.


Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.