| Method from org.objectweb.asm.Attribute Detail: |
final int getCount() {
int count = 0;
Attribute attr = this;
while (attr != null) {
count += 1;
attr = attr.next;
}
return count;
}
Returns the length of the attribute list that begins with this attribute. |
protected Label[] getLabels() {
return null;
}
Returns the labels corresponding to this attribute. |
final int getSize(ClassWriter cw,
byte[] code,
int len,
int maxStack,
int maxLocals) {
Attribute attr = this;
int size = 0;
while (attr != null) {
cw.newUTF8(attr.type);
size += attr.write(cw, code, len, maxStack, maxLocals).length + 6;
attr = attr.next;
}
return size;
}
Returns the size of all the attributes in this attribute list. |
public boolean isCodeAttribute() {
return false;
}
Returns true if this type of attribute is a code attribute. |
public boolean isUnknown() {
return true;
}
Returns true if this type of attribute is unknown. The default
implementation of this method always returns true. |
final void put(ClassWriter cw,
byte[] code,
int len,
int maxStack,
int maxLocals,
ByteVector out) {
Attribute attr = this;
while (attr != null) {
ByteVector b = attr.write(cw, code, len, maxStack, maxLocals);
out.putShort(cw.newUTF8(attr.type)).putInt(b.length);
out.putByteArray(b.data, 0, b.length);
attr = attr.next;
}
}
Writes all the attributes of this attribute list in the given byte
vector. |
protected Attribute read(ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels) {
Attribute attr = new Attribute(type);
attr.value = new byte[len];
System.arraycopy(cr.b, off, attr.value, 0, len);
return attr;
}
Reads a type attribute. This method must return a new
Attribute object, of type type , corresponding to
the len bytes starting at the given offset, in the given class
reader. |
protected ByteVector write(ClassWriter cw,
byte[] code,
int len,
int maxStack,
int maxLocals) {
ByteVector v = new ByteVector();
v.data = value;
v.length = value.length;
return v;
}
Returns the byte array form of this attribute. |