Class ExceptionsAttribute

java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.ExceptionsAttribute

public class ExceptionsAttribute extends AttributeInfo
Exceptions_attribute.
  • Field Details

  • Constructor Details

    • ExceptionsAttribute

      public ExceptionsAttribute(ConstPool cp)
      Constructs a new exceptions attribute.
      Parameters:
      cp - constant pool table.
  • Method Details

    • copy

      public AttributeInfo copy(ConstPool newCp, Map<String,String> classnames)
      Makes a copy. Class names are replaced according to the given Map object.
      Overrides:
      copy in class AttributeInfo
      Parameters:
      newCp - the constant pool table used by the new copy.
      classnames - pairs of replaced and substituted class names. It can be null.
    • getExceptionIndexes

      public int[] getExceptionIndexes()
      Returns exception_index_table[].
    • getExceptions

      public String[] getExceptions()
      Returns the names of exceptions that the method may throw.
    • setExceptionIndexes

      public void setExceptionIndexes(int[] elist)
      Sets exception_index_table[].
    • setExceptions

      public void setExceptions(String[] elist)
      Sets the names of exceptions that the method may throw.
    • tableLength

      public int tableLength()
      Returns number_of_exceptions.
    • getException

      public int getException(int nth)
      Returns the value of exception_index_table[nth].