@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()); }
@Override public Printer visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) { buf.setLength(0); buf.append(tab2).append("TRYCATCHBLOCK @"); appendDescriptor(FIELD_DESCRIPTOR, desc); buf.append('('); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); buf.setLength(0); buf.append(") : "); appendTypeReference(typeRef); buf.append(", ").append(typePath); buf.append(visible ? "\n" : " // invisible\n"); text.add(buf.toString()); return t; }
/** * 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(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String desc, boolean visible) { buf.setLength(0); buf.append(tab2).append("LOCALVARIABLE @"); appendDescriptor(FIELD_DESCRIPTOR, desc); buf.append('('); text.add(buf.toString()); Textifier t = createTextifier(); text.add(t.getText()); buf.setLength(0); buf.append(") : "); appendTypeReference(typeRef); buf.append(", ").append(typePath); for (int i = 0; i < start.length; ++i) { buf.append(" [ "); appendLabel(start[i]); buf.append(" - "); appendLabel(end[i]); buf.append(" - ").append(index[i]).append(" ]"); } buf.append(visible ? "\n" : " // invisible\n"); text.add(buf.toString()); return t; }
@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()); }
buf.setLength(0); buf.append(") : "); appendTypeReference(typeRef); buf.append(", ").append(typePath); buf.append(visible ? "\n" : " // invisible\n");