public static void writeTo(@Nonnull IndentingWriter writer, @Nonnull AnnotationEncodedValue annotationEncodedValue, @Nullable String containingClass) throws IOException { writer.write(".subannotation "); writer.write(annotationEncodedValue.getType()); writer.write('\n'); writeElementsTo(writer, annotationEncodedValue.getElements(), containingClass); writer.write(".end subannotation"); }
public static void writeElementsTo(@Nonnull IndentingWriter writer, @Nonnull Collection<? extends AnnotationElement> annotationElements, @Nullable String containingClass) throws IOException { writer.indent(4); for (AnnotationElement annotationElement: annotationElements) { writer.write(annotationElement.getName()); writer.write(" = "); EncodedValueAdaptor.writeTo(writer, annotationElement.getValue(), containingClass); writer.write('\n'); } writer.deindent(4); } }
switch (encodedValue.getValueType()) { case ValueType.ANNOTATION: AnnotationEncodedValueAdaptor.writeTo(writer, (AnnotationEncodedValue)encodedValue, containingClass); return; case ValueType.ARRAY: ArrayEncodedValueAdaptor.writeTo(writer, (ArrayEncodedValue)encodedValue, containingClass); return; case ValueType.BOOLEAN:
public static void writeElementsTo(@Nonnull IndentingWriter writer, @Nonnull Collection<? extends AnnotationElement> annotationElements, @Nullable String containingClass) throws IOException { writer.indent(4); for (AnnotationElement annotationElement: annotationElements) { writer.write(annotationElement.getName()); writer.write(" = "); EncodedValueAdaptor.writeTo(writer, annotationElement.getValue(), containingClass); writer.write('\n'); } writer.deindent(4); } }
public static void writeTo(IndentingWriter writer, EncodedValue encodedValue) throws IOException { switch (encodedValue.getValueType()) { case ValueType.ANNOTATION: AnnotationEncodedValueAdaptor.writeTo(writer, (AnnotationEncodedValue)encodedValue); return; case ValueType.ARRAY: ArrayEncodedValueAdaptor.writeTo(writer, (ArrayEncodedValue)encodedValue); return; case ValueType.BOOLEAN:
public static void writeTo(@Nonnull IndentingWriter writer, @Nonnull AnnotationEncodedValue annotationEncodedValue, @Nullable String containingClass) throws IOException { writer.write(".subannotation "); writer.write(annotationEncodedValue.getType()); writer.write('\n'); writeElementsTo(writer, annotationEncodedValue.getElements(), containingClass); writer.write(".end subannotation"); }
public static void writeTo(@Nonnull IndentingWriter writer, @Nonnull ArrayEncodedValue arrayEncodedValue, @Nullable String containingClass) throws IOException { writer.write('{'); Collection<? extends EncodedValue> values = arrayEncodedValue.getValue(); if (values.size() == 0) { writer.write('}'); return; } writer.write('\n'); writer.indent(4); boolean first = true; for (EncodedValue encodedValue: values) { if (!first) { writer.write(",\n"); } first = false; EncodedValueAdaptor.writeTo(writer, encodedValue, containingClass); } writer.deindent(4); writer.write("\n}"); } }
public static void writeTo(IndentingWriter writer, AnnotationEncodedValue annotationEncodedValue) throws IOException { writer.write(".subannotation "); writer.write(annotationEncodedValue.getType()); writer.write('\n'); writeElementsTo(writer, annotationEncodedValue.getElements()); writer.write(".end subannotation"); }
public static void writeElementsTo(IndentingWriter writer, Collection<? extends AnnotationElement> annotationElements) throws IOException { writer.indent(4); for (AnnotationElement annotationElement: annotationElements) { writer.write(annotationElement.getName()); writer.write(" = "); EncodedValueAdaptor.writeTo(writer, annotationElement.getValue()); writer.write('\n'); } writer.deindent(4); } }
public static void writeTo(@Nonnull IndentingWriter writer, @Nonnull Annotation annotation, @Nullable String containingClass) throws IOException { writer.write(".annotation "); writer.write(AnnotationVisibility.getVisibility(annotation.getVisibility())); writer.write(' '); writer.write(annotation.getType()); writer.write('\n'); AnnotationEncodedValueAdaptor.writeElementsTo(writer, annotation.getElements(), containingClass); writer.write(".end annotation\n"); } }
public static void writeTo(@Nonnull IndentingWriter writer, @Nonnull ArrayEncodedValue arrayEncodedValue, @Nullable String containingClass) throws IOException { writer.write('{'); Collection<? extends EncodedValue> values = arrayEncodedValue.getValue(); if (values.size() == 0) { writer.write('}'); return; } writer.write('\n'); writer.indent(4); boolean first = true; for (EncodedValue encodedValue: values) { if (!first) { writer.write(",\n"); } first = false; EncodedValueAdaptor.writeTo(writer, encodedValue, containingClass); } writer.deindent(4); writer.write("\n}"); } }
public static void writeTo(@Nonnull IndentingWriter writer, @Nonnull Annotation annotation, @Nullable String containingClass) throws IOException { writer.write(".annotation "); writer.write(AnnotationVisibility.getVisibility(annotation.getVisibility())); writer.write(' '); writer.write(annotation.getType()); writer.write('\n'); AnnotationEncodedValueAdaptor.writeElementsTo(writer, annotation.getElements(), containingClass); writer.write(".end annotation\n"); } }
public static void writeTo(IndentingWriter writer, ArrayEncodedValue arrayEncodedValue) throws IOException { writer.write('{'); Collection<? extends EncodedValue> values = arrayEncodedValue.getValue(); if (values.size() == 0) { writer.write('}'); return; } writer.write('\n'); writer.indent(4); boolean first = true; for (EncodedValue encodedValue: values) { if (!first) { writer.write(",\n"); } first = false; EncodedValueAdaptor.writeTo(writer, encodedValue); } writer.deindent(4); writer.write("\n}"); } }
public static void writeTo(IndentingWriter writer, Annotation annotation) throws IOException { writer.write(".annotation "); writer.write(AnnotationVisibility.getVisibility(annotation.getVisibility())); writer.write(' '); writer.write(annotation.getType()); writer.write('\n'); AnnotationEncodedValueAdaptor.writeElementsTo(writer, annotation.getElements()); writer.write(".end annotation\n"); } }
public static void writeTo(IndentingWriter writer, ArrayEncodedValue arrayEncodedValue, String containingClass) throws IOException { writer.write('{'); Collection<? extends EncodedValue> values = arrayEncodedValue.getValue(); if (values.size() == 0) { writer.write('}'); return; } writer.write('\n'); writer.indent(4); boolean first = true; for (EncodedValue encodedValue : values) { if (!first) { writer.write(",\n"); } first = false; EncodedValueAdaptor.writeTo(writer, encodedValue, containingClass); } writer.deindent(4); writer.write("\n}"); } }
public static void writeCallSiteReference(IndentingWriter writer, CallSiteReference callSite) throws IOException { writer.write(callSite.getName()); writer.write('('); writer.write('"'); StringUtils.writeEscapedString(writer, callSite.getMethodName()); writer.write("\", "); writeReference(writer, ReferenceType.METHOD_PROTO, callSite.getMethodProto()); for (EncodedValue encodedValue : callSite.getExtraArguments()) { writer.write(", "); EncodedValueAdaptor.writeTo(writer, encodedValue, null); } writer.write(")@"); MethodHandleReference methodHandle = callSite.getMethodHandle(); if (methodHandle.getMethodHandleType() != MethodHandleType.INVOKE_STATIC) { throw new IllegalArgumentException("The linker method handle for a call site must be of type invoke-static"); } writeReference(writer, ReferenceType.METHOD, callSite.getMethodHandle().getMemberReference()); }
public static void writeCallSiteReference(IndentingWriter writer, CallSiteReference callSite) throws IOException { writer.write(callSite.getName()); writer.write('('); writer.write('"'); StringUtils.writeEscapedString(writer, callSite.getMethodName()); writer.write("\", "); writeReference(writer, ReferenceType.METHOD_PROTO, callSite.getMethodProto()); for (EncodedValue encodedValue : callSite.getExtraArguments()) { writer.write(", "); EncodedValueAdaptor.writeTo(writer, encodedValue, null); } writer.write(")@"); MethodHandleReference methodHandle = callSite.getMethodHandle(); if (methodHandle.getMethodHandleType() != MethodHandleType.INVOKE_STATIC) { throw new IllegalArgumentException("The linker method handle for a call site must be of type invoke-static"); } writeReference(writer, ReferenceType.METHOD, callSite.getMethodHandle().getMemberReference()); }
if (initialValue != null) { writer.write(" = "); EncodedValueAdaptor.writeTo(writer, initialValue);
EncodedValueAdaptor.writeTo(writer, initialValue, containingClass);
EncodedValueAdaptor.writeTo(writer, initialValue, containingClass);