## 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

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.

Version:
  $Id: StringRepresentation.java,v 1.5 2002/08/05 17:31:32 enver Exp $
Author:
  Enver Haase

Constructor Summary
`StringRepresentation(Node n)` Creates a new StringRepresentation object which is the representation of n.

Method Summary
`java.lang.String` `toString()` Returns the String representation.
`void` `visitCode(Code obj)`
`void` `visitCodeException(CodeException obj)`
`void` `visitConstantClass(ConstantClass obj)`
`void` `visitConstantDouble(ConstantDouble obj)`
`void` `visitConstantFieldref(ConstantFieldref obj)`
`void` `visitConstantFloat(ConstantFloat obj)`
`void` `visitConstantInteger(ConstantInteger obj)`
`void` `visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)`
`void` `visitConstantLong(ConstantLong obj)`
`void` `visitConstantMethodref(ConstantMethodref obj)`
`void` `visitConstantNameAndType(ConstantNameAndType obj)`
`void` `visitConstantPool(ConstantPool obj)`
`void` `visitConstantString(ConstantString obj)`
`void` `visitConstantUtf8(ConstantUtf8 obj)`
`void` `visitConstantValue(ConstantValue obj)`
`void` `visitDeprecated(Deprecated obj)`
`void` `visitExceptionTable(ExceptionTable obj)`
`void` `visitField(Field obj)`
`void` `visitInnerClass(InnerClass obj)`
`void` `visitInnerClasses(InnerClasses obj)`
`void` `visitJavaClass(JavaClass obj)`
`void` `visitLineNumber(LineNumber obj)`
`void` `visitLineNumberTable(LineNumberTable obj)`
`void` `visitLocalVariable(LocalVariable obj)`
`void` `visitLocalVariableTable(LocalVariableTable obj)`
`void` `visitMethod(Method obj)`
`void` `visitSignature(Signature obj)`
`void` `visitSourceFile(SourceFile obj)`
`void` `visitStackMap(StackMap obj)`
`void` `visitSynthetic(Synthetic obj)`
`void` `visitUnknown(Unknown obj)`

Methods inherited from class org.apache.bcel.classfile.EmptyVisitor
`visitStackMapEntry`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.apache.bcel.classfile.Visitor
`visitStackMapEntry`

Constructor Detail

### StringRepresentation

    public StringRepresentation(Node n)

  Creates a new StringRepresentation object which is the representation of n.

See Also:
  `toString()`

Method Detail

### toString

    public java.lang.String toString()

  Returns the String representation.

  Overrides:
    `toString` in class `java.lang.Object`

### visitCode

    public void visitCode(Code obj)

  Specified by:
    `visitCode` in interface `Visitor`
  Overrides:
    `visitCode` in class `EmptyVisitor`

### visitCodeException

    public void visitCodeException(CodeException obj)

  Specified by:
    `visitCodeException` in interface `Visitor`
  Overrides:
    `visitCodeException` in class `EmptyVisitor`

### visitConstantClass

    public void visitConstantClass(ConstantClass obj)

  Specified by:
    `visitConstantClass` in interface `Visitor`
  Overrides:
    `visitConstantClass` in class `EmptyVisitor`

### visitConstantDouble

    public void visitConstantDouble(ConstantDouble obj)

  Specified by:
    `visitConstantDouble` in interface `Visitor`
  Overrides:
    `visitConstantDouble` in class `EmptyVisitor`

### visitConstantFieldref

    public void visitConstantFieldref(ConstantFieldref obj)

  Specified by:
    `visitConstantFieldref` in interface `Visitor`
  Overrides:
    `visitConstantFieldref` in class `EmptyVisitor`

### visitConstantFloat

    public void visitConstantFloat(ConstantFloat obj)

  Specified by:
    `visitConstantFloat` in interface `Visitor`
  Overrides:
    `visitConstantFloat` in class `EmptyVisitor`

### visitConstantInteger

    public void visitConstantInteger(ConstantInteger obj)

  Specified by:
    `visitConstantInteger` in interface `Visitor`
  Overrides:
    `visitConstantInteger` in class `EmptyVisitor`

### visitConstantInterfaceMethodref

    public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)

  Specified by:
    `visitConstantInterfaceMethodref` in interface `Visitor`
  Overrides:
    `visitConstantInterfaceMethodref` in class `EmptyVisitor`

### visitConstantLong

    public void visitConstantLong(ConstantLong obj)

  Specified by:
    `visitConstantLong` in interface `Visitor`
  Overrides:
    `visitConstantLong` in class `EmptyVisitor`

### visitConstantMethodref

    public void visitConstantMethodref(ConstantMethodref obj)

  Specified by:
    `visitConstantMethodref` in interface `Visitor`
  Overrides:
    `visitConstantMethodref` in class `EmptyVisitor`

