本文整理汇总了Java中org.objectweb.asm.ByteVector.putInt方法的典型用法代码示例。如果您正苦于以下问题:Java ByteVector.putInt方法的具体用法?Java ByteVector.putInt怎么用?Java ByteVector.putInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.objectweb.asm.ByteVector
的用法示例。
在下文中一共展示了ByteVector.putInt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeTypeInfo
import org.objectweb.asm.ByteVector; //导入方法依赖的package包/类
private void writeTypeInfo(ByteVector bv, ClassWriter cw, List info, int max)
{
if (max > StackMapAttribute.MAX_SIZE) {
bv.putInt(info.size());
} else {
bv.putShort(info.size());
}
for (int j = 0; j < info.size(); j++) {
StackMapType typeInfo = (StackMapType) info.get(j);
bv.putByte(typeInfo.getType());
switch (typeInfo.getType()) {
case StackMapType.ITEM_Object: //
bv.putShort(cw.newClass(typeInfo.getObject()));
break;
case StackMapType.ITEM_Uninitialized: //
bv.putShort(typeInfo.getLabel().getOffset());
break;
}
}
}
示例2: write
import org.objectweb.asm.ByteVector; //导入方法依赖的package包/类
protected ByteVector write(
ClassWriter cw,
byte[] code,
int len,
int maxStack,
int maxLocals)
{
ByteVector bv = new ByteVector();
if (code != null && code.length > MAX_SIZE) { // TODO verify value
bv.putInt(frames.size());
} else {
bv.putShort(frames.size());
}
for (int i = 0; i < frames.size(); i++) {
writeFrame((StackMapFrame) frames.get(i),
cw,
maxStack,
maxLocals,
bv);
}
return bv;
}
示例3: writeSize
import org.objectweb.asm.ByteVector; //导入方法依赖的package包/类
private void writeSize(int delta, ByteVector bv, boolean isExt) {
if (isExt) {
bv.putInt(delta);
} else {
bv.putShort(delta);
}
}
示例4: write
import org.objectweb.asm.ByteVector; //导入方法依赖的package包/类
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;
}