?? exceptionsattr.java
字號(hào):
/**
*
*/
package gen.info.attr;
import gen.constvalue.AttrInfoTag;
import java.io.DataOutputStream;
import java.io.IOException;
/**
* Exceptions_attribute {
* u2 attribute_name_index;
* u4 attribute_length;
* u2 number_of_exceptions;
* u2 exception_index_table[number_of_exceptions];
* }
*
* @author liuyi
*
*/
public class ExceptionsAttr extends AttributeInfo implements AttrInfoTag {
private final short number_of_exceptions = 1;
//special here
private short exceptionIndex;
/**
* @param tag
*/
public ExceptionsAttr() {
super(ATTR_Exceptions);
length = 4;
}
public short getExceptionNumber(){
return number_of_exceptions;
}
public void setExceptionIndex(int exceptionIndex){
this.exceptionIndex = (short)exceptionIndex;
}
public int getExceptionIndex(){
return exceptionIndex;
}
public void toBinary(DataOutputStream writer) throws IOException {
writer.writeShort(nameIndex);
writer.writeInt(length);
writer.writeShort(number_of_exceptions);
writer.writeShort(exceptionIndex);
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -