org.apache.bcel.verifier.statics
Class StringRepresentation
public
class
StringRepresentation
extends EmptyVisitor
implements 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.
public StringRepresentation(
Node n)
Creates a new StringRepresentation object which is the representation of n.
See Also: toString
public String toString()
Returns the String representation.
public void visitCode(
Code obj)
public void visitField(
Field obj)
public void visitMethod(
Method obj)
public void visitUnknown(
Unknown obj)