本文整理汇总了Java中jdk.internal.org.objectweb.asm.Opcodes.ACC_ENUM属性的典型用法代码示例。如果您正苦于以下问题:Java Opcodes.ACC_ENUM属性的具体用法?Java Opcodes.ACC_ENUM怎么用?Java Opcodes.ACC_ENUM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类jdk.internal.org.objectweb.asm.Opcodes
的用法示例。
在下文中一共展示了Opcodes.ACC_ENUM属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
@Override
public void visit(final int version, final int access, final String name,
final String signature, final String superName,
final String[] interfaces) {
computeSVUID = (access & Opcodes.ACC_ENUM) == 0;
if (computeSVUID) {
this.name = name;
this.access = access;
this.interfaces = new String[interfaces.length];
System.arraycopy(interfaces, 0, this.interfaces, 0,
interfaces.length);
}
super.visit(version, access, name, signature, superName, interfaces);
}
示例2: visit
@Override
public void visit(final int version, final int access, final String name,
final String signature, final String superName,
final String[] interfaces) {
this.access = access;
int major = version & 0xFFFF;
int minor = version >>> 16;
buf.setLength(0);
buf.append("// class version ").append(major).append('.').append(minor)
.append(" (").append(version).append(")\n");
if ((access & Opcodes.ACC_DEPRECATED) != 0) {
buf.append("// DEPRECATED\n");
}
buf.append("// access flags 0x")
.append(Integer.toHexString(access).toUpperCase()).append('\n');
appendDescriptor(CLASS_SIGNATURE, signature);
if (signature != null) {
TraceSignatureVisitor sv = new TraceSignatureVisitor(access);
SignatureReader r = new SignatureReader(signature);
r.accept(sv);
buf.append("// declaration: ").append(name)
.append(sv.getDeclaration()).append('\n');
}
appendAccess(access & ~Opcodes.ACC_SUPER);
if ((access & Opcodes.ACC_ANNOTATION) != 0) {
buf.append("@interface ");
} else if ((access & Opcodes.ACC_INTERFACE) != 0) {
buf.append("interface ");
} else if ((access & Opcodes.ACC_ENUM) == 0) {
buf.append("class ");
}
appendDescriptor(INTERNAL_NAME, name);
if (superName != null && !"java/lang/Object".equals(superName)) {
buf.append(" extends ");
appendDescriptor(INTERNAL_NAME, superName);
buf.append(' ');
}
if (interfaces != null && interfaces.length > 0) {
buf.append(" implements ");
for (int i = 0; i < interfaces.length; ++i) {
appendDescriptor(INTERNAL_NAME, interfaces[i]);
buf.append(' ');
}
}
buf.append(" {\n\n");
text.add(buf.toString());
}
示例3: appendAccess
/**
* Appends a string representation of the given access modifiers to
* {@link #buf buf}.
*
* @param access
* some access modifiers.
*/
private void appendAccess(final int access) {
if ((access & Opcodes.ACC_PUBLIC) != 0) {
buf.append("public ");
}
if ((access & Opcodes.ACC_PRIVATE) != 0) {
buf.append("private ");
}
if ((access & Opcodes.ACC_PROTECTED) != 0) {
buf.append("protected ");
}
if ((access & Opcodes.ACC_FINAL) != 0) {
buf.append("final ");
}
if ((access & Opcodes.ACC_STATIC) != 0) {
buf.append("static ");
}
if ((access & Opcodes.ACC_SYNCHRONIZED) != 0) {
buf.append("synchronized ");
}
if ((access & Opcodes.ACC_VOLATILE) != 0) {
buf.append("volatile ");
}
if ((access & Opcodes.ACC_TRANSIENT) != 0) {
buf.append("transient ");
}
if ((access & Opcodes.ACC_ABSTRACT) != 0) {
buf.append("abstract ");
}
if ((access & Opcodes.ACC_STRICT) != 0) {
buf.append("strictfp ");
}
if ((access & Opcodes.ACC_SYNTHETIC) != 0) {
buf.append("synthetic ");
}
if ((access & Opcodes.ACC_MANDATED) != 0) {
buf.append("mandated ");
}
if ((access & Opcodes.ACC_ENUM) != 0) {
buf.append("enum ");
}
}
示例4: visit
@Override
public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) {
final int major = version & 0xFFFF;
final int minor = version >>> 16;
currentClassName = name;
final StringBuilder sb = new StringBuilder();
sb.append("// class version ").
append(major).
append('.').
append(minor).append(" (").
append(version).
append(")\n");
if ((access & Opcodes.ACC_DEPRECATED) != 0) {
sb.append("// DEPRECATED\n");
}
sb.append("// access flags 0x"). //TODO TRANSLATE TO WHAT THEY MEAN
append(Integer.toHexString(access).toUpperCase()).
append('\n');
appendDescriptor(sb, CLASS_SIGNATURE, signature);
if (signature != null) {
final TraceSignatureVisitor sv = new TraceSignatureVisitor(access);
final SignatureReader r = new SignatureReader(signature);
r.accept(sv);
sb.append("// declaration: ").
append(name).
append(sv.getDeclaration()).
append('\n');
}
appendAccess(sb, access & ~Opcodes.ACC_SUPER);
if ((access & Opcodes.ACC_ANNOTATION) != 0) {
sb.append("@interface ");
} else if ((access & Opcodes.ACC_INTERFACE) != 0) {
sb.append("interface ");
} else if ((access & Opcodes.ACC_ENUM) == 0) {
sb.append("class ");
}
appendDescriptor(sb, INTERNAL_NAME, name);
if (superName != null && !"java/lang/Object".equals(superName)) {
sb.append(" extends ");
appendDescriptor(sb, INTERNAL_NAME, superName);
sb.append(' ');
}
if (interfaces != null && interfaces.length > 0) {
sb.append(" implements ");
for (final String interface1 : interfaces) {
appendDescriptor(sb, INTERNAL_NAME, interface1);
sb.append(' ');
}
}
sb.append(" {\n");
addText(sb);
}
示例5: appendAccess
private static void appendAccess(final StringBuilder sb, final int access) {
if ((access & Opcodes.ACC_PUBLIC) != 0) {
sb.append("public ");
}
if ((access & Opcodes.ACC_PRIVATE) != 0) {
sb.append("private ");
}
if ((access & Opcodes.ACC_PROTECTED) != 0) {
sb.append("protected ");
}
if ((access & Opcodes.ACC_FINAL) != 0) {
sb.append("final ");
}
if ((access & Opcodes.ACC_STATIC) != 0) {
sb.append("static ");
}
if ((access & Opcodes.ACC_SYNCHRONIZED) != 0) {
sb.append("synchronized ");
}
if ((access & Opcodes.ACC_VOLATILE) != 0) {
sb.append("volatile ");
}
if ((access & Opcodes.ACC_TRANSIENT) != 0) {
sb.append("transient ");
}
if ((access & Opcodes.ACC_ABSTRACT) != 0) {
sb.append("abstract ");
}
if ((access & Opcodes.ACC_STRICT) != 0) {
sb.append("strictfp ");
}
if ((access & Opcodes.ACC_SYNTHETIC) != 0) {
sb.append("synthetic ");
}
if ((access & Opcodes.ACC_MANDATED) != 0) {
sb.append("mandated ");
}
if ((access & Opcodes.ACC_ENUM) != 0) {
sb.append("enum ");
}
}