|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.RawClass.Attribute
harpoon.IR.RawClass.AttributeSignature
public class AttributeSignature
Classfiles need to carry generic type information in a backwards-compatible way. This is accomplished by introducing a new "Signature" attribute for classes, methods, and fields. (GJ)
Attribute
,
ClassFile
Field Summary | |
---|---|
static String |
ATTRIBUTE_NAME
The string naming this Attribute type. |
int |
signature_index
The value of the signature_index item must be a
valid index into the constant_pool table. |
Fields inherited from class harpoon.IR.RawClass.Attribute |
---|
attribute_name_index, parent |
Constructor Summary | |
---|---|
AttributeSignature(ClassFile parent,
int attribute_name_index,
int signature_index)
Constructor. |
Method Summary | |
---|---|
long |
attribute_length()
The value of the attribute_length item indicates
the length of the attribute, excluding the initial six bytes. |
void |
print(PrintWriter pw,
int indent)
Pretty-print this attribute structure. |
ConstantUtf8 |
signature_index()
|
String |
signature()
|
void |
write(ClassDataOutputStream out)
Write to bytecode stream. |
Methods inherited from class harpoon.IR.RawClass.Attribute |
---|
attribute_name_index, attribute_name, read, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ATTRIBUTE_NAME
Attribute
type.
public int signature_index
signature_index
item must be a
valid index into the constant_pool
table. The
constant pool entry at that index must be a
CONSTANT_Utf8_info
structure representing the
string giving the name of the GJ signature for this method,
field, or class.
Constructor Detail |
---|
public AttributeSignature(ClassFile parent, int attribute_name_index, int signature_index)
Method Detail |
---|
public long attribute_length()
Attribute
attribute_length
item indicates
the length of the attribute, excluding the initial six bytes.
attribute_length
in class Attribute
public ConstantUtf8 signature_index()
public String signature()
public void write(ClassDataOutputStream out) throws IOException
write
in class Attribute
IOException
public void print(PrintWriter pw, int indent)
print
in class Attribute
indent
- the indentation level to use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |