private void writeAnnotationTarget(PackedDataOutputStream stream, AnnotationTarget target) throws IOException { if (target instanceof FieldInfo) { stream.writeByte(FIELD_TAG); } else if (target instanceof MethodInfo) { stream.writeByte(METHOD_TAG); } else if (target instanceof MethodParameterInfo) { MethodParameterInfo param = (MethodParameterInfo) target; stream.writeByte(METHOD_PARAMATER_TAG); stream.writePackedU32(param.position()); } else if (target instanceof ClassInfo) { stream.writeByte(CLASS_TAG); } else if (target instanceof TypeTarget) { writeTypeTarget(stream, (TypeTarget)target); } else if (target == null) { stream.writeByte(NULL_TARGET_TAG); } else { throw new IllegalStateException("Unknown target"); } }
stream.writePackedU32(param.position()); } else if (target instanceof ClassInfo) { stream.writeByte(CLASS_TAG);