Java Code Examples for jdk.internal.org.objectweb.asm.Opcodes#ACC_ANNOTATION
The following examples show how to use
jdk.internal.org.objectweb.asm.Opcodes#ACC_ANNOTATION .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Textifier.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 2
Source File: Textifier.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 3
Source File: NashornTextifier.java From jdk8u_nashorn with GNU General Public License v2.0 | 4 votes |
@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); }
Example 4
Source File: Textifier.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 5
Source File: Textifier.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Override public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { 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()); }
Example 6
Source File: Textifier.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@Override public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { 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()); }
Example 7
Source File: NashornTextifier.java From hottub with GNU General Public License v2.0 | 4 votes |
@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); }
Example 8
Source File: Textifier.java From hottub with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 9
Source File: Textifier.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 10
Source File: Textifier.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 11
Source File: Textifier.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 12
Source File: Textifier.java From Bytecoder with Apache License 2.0 | 4 votes |
@Override public void visit( final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { if ((access & Opcodes.ACC_MODULE) != 0) { // Modules are printed in visitModule. return; } this.access = access; int majorVersion = version & 0xFFFF; int minorVersion = version >>> 16; stringBuilder.setLength(0); stringBuilder .append("// class version ") .append(majorVersion) .append('.') .append(minorVersion) .append(" (") .append(version) .append(")\n"); if ((access & Opcodes.ACC_DEPRECATED) != 0) { stringBuilder.append(DEPRECATED); } appendRawAccess(access); appendDescriptor(CLASS_SIGNATURE, signature); if (signature != null) { appendJavaDeclaration(name, signature); } appendAccess(access & ~(Opcodes.ACC_SUPER | Opcodes.ACC_MODULE)); if ((access & Opcodes.ACC_ANNOTATION) != 0) { stringBuilder.append("@interface "); } else if ((access & Opcodes.ACC_INTERFACE) != 0) { stringBuilder.append("interface "); } else if ((access & Opcodes.ACC_ENUM) == 0) { stringBuilder.append("class "); } appendDescriptor(INTERNAL_NAME, name); if (superName != null && !"java/lang/Object".equals(superName)) { stringBuilder.append(" extends "); appendDescriptor(INTERNAL_NAME, superName); } if (interfaces != null && interfaces.length > 0) { stringBuilder.append(" implements "); for (int i = 0; i < interfaces.length; ++i) { appendDescriptor(INTERNAL_NAME, interfaces[i]); if (i != interfaces.length - 1) { stringBuilder.append(' '); } } } stringBuilder.append(" {\n\n"); text.add(stringBuilder.toString()); }
Example 13
Source File: NashornTextifier.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@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); }
Example 14
Source File: Textifier.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 15
Source File: NashornTextifier.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@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); }
Example 16
Source File: Textifier.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@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()); }
Example 17
Source File: NashornTextifier.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@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); }
Example 18
Source File: Textifier.java From nashorn with GNU General Public License v2.0 | 4 votes |
@Override public void visit( final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { 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()); }
Example 19
Source File: NashornTextifier.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@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); }
Example 20
Source File: Textifier.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@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()); }