gnu.bytecode

Class SourceDebugExtAttr


public class SourceDebugExtAttr
extends Attribute

Represents the contents of a JSR-45 "SourceDebugExtension" attribute. We only support generating a single "stratum".

Constructor Summary

SourceDebugExtAttr(ClassType cl)
Add a new InnerClassesAttr to a ClassType.

Method Summary

void
addStratum(String name)
void
assignConstants(ClassType cl)
int
getLength()
Return the length of the attribute in bytes.
void
print(ClassTypeWriter dst)
void
write(java.io.DataOutputStream dstr)
Write out the contents of the Attribute.

Methods inherited from class gnu.bytecode.Attribute

addToFrontOf, assignConstants, assignConstants, count, get, getContainer, getLength, getLengthAll, getName, getNameIndex, getNext, isSkipped, print, setContainer, setName, setNameIndex, setNext, setSkipped, setSkipped, write, writeAll

Constructor Details

SourceDebugExtAttr

public SourceDebugExtAttr(ClassType cl)
Add a new InnerClassesAttr to a ClassType.

Method Details

addStratum

public void addStratum(String name)

assignConstants

public void assignConstants(ClassType cl)
Overrides:
assignConstants in interface Attribute

getLength

public int getLength()
Return the length of the attribute in bytes. Does not include the 6-byte header (for the name_index and the length).
Overrides:
getLength in interface Attribute

print

public void print(ClassTypeWriter dst)
Overrides:
print in interface Attribute

write

public void write(java.io.DataOutputStream dstr)
            throws java.io.IOException
Write out the contents of the Attribute. Does not write the 6-byte attribute header.