Modifier and Type | Field and Description |
---|---|
private int | argumentStack
The stack used to keep track of class types that have arguments. |
private boolean | hasFormals
Whether the visited signature contains formal type parameters. |
private boolean | hasParameters
Whether the visited signature contains method parameter types. |
private final StringBuilder | stringBuilder
The builder used to construct the visited signature. |
Access | Constructor and Description |
---|---|
public | |
private |
Modifier and Type | Method and Description |
---|---|
private void | |
private void | |
public String | Returns: the signature that was built by this signature writer.Overrides java. |
public SignatureVisitor | visitArrayType()
Overrides net. |
public void | visitBaseType(final char
the descriptor of the primitive type, or 'V' for descriptor)void .Overrides net. |
public SignatureVisitor | visitClassBound()
Overrides net. |
public void | visitClassType(final String
the internal name of the class or interface (see name)net. ).Overrides net. |
public void | visitEnd()
Overrides net. |
public SignatureVisitor | visitExceptionType()
Overrides net. |
public void | visitFormalTypeParameter(final String
the name of the formal parameter. name)Overrides net. |
public void | visitInnerClassType(final String
the local name of the inner class in its enclosing class. name)Overrides net. |
public SignatureVisitor | visitInterface()
Overrides net. |
public SignatureVisitor | visitInterfaceBound()
Overrides net. |
public SignatureVisitor | visitParameterType()
Overrides net. |
public SignatureVisitor | visitReturnType()
Overrides net. |
public SignatureVisitor | visitSuperclass()
Overrides net. |
public void | visitTypeArgument()
Overrides net. |
public SignatureVisitor | visitTypeArgument(final char
'+', '-' or '='. wildcard)Overrides net. |
public void | visitTypeVariable(final String
the name of the type variable. name)Overrides net. |
argumentStack | back to summary |
---|---|
private int argumentStack The stack used to keep track of class types that have arguments. Each element of this stack is
a boolean encoded in one bit. The top of the stack is the least significant bit. The bottom of
the stack is a sentinel element always equal to 1 (used to detect when the stack is full).
Pushing false = Class type arguments must be surrounded with '<' and '>' and, because
we need a stack to properly balance these angle brackets. A new element is pushed on this stack for each new visited type, and popped when the visit of this type ends (either in visitEnd, or because visitInnerClassType is called). |
hasFormals | back to summary |
---|---|
private boolean hasFormals Whether the visited signature contains formal type parameters. |
hasParameters | back to summary |
---|---|
private boolean hasParameters Whether the visited signature contains method parameter types. |
stringBuilder | back to summary |
---|---|
private final StringBuilder stringBuilder The builder used to construct the visited signature. |
SignatureWriter | back to summary |
---|---|
public SignatureWriter() Constructs a new |
SignatureWriter | back to summary |
---|---|
private SignatureWriter(final StringBuilder stringBuilder) |
endArguments | back to summary |
---|---|
private void endArguments() Ends the type arguments of a class or inner class type. |
endFormals | back to summary |
---|---|
private void endFormals() Ends the formal type parameters section of the signature. |
toString | back to summary |
---|---|
public String toString() Overrides java. Returns the signature that was built by this signature writer. |
visitArrayType | back to summary |
---|---|
public SignatureVisitor visitArrayType() Overrides net. Doc from net. Visits a signature corresponding to an array type.
|
visitBaseType | back to summary |
---|---|
public void visitBaseType(final char descriptor) Overrides net. Doc from net. Visits a signature corresponding to a primitive type.
|
visitClassBound | back to summary |
---|---|
public SignatureVisitor visitClassBound() Overrides net. Doc from net. Visits the class bound of the last visited formal type parameter.
|
visitClassType | back to summary |
---|---|
public void visitClassType(final String name) Overrides net. Doc from net. Starts the visit of a signature corresponding to a class or interface type.
|
visitEnd | back to summary |
---|---|
public void visitEnd() Overrides net. Doc from net. Ends the visit of a signature corresponding to a class or interface type.
|
visitExceptionType | back to summary |
---|---|
public SignatureVisitor visitExceptionType() Overrides net. Doc from net. Visits the type of a method exception.
|
visitFormalTypeParameter | back to summary |
---|---|
public void visitFormalTypeParameter(final String name) Overrides net. Doc from net. Visits a formal type parameter. |
visitInnerClassType | back to summary |
---|---|
public void visitInnerClassType(final String name) Overrides net. Doc from net. Visits an inner class. |
visitInterface | back to summary |
---|---|
public SignatureVisitor visitInterface() Overrides net. Doc from net. Visits the type of an interface implemented by the class.
|
visitInterfaceBound | back to summary |
---|---|
public SignatureVisitor visitInterfaceBound() Overrides net. Doc from net. Visits an interface bound of the last visited formal type parameter.
|
visitParameterType | back to summary |
---|---|
public SignatureVisitor visitParameterType() Overrides net. Doc from net. Visits the type of a method parameter.
|
visitReturnType | back to summary |
---|---|
public SignatureVisitor visitReturnType() Overrides net. Doc from net. Visits the return type of the method.
|
visitSuperclass | back to summary |
---|---|
public SignatureVisitor visitSuperclass() Overrides net. Doc from net. Visits the type of the super class.
|
visitTypeArgument | back to summary |
---|---|
public void visitTypeArgument() Overrides net. Doc from net. Visits an unbounded type argument of the last visited class or inner class type.
|
visitTypeArgument | back to summary |
---|---|
public SignatureVisitor visitTypeArgument(final char wildcard) Overrides net. Doc from net. Visits a type argument of the last visited class or inner class type.
|
visitTypeVariable | back to summary |
---|---|
public void visitTypeVariable(final String name) Overrides net. Doc from net. Visits a signature corresponding to a type variable. |