Top Description Fields Constructors Methods
org.eclipse.persistence.internal.libraries.asm.signature

public Class SignatureReader

extends Object
Class Inheritance

A parser for signature literals, as defined in the Java Virtual Machine Specification (JVMS), to visit them with a SignatureVisitor.
Authors
Thomas Hallgren, Eric Bruneton
See Also
JVMS 4.7.9.1

Field Summary

Modifier and TypeField and Description
private final String
signatureValue

The JVMS signature to be read.

Constructor Summary

AccessConstructor and Description
public
SignatureReader(final String
A JavaTypeSignature, ClassSignature or MethodSignature.
signature
)

Constructs a SignatureReader for the given signature.

Method Summary

Modifier and TypeMethod and Description
public void
accept(final SignatureVisitor
the visitor that must visit this signature.
signatureVistor
)

Makes the given visitor visit the signature of this SignatureReader.

public void
acceptType(final SignatureVisitor
the visitor that must visit this signature.
signatureVisitor
)

Makes the given visitor visit the signature of this SignatureReader.

private static int

Returns:

the index of the first character after the parsed signature.
parseType
(final String
a string containing the signature that must be parsed.
signature
,
final int
index of the first character of the signature to parsed.
startOffset
,
final SignatureVisitor
the visitor that must visit this signature.
signatureVisitor
)

Parses a JavaTypeSignature and makes the given visitor visit it.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

signatureValueback to summary
private final String signatureValue

The JVMS signature to be read.

Constructor Detail

SignatureReaderback to summary
public SignatureReader(final String signature)

Constructs a SignatureReader for the given signature.

Parameters
signature:String

A JavaTypeSignature, ClassSignature or MethodSignature.

Method Detail

acceptback to summary
public void accept(final SignatureVisitor signatureVistor)

Makes the given visitor visit the signature of this SignatureReader. This signature is the one specified in the constructor (see SignatureReader). This method is intended to be called on a SignatureReader that was created using a ClassSignature (such as the signature parameter of the org.eclipse.persistence.internal.libraries.asm.ClassVisitor#visit method) or a MethodSignature (such as the signature parameter of the org.eclipse.persistence.internal.libraries.asm.ClassVisitor#visitMethod method).

Parameters
signatureVistor:SignatureVisitor

the visitor that must visit this signature.

acceptTypeback to summary
public void acceptType(final SignatureVisitor signatureVisitor)

Makes the given visitor visit the signature of this SignatureReader. This signature is the one specified in the constructor (see SignatureReader). This method is intended to be called on a SignatureReader that was created using a JavaTypeSignature, such as the signature parameter of the org.eclipse.persistence.internal.libraries.asm.ClassVisitor#visitField or org.eclipse.persistence.internal.libraries.asm.MethodVisitor#visitLocalVariable methods.

Parameters
signatureVisitor:SignatureVisitor

the visitor that must visit this signature.

parseTypeback to summary
private static int parseType(final String signature, final int startOffset, final SignatureVisitor signatureVisitor)

Parses a JavaTypeSignature and makes the given visitor visit it.

Parameters
signature:String

a string containing the signature that must be parsed.

startOffset:int

index of the first character of the signature to parsed.

signatureVisitor:SignatureVisitor

the visitor that must visit this signature.

Returns:int

the index of the first character after the parsed signature.