public class TraceSignatureVisitor extends SignatureVisitor
SignatureVisitor
that builds the Java generic type declaration corresponding to the
signature it visits.
Changes made by Igor (http://jodd.org):
final
for the classprivate
scopes made protected
boolean
AsmUtil
constantsStringBuilder
instead of StringBuffer
Modifier and Type | Field and Description |
---|---|
protected int |
argumentStack
The stack used to keep track of class types that have arguments.
|
protected java.lang.StringBuilder |
declaration
The Java generic type declaration corresponding to the visited signature.
|
protected boolean |
isInterface
Whether the visited signature is a class signature of a Java interface.
|
api, EXTENDS, INSTANCEOF, SUPER
Modifier | Constructor and Description |
---|---|
protected |
TraceSignatureVisitor(java.lang.StringBuilder stringBuilder) |
|
TraceSignatureVisitor(java.lang.StringBuilder stringBuilder,
boolean isInterface) |
Modifier and Type | Method and Description |
---|---|
protected void |
endType() |
java.lang.String |
getDeclaration()
Returns the Java generic type declaration corresponding to the visited signature.
|
protected void |
startType() |
SignatureVisitor |
visitArrayType()
Visits a signature corresponding to an array type.
|
void |
visitBaseType(char descriptor)
Visits a signature corresponding to a primitive type.
|
SignatureVisitor |
visitClassBound()
Visits the class bound of the last visited formal type parameter.
|
void |
visitClassType(java.lang.String name)
Starts the visit of a signature corresponding to a class or interface type.
|
void |
visitEnd()
Ends the visit of a signature corresponding to a class or interface type.
|
SignatureVisitor |
visitExceptionType()
Visits the type of a method exception.
|
void |
visitFormalTypeParameter(java.lang.String name)
Visits a formal type parameter.
|
void |
visitInnerClassType(java.lang.String name)
Visits an inner class.
|
SignatureVisitor |
visitInterface()
Visits the type of an interface implemented by the class.
|
SignatureVisitor |
visitInterfaceBound()
Visits an interface bound of the last visited formal type parameter.
|
SignatureVisitor |
visitParameterType()
Visits the type of a method parameter.
|
SignatureVisitor |
visitReturnType()
Visits the return type of the method.
|
SignatureVisitor |
visitSuperclass()
Visits the type of the super class.
|
void |
visitTypeArgument()
Visits an unbounded type argument of the last visited class or inner class type.
|
SignatureVisitor |
visitTypeArgument(char tag)
Visits a type argument of the last visited class or inner class type.
|
void |
visitTypeVariable(java.lang.String name)
Visits a signature corresponding to a type variable.
|
protected final boolean isInterface
protected final java.lang.StringBuilder declaration
protected int argumentStack
protected TraceSignatureVisitor(java.lang.StringBuilder stringBuilder)
public TraceSignatureVisitor(java.lang.StringBuilder stringBuilder, boolean isInterface)
public void visitFormalTypeParameter(java.lang.String name)
SignatureVisitor
visitFormalTypeParameter
in class SignatureVisitor
name
- the name of the formal parameter.public SignatureVisitor visitClassBound()
SignatureVisitor
visitClassBound
in class SignatureVisitor
public SignatureVisitor visitInterfaceBound()
SignatureVisitor
visitInterfaceBound
in class SignatureVisitor
public SignatureVisitor visitSuperclass()
SignatureVisitor
visitSuperclass
in class SignatureVisitor
public SignatureVisitor visitInterface()
SignatureVisitor
visitInterface
in class SignatureVisitor
public SignatureVisitor visitParameterType()
SignatureVisitor
visitParameterType
in class SignatureVisitor
public SignatureVisitor visitReturnType()
SignatureVisitor
visitReturnType
in class SignatureVisitor
public SignatureVisitor visitExceptionType()
SignatureVisitor
visitExceptionType
in class SignatureVisitor
public void visitBaseType(char descriptor)
SignatureVisitor
visitBaseType
in class SignatureVisitor
descriptor
- the descriptor of the primitive type, or 'V' for void
.public void visitTypeVariable(java.lang.String name)
SignatureVisitor
visitTypeVariable
in class SignatureVisitor
name
- the name of the type variable.public SignatureVisitor visitArrayType()
SignatureVisitor
visitArrayType
in class SignatureVisitor
public void visitClassType(java.lang.String name)
SignatureVisitor
visitClassType
in class SignatureVisitor
name
- the internal name of the class or interface.public void visitInnerClassType(java.lang.String name)
SignatureVisitor
visitInnerClassType
in class SignatureVisitor
name
- the local name of the inner class in its enclosing class.public void visitTypeArgument()
SignatureVisitor
visitTypeArgument
in class SignatureVisitor
public SignatureVisitor visitTypeArgument(char tag)
SignatureVisitor
visitTypeArgument
in class SignatureVisitor
tag
- '+', '-' or '='.public void visitEnd()
SignatureVisitor
visitEnd
in class SignatureVisitor
public java.lang.String getDeclaration()
protected void startType()
protected void endType()
Copyright © 2003-present Jodd Team