Class CheckSignatureAdapter
java.lang.Object
org.objectweb.asm.util.CheckSignatureAdapter
- All Implemented Interfaces:
SignatureVisitor
A
SignatureVisitor that checks that its methods are properly used.- Author:
- Eric Bruneton
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intType to be used to check class signatures.static final intType to be used to check method signatures.static final intType to be used to check type signatures.SeeCheckSignatureAdapter.Fields inherited from interface SignatureVisitor
EXTENDS, INSTANCEOF -
Constructor Summary
ConstructorsConstructorDescriptionCheckSignatureAdapter(int type, SignatureVisitor sv) Creates a newCheckSignatureAdapterobject. -
Method Summary
Modifier and TypeMethodDescriptionVisits a signature corresponding to an array type.voidvisitBaseType(char descriptor) Visits a signature corresponding to a primitive type.Visits the class bound of the last visited formal type parameter.voidvisitClassType(String name) Starts the visit of a signature corresponding to a class or interface type.voidvisitEnd()Ends the visit of a signature corresponding to a class or interface type.Visits the type of a method exception.voidVisits a formal type parameter.voidvisitInnerClassType(String name) Visits an inner class.Visits the type of an interface implemented by the class.Visits an interface bound of the last visited formal type parameter.Visits the type of a method parameter.Visits the return type of the method.Visits the type of the super class.voidVisits an unbounded type argument of the last visited class or inner class type.visitTypeArgument(char wildcard) Visits a type argument of the last visited class or inner class type.voidvisitTypeVariable(String name) Visits a signature corresponding to a type variable.
-
Field Details
-
CLASS_SIGNATURE
public static final int CLASS_SIGNATUREType to be used to check class signatures. SeeCheckSignatureAdapter.- See Also:
-
METHOD_SIGNATURE
public static final int METHOD_SIGNATUREType to be used to check method signatures. SeeCheckSignatureAdapter.- See Also:
-
TYPE_SIGNATURE
public static final int TYPE_SIGNATUREType to be used to check type signatures.SeeCheckSignatureAdapter.- See Also:
-
-
Constructor Details
-
CheckSignatureAdapter
Creates a newCheckSignatureAdapterobject.- Parameters:
type- the type of signature to be checked. SeeCLASS_SIGNATURE,METHOD_SIGNATUREandTYPE_SIGNATURE.sv- the visitor to which this adapter must delegate calls. May be null.
-
-
Method Details
-
visitFormalTypeParameter
Description copied from interface:SignatureVisitorVisits a formal type parameter.- Specified by:
visitFormalTypeParameterin interfaceSignatureVisitor- Parameters:
name- the name of the formal parameter.
-
visitClassBound
Description copied from interface:SignatureVisitorVisits the class bound of the last visited formal type parameter.- Specified by:
visitClassBoundin interfaceSignatureVisitor- Returns:
- a non null visitor to visit the signature of the class bound.
-
visitInterfaceBound
Description copied from interface:SignatureVisitorVisits an interface bound of the last visited formal type parameter.- Specified by:
visitInterfaceBoundin interfaceSignatureVisitor- Returns:
- a non null visitor to visit the signature of the interface bound.
-
visitSuperclass
Description copied from interface:SignatureVisitorVisits the type of the super class.- Specified by:
visitSuperclassin interfaceSignatureVisitor- Returns:
- a non null visitor to visit the signature of the super class type.
-
visitInterface
Description copied from interface:SignatureVisitorVisits the type of an interface implemented by the class.- Specified by:
visitInterfacein interfaceSignatureVisitor- Returns:
- a non null visitor to visit the signature of the interface type.
-
visitParameterType
Description copied from interface:SignatureVisitorVisits the type of a method parameter.- Specified by:
visitParameterTypein interfaceSignatureVisitor- Returns:
- a non null visitor to visit the signature of the parameter type.
-
visitReturnType
Description copied from interface:SignatureVisitorVisits the return type of the method.- Specified by:
visitReturnTypein interfaceSignatureVisitor- Returns:
- a non null visitor to visit the signature of the return type.
-
visitExceptionType
Description copied from interface:SignatureVisitorVisits the type of a method exception.- Specified by:
visitExceptionTypein interfaceSignatureVisitor- Returns:
- a non null visitor to visit the signature of the exception type.
-
visitBaseType
public void visitBaseType(char descriptor) Description copied from interface:SignatureVisitorVisits a signature corresponding to a primitive type.- Specified by:
visitBaseTypein interfaceSignatureVisitor- Parameters:
descriptor- the descriptor of the primitive type, or 'V' for void.
-
visitTypeVariable
Description copied from interface:SignatureVisitorVisits a signature corresponding to a type variable.- Specified by:
visitTypeVariablein interfaceSignatureVisitor- Parameters:
name- the name of the type variable.
-
visitArrayType
Description copied from interface:SignatureVisitorVisits a signature corresponding to an array type.- Specified by:
visitArrayTypein interfaceSignatureVisitor- Returns:
- a non null visitor to visit the signature of the array element type.
-
visitClassType
Description copied from interface:SignatureVisitorStarts the visit of a signature corresponding to a class or interface type.- Specified by:
visitClassTypein interfaceSignatureVisitor- Parameters:
name- the internal name of the class or interface.
-
visitInnerClassType
Description copied from interface:SignatureVisitorVisits an inner class.- Specified by:
visitInnerClassTypein interfaceSignatureVisitor- Parameters:
name- the local name of the inner class in its enclosing class.
-
visitTypeArgument
public void visitTypeArgument()Description copied from interface:SignatureVisitorVisits an unbounded type argument of the last visited class or inner class type.- Specified by:
visitTypeArgumentin interfaceSignatureVisitor
-
visitTypeArgument
Description copied from interface:SignatureVisitorVisits a type argument of the last visited class or inner class type.- Specified by:
visitTypeArgumentin interfaceSignatureVisitor- Parameters:
wildcard- '+', '-' or '='.- Returns:
- a non null visitor to visit the signature of the type argument.
-
visitEnd
public void visitEnd()Description copied from interface:SignatureVisitorEnds the visit of a signature corresponding to a class or interface type.- Specified by:
visitEndin interfaceSignatureVisitor
-