Top Description Fields Constructors Methods
javassist.bytecode

public Class ExceptionsAttribute

extends AttributeInfo
Class Inheritance
Imports
java.io.DataInputStream, .IOException, java.util.Map

Exceptions_attribute.

Field Summary

Modifier and TypeField and Description
public static final String
tag

The name of this attribute "Exceptions".

Inherited from javassist.bytecode.AttributeInfo:
constPoolinfoname

Constructor Summary

AccessConstructor and Description
pack-priv
private
ExceptionsAttribute(ConstPool
constant pool table.
cp
,
ExceptionsAttribute
source attribute.
src
,
Map<String, String> classnames)

Constructs a copy of an exceptions attribute.

public
ExceptionsAttribute(ConstPool
constant pool table.
cp
)

Constructs a new exceptions attribute.

Method Summary

Modifier and TypeMethod and Description
public AttributeInfo
copy(ConstPool
the constant pool table used by the new copy.
newCp
,
Map<String, String>
pairs of replaced and substituted class names. It can be null.
classnames
)

Overrides javassist.bytecode.AttributeInfo.copy.

Makes a copy.

private void
copyFrom(ExceptionsAttribute
source Exceptions attribute
srcAttr
,
Map<String, String>
pairs of replaced and substituted class names.
classnames
)

Copies the contents from a source attribute.

public int
getException(int nth)

Returns the value of exception_index_table[nth].

public int[]
getExceptionIndexes()

Returns exception_index_table[].

public String[]
getExceptions()

Returns the names of exceptions that the method may throw.

public void
setExceptionIndexes(int[] elist)

Sets exception_index_table[].

public void
setExceptions(String[] elist)

Sets the names of exceptions that the method may throw.

public int
tableLength()

Returns number_of_exceptions.

Inherited from javassist.bytecode.AttributeInfo:
copyAllgetgetConstPoolgetLengthgetNamegetRefClassesgetRefClasseslengthlookupreadremoverenameClassrenameClassrenameClassrenameClasssetwritewriteAll

Field Detail

tagback to summary
public static final String tag

The name of this attribute "Exceptions".

Constructor Detail

ExceptionsAttributeback to summary
pack-priv ExceptionsAttribute(ConstPool cp, int n, DataInputStream in) throws IOException
ExceptionsAttributeback to summary
private ExceptionsAttribute(ConstPool cp, ExceptionsAttribute src, Map<String, String> classnames)

Constructs a copy of an exceptions attribute.

Parameters
cp:ConstPool

constant pool table.

src:ExceptionsAttribute

source attribute.

ExceptionsAttributeback to summary
public ExceptionsAttribute(ConstPool cp)

Constructs a new exceptions attribute.

Parameters
cp:ConstPool

constant pool table.

Method Detail

copyback to summary
public AttributeInfo copy(ConstPool newCp, Map<String, String> classnames)

Overrides javassist.bytecode.AttributeInfo.copy.

Makes a copy. Class names are replaced according to the given Map object.

Parameters
newCp:ConstPool

the constant pool table used by the new copy.

classnames:Map<String, String>

pairs of replaced and substituted class names. It can be null.

Annotations
@Override
copyFromback to summary
private void copyFrom(ExceptionsAttribute srcAttr, Map<String, String> classnames)

Copies the contents from a source attribute. Specified class names are replaced during the copy.

Parameters
srcAttr:ExceptionsAttribute

source Exceptions attribute

classnames:Map<String, String>

pairs of replaced and substituted class names.

getExceptionback to summary
public int getException(int nth)

Returns the value of exception_index_table[nth].

getExceptionIndexesback to summary
public int[] getExceptionIndexes()

Returns exception_index_table[].

getExceptionsback to summary
public String[] getExceptions()

Returns the names of exceptions that the method may throw.

setExceptionIndexesback to summary
public void setExceptionIndexes(int[] elist)

Sets exception_index_table[].

setExceptionsback to summary
public void setExceptions(String[] elist)

Sets the names of exceptions that the method may throw.

tableLengthback to summary
public int tableLength()

Returns number_of_exceptions.