### visitConstantNameAndType

    public void visitConstantNameAndType(ConstantNameAndType obj)

  Specified by:
    `visitConstantNameAndType` in interface `Visitor`
  Overrides:
    `visitConstantNameAndType` in class `EmptyVisitor`

### visitConstantPool

    public void visitConstantPool(ConstantPool obj)

  Specified by:
    `visitConstantPool` in interface `Visitor`
  Overrides:
    `visitConstantPool` in class `EmptyVisitor`

### visitConstantString

    public void visitConstantString(ConstantString obj)

  Specified by:
    `visitConstantString` in interface `Visitor`
  Overrides:
    `visitConstantString` in class `EmptyVisitor`

### visitConstantUtf8

    public void visitConstantUtf8(ConstantUtf8 obj)

  Specified by:
    `visitConstantUtf8` in interface `Visitor`
  Overrides:
    `visitConstantUtf8` in class `EmptyVisitor`

### visitConstantValue

    public void visitConstantValue(ConstantValue obj)

  Specified by:
    `visitConstantValue` in interface `Visitor`
  Overrides:
    `visitConstantValue` in class `EmptyVisitor`

### visitDeprecated

    public void visitDeprecated(Deprecated obj)

  Specified by:
    `visitDeprecated` in interface `Visitor`
  Overrides:
    `visitDeprecated` in class `EmptyVisitor`

### visitExceptionTable

    public void visitExceptionTable(ExceptionTable obj)

  Specified by:
    `visitExceptionTable` in interface `Visitor`
  Overrides:
    `visitExceptionTable` in class `EmptyVisitor`

### visitField

    public void visitField(Field obj)

  Specified by:
    `visitField` in interface `Visitor`
  Overrides:
    `visitField` in class `EmptyVisitor`

### visitInnerClass

    public void visitInnerClass(InnerClass obj)

  Specified by:
    `visitInnerClass` in interface `Visitor`
  Overrides:
    `visitInnerClass` in class `EmptyVisitor`

### visitInnerClasses

    public void visitInnerClasses(InnerClasses obj)

  Specified by:
    `visitInnerClasses` in interface `Visitor`
  Overrides:
    `visitInnerClasses` in class `EmptyVisitor`

### visitJavaClass

    public void visitJavaClass(JavaClass obj)

  Specified by:
    `visitJavaClass` in interface `Visitor`
  Overrides:
    `visitJavaClass` in class `EmptyVisitor`

### visitLineNumber

    public void visitLineNumber(LineNumber obj)

  Specified by:
    `visitLineNumber` in interface `Visitor`
  Overrides:
    `visitLineNumber` in class `EmptyVisitor`

### visitLineNumberTable

    public void visitLineNumberTable(LineNumberTable obj)

  Specified by:
    `visitLineNumberTable` in interface `Visitor`
  Overrides:
    `visitLineNumberTable` in class `EmptyVisitor`

### visitLocalVariable

    public void visitLocalVariable(LocalVariable obj)

  Specified by:
    `visitLocalVariable` in interface `Visitor`
  Overrides:
    `visitLocalVariable` in class `EmptyVisitor`

### visitLocalVariableTable

    public void visitLocalVariableTable(LocalVariableTable obj)

  Specified by:
    `visitLocalVariableTable` in interface `Visitor`
  Overrides:
    `visitLocalVariableTable` in class `EmptyVisitor`

### visitMethod

    public void visitMethod(Method obj)

  Specified by:
    `visitMethod` in interface `Visitor`
  Overrides:
    `visitMethod` in class `EmptyVisitor`

### visitSignature

    public void visitSignature(Signature obj)

  Specified by:
    `visitSignature` in interface `Visitor`
  Overrides:
    `visitSignature` in class `EmptyVisitor`

### visitSourceFile

    public void visitSourceFile(SourceFile obj)

  Specified by:
    `visitSourceFile` in interface `Visitor`
  Overrides:
    `visitSourceFile` in class `EmptyVisitor`

### visitStackMap

    public void visitStackMap(StackMap obj)

  Specified by:
    `visitStackMap` in interface `Visitor`
  Overrides:
    `visitStackMap` in class `EmptyVisitor`

### visitSynthetic

    public void visitSynthetic(Synthetic obj)

  Specified by:
    `visitSynthetic` in interface `Visitor`
  Overrides:
    `visitSynthetic` in class `EmptyVisitor`

### visitUnknown

    public void visitUnknown(Unknown obj)

  Specified by:
    `visitUnknown` in interface `Visitor`
  Overrides:
    `visitUnknown` in class `EmptyVisitor`

Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.