Package org.apache.bcel.verifier.statics
Class StringRepresentation
java.lang.Object
org.apache.bcel.classfile.EmptyVisitor
org.apache.bcel.verifier.statics.StringRepresentation
- All Implemented Interfaces:
Visitor
BCEL's Node classes (those from the classfile API that accept() Visitor
instances) have toString() methods that were not designed to be robust,
this gap is closed by this class.
When performing class file verification, it may be useful to output which
entity (e.g. a Code instance) is not satisfying the verifier's
constraints, but in this case it could be possible for the toString()
method to throw a RuntimeException.
A (new StringRepresentation(Node n)).toString() never throws any exception.
Note that this class also serves as a placeholder for more sophisticated message
handling in future versions of JustIce.
-
Constructor Summary
ConstructorDescriptionCreates a new StringRepresentation object which is the representation of n. -
Method Summary
Modifier and TypeMethodDescriptiontoString()
Returns the String representation.void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
visitField
(Field obj) void
void
void
visitJavaClass
(JavaClass obj) void
void
void
void
void
void
visitMethod
(Method obj) void
void
void
void
void
visitSignature
(Signature obj) void
void
visitStackMap
(StackMap obj) void
void
visitSynthetic
(Synthetic obj) void
visitUnknown
(Unknown obj) Methods inherited from class org.apache.bcel.classfile.EmptyVisitor
visitConstantDynamic, visitConstantModule, visitConstantPackage, visitMethodParameter, visitModule, visitModuleExports, visitModuleMainClass, visitModuleOpens, visitModulePackages, visitModuleProvides, visitModuleRequires, visitNestHost
-
Constructor Details
-
StringRepresentation
Creates a new StringRepresentation object which is the representation of n.- Parameters:
n
- The node to represent.- See Also:
-
-
Method Details
-
toString
Returns the String representation. -
visitCode
- Specified by:
visitCode
in interfaceVisitor
- Overrides:
visitCode
in classEmptyVisitor
-
visitAnnotation
- Specified by:
visitAnnotation
in interfaceVisitor
- Overrides:
visitAnnotation
in classEmptyVisitor
- Since:
- 6.0
-
visitLocalVariableTypeTable
- Specified by:
visitLocalVariableTypeTable
in interfaceVisitor
- Overrides:
visitLocalVariableTypeTable
in classEmptyVisitor
- Since:
- 6.0
-
visitCodeException
- Specified by:
visitCodeException
in interfaceVisitor
- Overrides:
visitCodeException
in classEmptyVisitor
-
visitConstantClass
- Specified by:
visitConstantClass
in interfaceVisitor
- Overrides:
visitConstantClass
in classEmptyVisitor
-
visitConstantDouble
- Specified by:
visitConstantDouble
in interfaceVisitor
- Overrides:
visitConstantDouble
in classEmptyVisitor
-
visitConstantFieldref
- Specified by:
visitConstantFieldref
in interfaceVisitor
- Overrides:
visitConstantFieldref
in classEmptyVisitor
-
visitConstantFloat
- Specified by:
visitConstantFloat
in interfaceVisitor
- Overrides:
visitConstantFloat
in classEmptyVisitor
-
visitConstantInteger
- Specified by:
visitConstantInteger
in interfaceVisitor
- Overrides:
visitConstantInteger
in classEmptyVisitor
-
visitConstantInterfaceMethodref
- Specified by:
visitConstantInterfaceMethodref
in interfaceVisitor
- Overrides:
visitConstantInterfaceMethodref
in classEmptyVisitor
-
visitConstantLong
- Specified by:
visitConstantLong
in interfaceVisitor
- Overrides:
visitConstantLong
in classEmptyVisitor
-
visitConstantMethodref
- Specified by:
visitConstantMethodref
in interfaceVisitor
- Overrides:
visitConstantMethodref
in classEmptyVisitor
-
visitConstantNameAndType
- Specified by:
visitConstantNameAndType
in interfaceVisitor
- Overrides:
visitConstantNameAndType
in classEmptyVisitor
-
visitConstantPool
- Specified by:
visitConstantPool
in interfaceVisitor
- Overrides:
visitConstantPool
in classEmptyVisitor
-
visitConstantString
- Specified by:
visitConstantString
in interfaceVisitor
- Overrides:
visitConstantString
in classEmptyVisitor
-
visitConstantUtf8
- Specified by:
visitConstantUtf8
in interfaceVisitor
- Overrides:
visitConstantUtf8
in classEmptyVisitor
-
visitConstantValue
- Specified by:
visitConstantValue
in interfaceVisitor
- Overrides:
visitConstantValue
in classEmptyVisitor
-
visitDeprecated
- Specified by:
visitDeprecated
in interfaceVisitor
- Overrides:
visitDeprecated
in classEmptyVisitor
-
visitExceptionTable
- Specified by:
visitExceptionTable
in interfaceVisitor
- Overrides:
visitExceptionTable
in classEmptyVisitor
-
visitField
- Specified by:
visitField
in interfaceVisitor
- Overrides:
visitField
in classEmptyVisitor
-
visitInnerClass
- Specified by:
visitInnerClass
in interfaceVisitor
- Overrides:
visitInnerClass
in classEmptyVisitor
-
visitInnerClasses
- Specified by:
visitInnerClasses
in interfaceVisitor
- Overrides:
visitInnerClasses
in classEmptyVisitor
-
visitJavaClass
- Specified by:
visitJavaClass
in interfaceVisitor
- Overrides:
visitJavaClass
in classEmptyVisitor
-
visitLineNumber
- Specified by:
visitLineNumber
in interfaceVisitor
- Overrides:
visitLineNumber
in classEmptyVisitor
-
visitLineNumberTable
- Specified by:
visitLineNumberTable
in interfaceVisitor
- Overrides:
visitLineNumberTable
in classEmptyVisitor
-
visitLocalVariable
- Specified by:
visitLocalVariable
in interfaceVisitor
- Overrides:
visitLocalVariable
in classEmptyVisitor
-
visitLocalVariableTable
- Specified by:
visitLocalVariableTable
in interfaceVisitor
- Overrides:
visitLocalVariableTable
in classEmptyVisitor
-
visitMethod
- Specified by:
visitMethod
in interfaceVisitor
- Overrides:
visitMethod
in classEmptyVisitor
-
visitSignature
- Specified by:
visitSignature
in interfaceVisitor
- Overrides:
visitSignature
in classEmptyVisitor
-
visitSourceFile
- Specified by:
visitSourceFile
in interfaceVisitor
- Overrides:
visitSourceFile
in classEmptyVisitor
-
visitStackMap
- Specified by:
visitStackMap
in interfaceVisitor
- Overrides:
visitStackMap
in classEmptyVisitor
-
visitSynthetic
- Specified by:
visitSynthetic
in interfaceVisitor
- Overrides:
visitSynthetic
in classEmptyVisitor
-
visitUnknown
- Specified by:
visitUnknown
in interfaceVisitor
- Overrides:
visitUnknown
in classEmptyVisitor
-
visitEnclosingMethod
- Specified by:
visitEnclosingMethod
in interfaceVisitor
- Overrides:
visitEnclosingMethod
in classEmptyVisitor
- Since:
- 6.0
-
visitBootstrapMethods
- Specified by:
visitBootstrapMethods
in interfaceVisitor
- Overrides:
visitBootstrapMethods
in classEmptyVisitor
- Since:
- 6.0
-
visitMethodParameters
- Specified by:
visitMethodParameters
in interfaceVisitor
- Overrides:
visitMethodParameters
in classEmptyVisitor
- Since:
- 6.0
-
visitConstantInvokeDynamic
- Specified by:
visitConstantInvokeDynamic
in interfaceVisitor
- Overrides:
visitConstantInvokeDynamic
in classEmptyVisitor
- Since:
- 6.0
-
visitStackMapEntry
- Specified by:
visitStackMapEntry
in interfaceVisitor
- Overrides:
visitStackMapEntry
in classEmptyVisitor
- Since:
- 6.0
-
visitParameterAnnotation
- Specified by:
visitParameterAnnotation
in interfaceVisitor
- Overrides:
visitParameterAnnotation
in classEmptyVisitor
- Since:
- 6.0
-
visitAnnotationEntry
- Specified by:
visitAnnotationEntry
in interfaceVisitor
- Overrides:
visitAnnotationEntry
in classEmptyVisitor
- Since:
- 6.0
-
visitAnnotationDefault
- Specified by:
visitAnnotationDefault
in interfaceVisitor
- Overrides:
visitAnnotationDefault
in classEmptyVisitor
- Since:
- 6.0
-
visitConstantMethodType
- Specified by:
visitConstantMethodType
in interfaceVisitor
- Overrides:
visitConstantMethodType
in classEmptyVisitor
- Since:
- 6.0
-
visitConstantMethodHandle
- Specified by:
visitConstantMethodHandle
in interfaceVisitor
- Overrides:
visitConstantMethodHandle
in classEmptyVisitor
- Since:
- 6.0
-
visitParameterAnnotationEntry
- Specified by:
visitParameterAnnotationEntry
in interfaceVisitor
- Overrides:
visitParameterAnnotationEntry
in classEmptyVisitor
- Since:
- 6.0
-
visitNestMembers
- Specified by:
visitNestMembers
in interfaceVisitor
- Overrides:
visitNestMembers
in classEmptyVisitor
- Since:
- 6.4.0
-