本文整理汇总了Java中jdk.internal.org.objectweb.asm.FieldVisitor.visitEnd方法的典型用法代码示例。如果您正苦于以下问题:Java FieldVisitor.visitEnd方法的具体用法?Java FieldVisitor.visitEnd怎么用?Java FieldVisitor.visitEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jdk.internal.org.objectweb.asm.FieldVisitor
的用法示例。
在下文中一共展示了FieldVisitor.visitEnd方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import jdk.internal.org.objectweb.asm.FieldVisitor; //导入方法依赖的package包/类
@Override
public byte[] visit(VariableDeclaration node) {
VariableInfo vi = node.getVariableInfo();
String ownerName = vi.getOwner().getName();
ContextDependedClassWriter cw = classWriters.get(ownerName);
String typeName = new String(vi.type.accept(this));
if (vi.isLocal()) {
locals.addLocal(vi);
} else {
FieldVisitor fv = cw.visitField(asAccessFlags(vi),
vi.name,
typeName,
null /* Generic */,
null /* Constant value */);
fv.visitEnd(); // doesn't need visitAnnotation and visitAttribute
}
return EMPTY_BYTE_ARRAY;
}
示例2: addSVUID
import jdk.internal.org.objectweb.asm.FieldVisitor; //导入方法依赖的package包/类
protected void addSVUID(long svuid) {
FieldVisitor fv = super.visitField(Opcodes.ACC_FINAL
+ Opcodes.ACC_STATIC, "serialVersionUID", "J", null, svuid);
if (fv != null) {
fv.visitEnd();
}
}
示例3: addMapField
import jdk.internal.org.objectweb.asm.FieldVisitor; //导入方法依赖的package包/类
static void addMapField(final ClassVisitor cv) {
// add a PropertyMap static field
final FieldVisitor fv = cv.visitField(ACC_PRIVATE | ACC_STATIC | ACC_FINAL,
PROPERTYMAP_FIELD_NAME, PROPERTYMAP_DESC, null, null);
if (fv != null) {
fv.visitEnd();
}
}
示例4: addSVUID
import jdk.internal.org.objectweb.asm.FieldVisitor; //导入方法依赖的package包/类
protected void addSVUID(long svuid) {
FieldVisitor fv = super.visitField(Opcodes.ACC_FINAL
+ Opcodes.ACC_STATIC, "serialVersionUID", "J", null, new Long(
svuid));
if (fv != null) {
fv.visitEnd();
}
}
示例5: addField
import jdk.internal.org.objectweb.asm.FieldVisitor; //导入方法依赖的package包/类
static void addField(final ClassVisitor cv, final String name, final String desc) {
final FieldVisitor fv = cv.visitField(ACC_PRIVATE, name, desc, null, null);
if (fv != null) {
fv.visitEnd();
}
}