/** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { int num = values == null ? 0 : values.length; writer.arrayValue(num); for (int i = 0; i < num; ++i) values[i].write(writer); }
/** * Writes the value. */ @Override public void write(AnnotationsWriter writer) throws IOException { int num = values == null ? 0 : values.length; writer.arrayValue(num); for (int i = 0; i < num; ++i) values[i].write(writer); }
/** * Changes the default value represented by this attribute. * * @param value the new value. * @see javassist.bytecode.annotation.Annotation#createMemberValue(ConstPool, CtClass) */ public void setDefaultValue(MemberValue value) { ByteArrayOutputStream output = new ByteArrayOutputStream(); AnnotationsWriter writer = new AnnotationsWriter(output, constPool); try { value.write(writer); writer.close(); } catch (IOException e) { throw new RuntimeException(e); // should never reach here. } set(output.toByteArray()); }
/** * Writes this annotation. * * @param writer the output. * @throws IOException for an error during the write */ public void write(AnnotationsWriter writer) throws IOException { String typeName = pool.getUtf8Info(typeIndex); if (members == null) { writer.annotation(typeName, 0); return; } writer.annotation(typeName, members.size()); Iterator it = members.values().iterator(); while (it.hasNext()) { Pair pair = (Pair)it.next(); writer.memberValuePair(pair.name); pair.value.write(writer); } }
/** * Changes the default value represented by this attribute. * * @param value the new value. * @see javassist.bytecode.annotation.Annotation#createMemberValue(ConstPool, CtClass) */ public void setDefaultValue(MemberValue value) { ByteArrayOutputStream output = new ByteArrayOutputStream(); AnnotationsWriter writer = new AnnotationsWriter(output, constPool); try { value.write(writer); writer.close(); } catch (IOException e) { throw new RuntimeException(e); // should never reach here. } set(output.toByteArray()); }
/** * Writes this annotation. * * @param writer the output. * @throws IOException for an error during the write */ public void write(AnnotationsWriter writer) throws IOException { String typeName = pool.getUtf8Info(typeIndex); if (members == null) { writer.annotation(typeName, 0); return; } writer.annotation(typeName, members.size()); for (Pair pair:members.values()) { writer.memberValuePair(pair.name); pair.value.write(writer); } }
/** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { int num = values.length; writer.arrayValue(num); for (int i = 0; i < num; ++i) values[i].write(writer); }
/** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { int num = values.length; writer.arrayValue(num); for (int i = 0; i < num; ++i) values[i].write(writer); }
/** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { int num = values.length; writer.arrayValue(num); for (int i = 0; i < num; ++i) values[i].write(writer); }
/** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { int num = values.length; writer.arrayValue(num); for (int i = 0; i < num; ++i) values[i].write(writer); }
/** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { int num = values.length; writer.arrayValue(num); for (int i = 0; i < num; ++i) values[i].write(writer); }
/** * Changes the default value represented by this attribute. * * @param value the new value. * @see javassist.bytecode.annotation.Annotation#createMemberValue(ConstPool, CtClass) */ public void setDefaultValue(MemberValue value) { ByteArrayOutputStream output = new ByteArrayOutputStream(); AnnotationsWriter writer = new AnnotationsWriter(output, constPool); try { value.write(writer); writer.close(); } catch (IOException e) { throw new RuntimeException(e); // should never reach here. } set(output.toByteArray()); }
/** * Changes the default value represented by this attribute. * * @param value the new value. * @see javassist.bytecode.annotation.Annotation#createMemberValue(ConstPool, CtClass) */ public void setDefaultValue(MemberValue value) { ByteArrayOutputStream output = new ByteArrayOutputStream(); AnnotationsWriter writer = new AnnotationsWriter(output, constPool); try { value.write(writer); writer.close(); } catch (IOException e) { throw new RuntimeException(e); // should never reach here. } set(output.toByteArray()); }
/** * Changes the default value represented by this attribute. * * @param value the new value. * @see javassist.bytecode.annotation.Annotation#createMemberValue(ConstPool, CtClass) */ public void setDefaultValue(MemberValue value) { ByteArrayOutputStream output = new ByteArrayOutputStream(); AnnotationsWriter writer = new AnnotationsWriter(output, constPool); try { value.write(writer); writer.close(); } catch (IOException e) { throw new RuntimeException(e); // should never reach here. } set(output.toByteArray()); }
/** * Changes the default value represented by this attribute. * * @param value the new value. * @see javassist.bytecode.annotation.Annotation#createMemberValue(ConstPool, CtClass) */ public void setDefaultValue(MemberValue value) { ByteArrayOutputStream output = new ByteArrayOutputStream(); AnnotationsWriter writer = new AnnotationsWriter(output, constPool); try { value.write(writer); writer.close(); } catch (IOException e) { throw new RuntimeException(e); // should never reach here. } set(output.toByteArray()); }
/** * Changes the default value represented by this attribute. * * @param value the new value. * @see javassist.bytecode.annotation.Annotation#createMemberValue(ConstPool, CtClass) */ public void setDefaultValue(MemberValue value) { ByteArrayOutputStream output = new ByteArrayOutputStream(); AnnotationsWriter writer = new AnnotationsWriter(output, constPool); try { value.write(writer); writer.close(); } catch (IOException e) { throw new RuntimeException(e); // should never reach here. } set(output.toByteArray()); }
/** * Writes this annotation. * * @param writer the output. * @throws IOException for an error during the write */ public void write(AnnotationsWriter writer) throws IOException { String typeName = pool.getUtf8Info(typeIndex); if (members == null) { writer.annotation(typeName, 0); return; } writer.annotation(typeName, members.size()); Iterator it = members.values().iterator(); while (it.hasNext()) { Pair pair = (Pair)it.next(); writer.memberValuePair(pair.name); pair.value.write(writer); } }
/** * Writes this annotation. * * @param writer the output. * @throws IOException for an error during the write */ public void write(AnnotationsWriter writer) throws IOException { String typeName = pool.getUtf8Info(typeIndex); if (members == null) { writer.annotation(typeName, 0); return; } writer.annotation(typeName, members.size()); Iterator it = members.values().iterator(); while (it.hasNext()) { Pair pair = (Pair)it.next(); writer.memberValuePair(pair.name); pair.value.write(writer); } }
/** * Writes this annotation. * * @param writer the output. * @throws IOException for an error during the write */ public void write(AnnotationsWriter writer) throws IOException { String typeName = pool.getUtf8Info(typeIndex); if (members == null) { writer.annotation(typeName, 0); return; } writer.annotation(typeName, members.size()); Iterator it = members.values().iterator(); while (it.hasNext()) { Pair pair = (Pair)it.next(); writer.memberValuePair(pair.name); pair.value.write(writer); } }
/** * Writes this annotation. * * @param writer the output. * @throws IOException for an error during the write */ public void write(AnnotationsWriter writer) throws IOException { String typeName = pool.getUtf8Info(typeIndex); if (members == null) { writer.annotation(typeName, 0); return; } writer.annotation(typeName, members.size()); Iterator it = members.values().iterator(); while (it.hasNext()) { Pair pair = (Pair)it.next(); writer.memberValuePair(pair.name); pair.value.write(writer); } }