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
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
visitRecord
(Record obj) Visits aRecord
object.void
Visits aRecordComponentInfo
object.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
visitMethodParameter, visitModule, visitModuleExports, visitModuleMainClass, visitModuleOpens, visitModulePackages, visitModuleProvides, visitModuleRequires, visitNestHost, visitStackMapType
-
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. -
visitAnnotation
- Specified by:
visitAnnotation
in interfaceVisitor
- Overrides:
visitAnnotation
in classEmptyVisitor
- Since:
- 6.0
-
visitAnnotationDefault
- Specified by:
visitAnnotationDefault
in interfaceVisitor
- Overrides:
visitAnnotationDefault
in classEmptyVisitor
- Since:
- 6.0
-
visitAnnotationEntry
- Specified by:
visitAnnotationEntry
in interfaceVisitor
- Overrides:
visitAnnotationEntry
in classEmptyVisitor
- Since:
- 6.0
-
visitBootstrapMethods
- Specified by:
visitBootstrapMethods
in interfaceVisitor
- Overrides:
visitBootstrapMethods
in classEmptyVisitor
- Since:
- 6.0
-
visitCode
- Specified by:
visitCode
in interfaceVisitor
- Overrides:
visitCode
in classEmptyVisitor
-
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
-
visitConstantDynamic
- Specified by:
visitConstantDynamic
in interfaceVisitor
- Overrides:
visitConstantDynamic
in classEmptyVisitor
- Since:
- 6.6.0
-
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
-
visitConstantInvokeDynamic
- Specified by:
visitConstantInvokeDynamic
in interfaceVisitor
- Overrides:
visitConstantInvokeDynamic
in classEmptyVisitor
- Since:
- 6.0
-
visitConstantLong
- Specified by:
visitConstantLong
in interfaceVisitor
- Overrides:
visitConstantLong
in classEmptyVisitor
-
visitConstantMethodHandle
- Specified by:
visitConstantMethodHandle
in interfaceVisitor
- Overrides:
visitConstantMethodHandle
in classEmptyVisitor
- Since:
- 6.0
-
visitConstantMethodref
- Specified by:
visitConstantMethodref
in interfaceVisitor
- Overrides:
visitConstantMethodref
in classEmptyVisitor
-
visitConstantMethodType
- Specified by:
visitConstantMethodType
in interfaceVisitor
- Overrides:
visitConstantMethodType
in classEmptyVisitor
- Since:
- 6.0
-
visitConstantModule
- Specified by:
visitConstantModule
in interfaceVisitor
- Overrides:
visitConstantModule
in classEmptyVisitor
- Since:
- 6.6.0
-
visitConstantNameAndType
- Specified by:
visitConstantNameAndType
in interfaceVisitor
- Overrides:
visitConstantNameAndType
in classEmptyVisitor
-
visitConstantPackage
- Specified by:
visitConstantPackage
in interfaceVisitor
- Overrides:
visitConstantPackage
in classEmptyVisitor
- Since:
- 6.6.0
-
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
-
visitEnclosingMethod
- Specified by:
visitEnclosingMethod
in interfaceVisitor
- Overrides:
visitEnclosingMethod
in classEmptyVisitor
- Since:
- 6.0
-
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
-
visitLocalVariableTypeTable
- Specified by:
visitLocalVariableTypeTable
in interfaceVisitor
- Overrides:
visitLocalVariableTypeTable
in classEmptyVisitor
- Since:
- 6.0
-
visitMethod
- Specified by:
visitMethod
in interfaceVisitor
- Overrides:
visitMethod
in classEmptyVisitor
-
visitMethodParameters
- Specified by:
visitMethodParameters
in interfaceVisitor
- Overrides:
visitMethodParameters
in classEmptyVisitor
- Since:
- 6.0
-
visitNestMembers
- Specified by:
visitNestMembers
in interfaceVisitor
- Overrides:
visitNestMembers
in classEmptyVisitor
- Since:
- 6.4.0
-
visitParameterAnnotation
- Specified by:
visitParameterAnnotation
in interfaceVisitor
- Overrides:
visitParameterAnnotation
in classEmptyVisitor
- Since:
- 6.0
-
visitParameterAnnotationEntry
- Specified by:
visitParameterAnnotationEntry
in interfaceVisitor
- Overrides:
visitParameterAnnotationEntry
in classEmptyVisitor
- Since:
- 6.0
-
visitRecord
Description copied from interface:Visitor
Visits aRecord
object.- Parameters:
obj
- Record to visit
-
visitRecordComponent
Description copied from interface:Visitor
Visits aRecordComponentInfo
object.- Parameters:
obj
- component to visit
-
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
-
visitStackMapEntry
- Specified by:
visitStackMapEntry
in interfaceVisitor
- Overrides:
visitStackMapEntry
in classEmptyVisitor
- Since:
- 6.0
-
visitSynthetic
- Specified by:
visitSynthetic
in interfaceVisitor
- Overrides:
visitSynthetic
in classEmptyVisitor
-
visitUnknown
- Specified by:
visitUnknown
in interfaceVisitor
- Overrides:
visitUnknown
in classEmptyVisitor
-