org.jetbrains.java.decompiler.struct.attr.StructSourceFileAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vineflower Show documentation
Show all versions of vineflower Show documentation
Modern Java & JVM language decompiler aiming to be as accurate as possible, with an emphasis on output quality.
The newest version!
package org.jetbrains.java.decompiler.struct.attr;
import org.jetbrains.java.decompiler.code.BytecodeVersion;
import org.jetbrains.java.decompiler.struct.consts.ConstantPool;
import org.jetbrains.java.decompiler.util.DataInputFullStream;
import java.io.IOException;
/*
SourceFile_attribute {
u2 attribute_name_index;
u4 attribute_length;
u2 sourcefile_index;
}
*/
public class StructSourceFileAttribute extends StructGeneralAttribute {
private int constPoolIndex;
@Override
public void initContent(DataInputFullStream data, ConstantPool pool, BytecodeVersion version) throws IOException {
constPoolIndex = data.readUnsignedShort();
}
public String getSourceFile(ConstantPool pool) {
return pool.getPrimitiveConstant(constPoolIndex).getString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy