Search in sources :

Example 1 with ByteVector

use of org.mvel2.asm.ByteVector in project mvel by mvel.

the class ModuleHashesAttribute method write.

@Override
protected ByteVector write(ClassWriter cw, byte[] code, int len, int maxStack, int maxLocals) {
    ByteVector v = new ByteVector();
    int index = cw.newUTF8(algorithm);
    v.putShort(index);
    int count = (modules == null) ? 0 : modules.size();
    v.putShort(count);
    for (int i = 0; i < count; i++) {
        String module = modules.get(i);
        v.putShort(cw.newModule(module));
        byte[] hash = hashes.get(i);
        v.putShort(hash.length);
        for (byte b : hash) {
            v.putByte(b);
        }
    }
    return v;
}
Also used : ByteVector(org.mvel2.asm.ByteVector)

Example 2 with ByteVector

use of org.mvel2.asm.ByteVector in project mvel by mvel.

the class ModuleResolutionAttribute method write.

@Override
protected ByteVector write(ClassWriter cw, byte[] code, int len, int maxStack, int maxLocals) {
    ByteVector v = new ByteVector();
    v.putShort(resolution);
    return v;
}
Also used : ByteVector(org.mvel2.asm.ByteVector)

Example 3 with ByteVector

use of org.mvel2.asm.ByteVector in project mvel by mvel.

the class ModuleTargetAttribute method write.

@Override
protected ByteVector write(ClassWriter cw, byte[] code, int len, int maxStack, int maxLocals) {
    ByteVector v = new ByteVector();
    int index = (platform == null) ? 0 : cw.newUTF8(platform);
    v.putShort(index);
    return v;
}
Also used : ByteVector(org.mvel2.asm.ByteVector)

Aggregations

ByteVector (org.mvel2.asm.ByteVector)3