private void buildAValueEntries(AnnotationValue value) { addString(value.name()); if (value instanceof AnnotationValue.StringValue) { addString(value.asString()); } else if (value instanceof AnnotationValue.ClassValue) { addType(value.asClass()); } else if (value instanceof AnnotationValue.EnumValue) { addClassName(value.asEnumType()); addString(value.asEnum()); } else if (value instanceof AnnotationValue.ArrayValue) { for (AnnotationValue entry : value.asArray()) buildAValueEntries(entry); } else if (value instanceof AnnotationValue.NestedAnnotation) { AnnotationInstance instance = value.asNested(); addAnnotation(instance); } }
private void buildAValueEntries(Index index, AnnotationValue value) { intern(value.name()); if (value instanceof AnnotationValue.StringValue) { intern(value.asString()); } else if (value instanceof AnnotationValue.ClassValue) { addClassName(value.asClass().name()); } else if (value instanceof AnnotationValue.EnumValue) { addClassName(value.asEnumType()); intern(value.asEnum()); } else if (value instanceof AnnotationValue.ArrayValue) { for (AnnotationValue entry : value.asArray()) buildAValueEntries(index, entry); } else if (value instanceof AnnotationValue.NestedAnnotation) { AnnotationInstance instance = value.asNested(); Collection<AnnotationValue> values = instance.values(); addClassName(instance.name()); for (AnnotationValue entry : values) { buildAValueEntries(index, entry); } } }
stream.writePackedU32(positionOf(value.asEnum())); } else if (value instanceof AnnotationValue.ArrayValue) { AnnotationValue[] array = value.asArray(); int length = array.length; stream.writeByte(AVALUE_ARRAY);
stream.writePackedU32(positionOf(value.asEnum())); } else if (value instanceof AnnotationValue.ArrayValue) { AnnotationValue[] array = value.asArray(); int length = array.length; stream.writeByte(AVALUE_ARRAY);