use of org.objectweb.asm.ByteVector in project openj9 by eclipse.
the class NestHostAttribute method write.
public ByteVector write(ClassWriter cw, byte[] code, int len, int maxStack, int maxLocals) {
int topclass_index = cw.newClass(nestHost);
ByteVector b = new ByteVector();
b.putShort(topclass_index);
return b;
}
use of org.objectweb.asm.ByteVector in project openj9 by eclipse.
the class NestMembersAttribute method write.
public ByteVector write(ClassWriter cw, byte[] code, int len, int maxStack, int maxLocals) {
ByteVector b = new ByteVector();
b.putShort(nestMembers.length);
int nestMemberIndex;
for (int i = 0; i < nestMembers.length; i++) {
nestMemberIndex = cw.newClass(nestMembers[i]);
b.putShort(nestMemberIndex);
}
return b;
}
use of org.objectweb.asm.ByteVector in project CodenameOne by codenameone.
the class RetroWeaverAttribute method write.
protected ByteVector write(final ClassWriter cw, final byte[] code, final int len, final int maxStack, final int maxLocals) {
ByteVector bv = new ByteVector();
bv.putInt(retroweaverBuildNumber);
bv.putInt(originalClassVersion);
bv.putLong(timestamp);
return bv;
}
use of org.objectweb.asm.ByteVector in project openj9 by eclipse.
the class NestHostAttribute method write.
public ByteVector write(ClassWriter cw, byte[] code, int len, int maxStack, int maxLocals) {
int topclass_index = cw.newClass(nestHost);
ByteVector b = new ByteVector();
b.putShort(topclass_index);
return b;
}
use of org.objectweb.asm.ByteVector in project soot by Sable.
the class ASMBackendUtils method createASMAttribute.
/**
* Create an ASM attribute from an Soot attribute
* @param attr Soot attribute
* @return ASM attribute
*/
public static org.objectweb.asm.Attribute createASMAttribute(Attribute attr) {
final Attribute a = attr;
return new org.objectweb.asm.Attribute(attr.getName()) {
@Override
protected ByteVector write(final ClassWriter cw, final byte[] code, final int len, final int maxStack, final int maxLocals) {
ByteVector result = new ByteVector();
result.putByteArray(a.getValue(), 0, a.getValue().length);
return result;
}
};
}
Aggregations