use of org.apache.tapestry5.internal.plastic.asm.ByteVector in project tapestry-5 by apache.
the class ModuleHashesAttribute method write.
@Override
protected ByteVector write(final ClassWriter classWriter, final byte[] code, final int codeLength, final int maxStack, final int maxLocals) {
ByteVector byteVector = new ByteVector();
byteVector.putShort(classWriter.newUTF8(algorithm));
if (modules == null) {
byteVector.putShort(0);
} else {
int numModules = modules.size();
byteVector.putShort(numModules);
for (int i = 0; i < numModules; ++i) {
String module = modules.get(i);
byte[] hash = hashes.get(i);
byteVector.putShort(classWriter.newModule(module)).putShort(hash.length).putByteArray(hash, 0, hash.length);
}
}
return byteVector;
}
use of org.apache.tapestry5.internal.plastic.asm.ByteVector in project tapestry-5 by apache.
the class ModuleResolutionAttribute method write.
@Override
protected ByteVector write(final ClassWriter classWriter, final byte[] code, final int codeLength, final int maxStack, final int maxLocals) {
ByteVector byteVector = new ByteVector();
byteVector.putShort(resolution);
return byteVector;
}
use of org.apache.tapestry5.internal.plastic.asm.ByteVector in project tapestry-5 by apache.
the class ModuleTargetAttribute method write.
@Override
protected ByteVector write(final ClassWriter classWriter, final byte[] code, final int codeLength, final int maxStack, final int maxLocals) {
ByteVector byteVector = new ByteVector();
byteVector.putShort(platform == null ? 0 : classWriter.newUTF8(platform));
return byteVector;
}
Aggregations