@Override public Textifier visitAnnotationDefault() { text.add(tab2 + "default="); return addNewTextifier("\n"); }
@Override public Textifier visitAnnotationDefault() { text.add(tab2 + "default="); return addNewTextifier("\n"); }
@Override public Textifier visitArray(final String name) { visitAnnotationValue(name); stringBuilder.append('{'); text.add(stringBuilder.toString()); return addNewTextifier("}"); }
@Override public Printer visitModule(final String name, final int access, final String version) { stringBuilder.setLength(0); if ((access & Opcodes.ACC_OPEN) != 0) { stringBuilder.append("open "); } stringBuilder .append("module ") .append(name) .append(" { ") .append(version == null ? "" : "// " + version) .append("\n\n"); text.add(stringBuilder.toString()); return addNewTextifier(null); }
@Override public Textifier visitArray(final String name) { visitAnnotationValue(name); stringBuilder.append('{'); text.add(stringBuilder.toString()); return addNewTextifier("}"); }
@Override public Printer visitModule(final String name, final int access, final String version) { stringBuilder.setLength(0); if ((access & Opcodes.ACC_OPEN) != 0) { stringBuilder.append("open "); } stringBuilder .append("module ") .append(name) .append(" { ") .append(version == null ? "" : "// " + version) .append("\n\n"); text.add(stringBuilder.toString()); return addNewTextifier(null); }
/** * Prints a disassembled view of the given annotation. * * @param descriptor the class descriptor of the annotation class. * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values. */ // DontCheck(OverloadMethodsDeclarationOrder): overloads are semantically different. public Textifier visitAnnotation(final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab).append('@'); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); return addNewTextifier(visible ? ")\n" : ") // invisible\n"); }
@Override public Textifier visitParameterAnnotation( final int parameter, final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab2).append('@'); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); stringBuilder.setLength(0); stringBuilder .append(visible ? ") // parameter " : ") // invisible, parameter ") .append(parameter) .append('\n'); return addNewTextifier(stringBuilder.toString()); }
@Override public Textifier visitAnnotation(final String name, final String descriptor) { visitAnnotationValue(name); stringBuilder.append('@'); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); return addNewTextifier(")"); }
@Override public Textifier visitParameterAnnotation( final int parameter, final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab2).append('@'); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); stringBuilder.setLength(0); stringBuilder .append(visible ? ") // parameter " : ") // invisible, parameter ") .append(parameter) .append('\n'); return addNewTextifier(stringBuilder.toString()); }
/** * Prints a disassembled view of the given annotation. * * @param descriptor the class descriptor of the annotation class. * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values. */ // DontCheck(OverloadMethodsDeclarationOrder): overloads are semantically different. public Textifier visitAnnotation(final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab).append('@'); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); return addNewTextifier(visible ? ")\n" : ") // invisible\n"); }
@Override public Textifier visitAnnotation(final String name, final String descriptor) { visitAnnotationValue(name); stringBuilder.append('@'); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); return addNewTextifier(")"); }
@Override public Printer visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab2).append("TRYCATCHBLOCK @"); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); stringBuilder.setLength(0); stringBuilder.append(") : "); appendTypeReference(typeRef); stringBuilder.append(", ").append(typePath); stringBuilder.append(visible ? "\n" : INVISIBLE); return addNewTextifier(stringBuilder.toString()); }
@Override public Printer visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab2).append("TRYCATCHBLOCK @"); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); stringBuilder.setLength(0); stringBuilder.append(") : "); appendTypeReference(typeRef); stringBuilder.append(", ").append(typePath); stringBuilder.append(visible ? "\n" : INVISIBLE); return addNewTextifier(stringBuilder.toString()); }
/** * Prints a disassembled view of the given type annotation. * * @param typeRef a reference to the annotated type. See {@link TypeReference}. * @param typePath the path to the annotated type argument, wildcard bound, array element type, or * static inner type within 'typeRef'. May be {@literal null} if the annotation targets * 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values. */ public Textifier visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab).append('@'); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); stringBuilder.setLength(0); stringBuilder.append(") : "); appendTypeReference(typeRef); stringBuilder.append(", ").append(typePath); stringBuilder.append(visible ? "\n" : INVISIBLE); return addNewTextifier(stringBuilder.toString()); }
/** * Prints a disassembled view of the given type annotation. * * @param typeRef a reference to the annotated type. See {@link TypeReference}. * @param typePath the path to the annotated type argument, wildcard bound, array element type, or * static inner type within 'typeRef'. May be {@literal null} if the annotation targets * 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values. */ public Textifier visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab).append('@'); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); stringBuilder.setLength(0); stringBuilder.append(") : "); appendTypeReference(typeRef); stringBuilder.append(", ").append(typePath); stringBuilder.append(visible ? "\n" : INVISIBLE); return addNewTextifier(stringBuilder.toString()); }
@Override public Printer visitLocalVariableAnnotation( final int typeRef, final TypePath typePath, final Label[] start, final Label[] end, final int[] index, final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab2).append("LOCALVARIABLE @"); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); stringBuilder.setLength(0); stringBuilder.append(") : "); appendTypeReference(typeRef); stringBuilder.append(", ").append(typePath); for (int i = 0; i < start.length; ++i) { stringBuilder.append(" [ "); appendLabel(start[i]); stringBuilder.append(" - "); appendLabel(end[i]); stringBuilder.append(" - ").append(index[i]).append(" ]"); } stringBuilder.append(visible ? "\n" : INVISIBLE); return addNewTextifier(stringBuilder.toString()); }
@Override public Printer visitLocalVariableAnnotation( final int typeRef, final TypePath typePath, final Label[] start, final Label[] end, final int[] index, final String descriptor, final boolean visible) { stringBuilder.setLength(0); stringBuilder.append(tab2).append("LOCALVARIABLE @"); appendDescriptor(FIELD_DESCRIPTOR, descriptor); stringBuilder.append('('); text.add(stringBuilder.toString()); stringBuilder.setLength(0); stringBuilder.append(") : "); appendTypeReference(typeRef); stringBuilder.append(", ").append(typePath); for (int i = 0; i < start.length; ++i) { stringBuilder.append(" [ "); appendLabel(start[i]); stringBuilder.append(" - "); appendLabel(end[i]); stringBuilder.append(" - ").append(index[i]).append(" ]"); } stringBuilder.append(visible ? "\n" : INVISIBLE); return addNewTextifier(stringBuilder.toString()); }