Class StringRepresentation

  • All Implemented Interfaces:
    Visitor

    public class StringRepresentation
    extends EmptyVisitor
    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.