sourcefileattr.java

来自「本人根据自己的实际情况」· Java 代码 · 共 40 行

JAVA
40
字号
/**
 *
 */
package gen.info.attr;

import gen.constvalue.AttrInfoTag;
import java.io.DataOutputStream;
import java.io.IOException;

/**
 * @author liuyi
 *
 */
public class SourceFileAttr extends AttributeInfo implements AttrInfoTag{
    
    private short sourceFileIndex;
    
    /**
     * @param tag
     */
    public SourceFileAttr() {
        super(ATTR_SourceFile);
        super.length = 2;
    }
    
    public void setSourceFileIndex(int index){
        this.sourceFileIndex = (short)index;
    }
    
    public int getSourceFileIndex(){
        return sourceFileIndex;
    }
    
    public void toBinary(DataOutputStream writer) throws IOException {
        writer.writeShort(nameIndex);
        writer.writeInt(length);
        writer.writeShort(sourceFileIndex);
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?