gnu.bytecode
Class SourceFileAttr
public class SourceFileAttr
addToFrontOf , assignConstants , assignConstants , count , get , getContainer , getLength , getLengthAll , getName , getNameIndex , getNext , isSkipped , print , setContainer , setName , setNameIndex , setNext , setSkipped , setSkipped , write , writeAll |
SourceFileAttr
public SourceFileAttr(String filename)
Create a new Attribute.
SourceFileAttr
public SourceFileAttr(int index,
ClassType ctype)
assignConstants
public void assignConstants(ClassType cl)
Add any needed constant pool entries for this Attribute.
Overridden by sub-classes.
Do any other cleanup needed before writing out a .class file.
- assignConstants in interface Attribute
fixSourceFile
public static String fixSourceFile(String fname)
getLength
public final int getLength()
Return the length of the attribute in bytes.
Does not include the 6-byte header (for the name_index and the length).
- getLength in interface Attribute
getSourceFile
public String getSourceFile()
setSourceFile
public void setSourceFile(String filename)
setSourceFile
public static void setSourceFile(ClassType cl,
String filename)
write
public void write(DataOutputStream dstr)
throws java.io.IOException
Write out the contents of the Attribute.
Does not write the 6-byte attribute header.
- write in interface Attribute