Java Code Examples for jdk.internal.org.objectweb.asm.Opcodes#ACC_VARARGS
The following examples show how to use
jdk.internal.org.objectweb.asm.Opcodes#ACC_VARARGS .
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 Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 2
Source File: Textifier.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 3
Source File: Textifier.java From nashorn with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod( final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x").append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab) .append("// declaration: ") .append(genericReturn) .append(' ') .append(name) .append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 4
Source File: Textifier.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 5
Source File: Textifier.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 6
Source File: Textifier.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 7
Source File: NashornTextifier.java From hottub with GNU General Public License v2.0 | 4 votes |
@Override public NashornTextifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { graph = new Graph(name); final List<Label> extraLabels = cr.getExtraLabels(currentClassName, name, desc); this.labelIter = extraLabels == null ? null : extraLabels.iterator(); final StringBuilder sb = new StringBuilder(); sb.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { sb.append(tab). append("// DEPRECATED\n"); } sb.append(tab). append("// access flags 0x"). append(Integer.toHexString(access).toUpperCase()). append('\n'); if (signature != null) { sb.append(tab); appendDescriptor(sb, METHOD_SIGNATURE, signature); final TraceSignatureVisitor v = new TraceSignatureVisitor(0); final SignatureReader r = new SignatureReader(signature); r.accept(v); final String genericDecl = v.getDeclaration(); final String genericReturn = v.getReturnType(); final String genericExceptions = v.getExceptions(); sb.append(tab). append("// declaration: "). append(genericReturn). append(' '). append(name). append(genericDecl); if (genericExceptions != null) { sb.append(" throws ").append(genericExceptions); } sb.append('\n'); } sb.append(tab); appendAccess(sb, access); if ((access & Opcodes.ACC_NATIVE) != 0) { sb.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { sb.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { sb.append("bridge "); } sb.append(name); appendDescriptor(sb, METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { sb.append(" throws "); for (final String exception : exceptions) { appendDescriptor(sb, INTERNAL_NAME, exception); sb.append(' '); } } sb.append('\n'); addText(sb); final NashornTextifier t = createNashornTextifier(); addText(t.getText()); return t; }
Example 8
Source File: Textifier.java From hottub with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 9
Source File: Textifier.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 10
Source File: NashornTextifier.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public NashornTextifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { graph = new Graph(name); final List<Label> extraLabels = cr.getExtraLabels(currentClassName, name, desc); this.labelIter = extraLabels == null ? null : extraLabels.iterator(); final StringBuilder sb = new StringBuilder(); sb.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { sb.append(tab). append("// DEPRECATED\n"); } sb.append(tab). append("// access flags 0x"). append(Integer.toHexString(access).toUpperCase()). append('\n'); if (signature != null) { sb.append(tab); appendDescriptor(sb, METHOD_SIGNATURE, signature); final TraceSignatureVisitor v = new TraceSignatureVisitor(0); final SignatureReader r = new SignatureReader(signature); r.accept(v); final String genericDecl = v.getDeclaration(); final String genericReturn = v.getReturnType(); final String genericExceptions = v.getExceptions(); sb.append(tab). append("// declaration: "). append(genericReturn). append(' '). append(name). append(genericDecl); if (genericExceptions != null) { sb.append(" throws ").append(genericExceptions); } sb.append('\n'); } sb.append(tab); appendAccess(sb, access); if ((access & Opcodes.ACC_NATIVE) != 0) { sb.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { sb.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { sb.append("bridge "); } sb.append(name); appendDescriptor(sb, METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { sb.append(" throws "); for (final String exception : exceptions) { appendDescriptor(sb, INTERNAL_NAME, exception); sb.append(' '); } } sb.append('\n'); addText(sb); final NashornTextifier t = createNashornTextifier(); addText(t.getText()); return t; }
Example 11
Source File: Textifier.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 12
Source File: Textifier.java From Bytecoder with Apache License 2.0 | 4 votes |
@Override public Textifier visitMethod( final int access, final String name, final String descriptor, final String signature, final String[] exceptions) { stringBuilder.setLength(0); stringBuilder.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { stringBuilder.append(tab).append(DEPRECATED); } stringBuilder.append(tab); appendRawAccess(access); if (signature != null) { stringBuilder.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); stringBuilder.append(tab); appendJavaDeclaration(name, signature); } stringBuilder.append(tab); appendAccess(access & ~(Opcodes.ACC_VOLATILE | Opcodes.ACC_TRANSIENT)); if ((access & Opcodes.ACC_NATIVE) != 0) { stringBuilder.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { stringBuilder.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { stringBuilder.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & (Opcodes.ACC_ABSTRACT | Opcodes.ACC_STATIC)) == 0) { stringBuilder.append("default "); } stringBuilder.append(name); appendDescriptor(METHOD_DESCRIPTOR, descriptor); if (exceptions != null && exceptions.length > 0) { stringBuilder.append(" throws "); for (String exception : exceptions) { appendDescriptor(INTERNAL_NAME, exception); stringBuilder.append(' '); } } stringBuilder.append('\n'); text.add(stringBuilder.toString()); return addNewTextifier(null); }
Example 13
Source File: NashornTextifier.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Override public NashornTextifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { graph = new Graph(name); final List<Label> extraLabels = cr.getExtraLabels(currentClassName, name, desc); this.labelIter = extraLabels == null ? null : extraLabels.iterator(); final StringBuilder sb = new StringBuilder(); sb.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { sb.append(tab). append("// DEPRECATED\n"); } sb.append(tab). append("// access flags 0x"). append(Integer.toHexString(access).toUpperCase()). append('\n'); if (signature != null) { sb.append(tab); appendDescriptor(sb, METHOD_SIGNATURE, signature); final TraceSignatureVisitor v = new TraceSignatureVisitor(0); final SignatureReader r = new SignatureReader(signature); r.accept(v); final String genericDecl = v.getDeclaration(); final String genericReturn = v.getReturnType(); final String genericExceptions = v.getExceptions(); sb.append(tab). append("// declaration: "). append(genericReturn). append(' '). append(name). append(genericDecl); if (genericExceptions != null) { sb.append(" throws ").append(genericExceptions); } sb.append('\n'); } sb.append(tab); appendAccess(sb, access); if ((access & Opcodes.ACC_NATIVE) != 0) { sb.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { sb.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { sb.append("bridge "); } sb.append(name); appendDescriptor(sb, METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { sb.append(" throws "); for (final String exception : exceptions) { appendDescriptor(sb, INTERNAL_NAME, exception); sb.append(' '); } } sb.append('\n'); addText(sb); final NashornTextifier t = createNashornTextifier(); addText(t.getText()); return t; }
Example 14
Source File: Textifier.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 15
Source File: NashornTextifier.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Override public NashornTextifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { graph = new Graph(name); final List<Label> extraLabels = cr.getExtraLabels(currentClassName, name, desc); this.labelIter = extraLabels == null ? null : extraLabels.iterator(); final StringBuilder sb = new StringBuilder(); sb.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { sb.append(tab). append("// DEPRECATED\n"); } sb.append(tab). append("// access flags 0x"). append(Integer.toHexString(access).toUpperCase()). append('\n'); if (signature != null) { sb.append(tab); appendDescriptor(sb, METHOD_SIGNATURE, signature); final TraceSignatureVisitor v = new TraceSignatureVisitor(0); final SignatureReader r = new SignatureReader(signature); r.accept(v); final String genericDecl = v.getDeclaration(); final String genericReturn = v.getReturnType(); final String genericExceptions = v.getExceptions(); sb.append(tab). append("// declaration: "). append(genericReturn). append(' '). append(name). append(genericDecl); if (genericExceptions != null) { sb.append(" throws ").append(genericExceptions); } sb.append('\n'); } sb.append(tab); appendAccess(sb, access); if ((access & Opcodes.ACC_NATIVE) != 0) { sb.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { sb.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { sb.append("bridge "); } sb.append(name); appendDescriptor(sb, METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { sb.append(" throws "); for (final String exception : exceptions) { appendDescriptor(sb, INTERNAL_NAME, exception); sb.append(' '); } } sb.append('\n'); addText(sb); final NashornTextifier t = createNashornTextifier(); addText(t.getText()); return t; }
Example 16
Source File: Textifier.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 17
Source File: Textifier.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 18
Source File: Textifier.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }
Example 19
Source File: NashornTextifier.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Override public NashornTextifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { graph = new Graph(name); final List<Label> extraLabels = cr.getExtraLabels(currentClassName, name, desc); this.labelIter = extraLabels == null ? null : extraLabels.iterator(); final StringBuilder sb = new StringBuilder(); sb.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { sb.append(tab). append("// DEPRECATED\n"); } sb.append(tab). append("// access flags 0x"). append(Integer.toHexString(access).toUpperCase()). append('\n'); if (signature != null) { sb.append(tab); appendDescriptor(sb, METHOD_SIGNATURE, signature); final TraceSignatureVisitor v = new TraceSignatureVisitor(0); final SignatureReader r = new SignatureReader(signature); r.accept(v); final String genericDecl = v.getDeclaration(); final String genericReturn = v.getReturnType(); final String genericExceptions = v.getExceptions(); sb.append(tab). append("// declaration: "). append(genericReturn). append(' '). append(name). append(genericDecl); if (genericExceptions != null) { sb.append(" throws ").append(genericExceptions); } sb.append('\n'); } sb.append(tab); appendAccess(sb, access); if ((access & Opcodes.ACC_NATIVE) != 0) { sb.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { sb.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { sb.append("bridge "); } sb.append(name); appendDescriptor(sb, METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { sb.append(" throws "); for (final String exception : exceptions) { appendDescriptor(sb, INTERNAL_NAME, exception); sb.append(' '); } } sb.append('\n'); addText(sb); final NashornTextifier t = createNashornTextifier(); addText(t.getText()); return t; }
Example 20
Source File: Textifier.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Override public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { buf.setLength(0); buf.append('\n'); if ((access & Opcodes.ACC_DEPRECATED) != 0) { buf.append(tab).append("// DEPRECATED\n"); } buf.append(tab).append("// access flags 0x") .append(Integer.toHexString(access).toUpperCase()).append('\n'); if (signature != null) { buf.append(tab); appendDescriptor(METHOD_SIGNATURE, signature); TraceSignatureVisitor v = new TraceSignatureVisitor(0); SignatureReader r = new SignatureReader(signature); r.accept(v); String genericDecl = v.getDeclaration(); String genericReturn = v.getReturnType(); String genericExceptions = v.getExceptions(); buf.append(tab).append("// declaration: ").append(genericReturn) .append(' ').append(name).append(genericDecl); if (genericExceptions != null) { buf.append(" throws ").append(genericExceptions); } buf.append('\n'); } buf.append(tab); appendAccess(access & ~Opcodes.ACC_VOLATILE); if ((access & Opcodes.ACC_NATIVE) != 0) { buf.append("native "); } if ((access & Opcodes.ACC_VARARGS) != 0) { buf.append("varargs "); } if ((access & Opcodes.ACC_BRIDGE) != 0) { buf.append("bridge "); } if ((this.access & Opcodes.ACC_INTERFACE) != 0 && (access & Opcodes.ACC_ABSTRACT) == 0 && (access & Opcodes.ACC_STATIC) == 0) { buf.append("default "); } buf.append(name); appendDescriptor(METHOD_DESCRIPTOR, desc); if (exceptions != null && exceptions.length > 0) { buf.append(" throws "); for (int i = 0; i < exceptions.length; ++i) { appendDescriptor(INTERNAL_NAME, exceptions[i]); buf.append(' '); } } buf.append('\n'); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); return t; }