public class SourceFile extends Object implements BytecodeAttribute
BytecodeAttribute.Fn, BytecodeAttribute.Reader, BytecodeAttribute.Unknown| Constructor and Description |
|---|
SourceFile(String filename) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPoolItems(Set<Constant.Info> constantPool)
When this method is called, the attribute must add all items that it
needs to the constant pool.
|
String |
filename() |
String |
name() |
void |
print(PrintWriter output,
Map<Constant.Info,Integer> constantPool)
This method is used to print the contents of the attribute in
human-readable form, similar to that produced by "javap".
|
void |
write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool)
This method requires the attribute to write itself to the binary stream.
|
public SourceFile(String filename)
public String name()
name in interface BytecodeAttributepublic String filename()
public void write(BinaryOutputStream writer, Map<Constant.Info,Integer> constantPool) throws IOException
BytecodeAttributewrite in interface BytecodeAttributewriter - Outputstream to which the attribute should be written.constantPool - Map of CONSTANT_info items to their index in the constant pool.IOExceptionpublic void addPoolItems(Set<Constant.Info> constantPool)
BytecodeAttributeaddPoolItems in interface BytecodeAttributepublic void print(PrintWriter output, Map<Constant.Info,Integer> constantPool) throws IOException
BytecodeAttributeprint in interface BytecodeAttributeoutput - Output writer to which the attribute is printed.constantPool - Map of CONSTANT_info items to their index in the constant
pool.IOExceptionCopyright © 2016. All rights reserved.