annotation.add(nvp); annotations.add(annotation); classDefItem.addMethodAnnotations(cstMethodRef, annotations, dexMaker.getDexFile());
/** * Constructs an immutable instance which is the combination of the * given instance with the given additional annotation. The latter's * type must not already appear in the former. * * @param annotations {@code non-null;} the instance to augment * @param annotation {@code non-null;} the additional annotation * @return {@code non-null;} the combination * @throws IllegalArgumentException thrown if there is a duplicate type */ public static Annotations combine(Annotations annotations, Annotation annotation) { Annotations result = new Annotations(); result.addAll(annotations); result.add(annotation); result.setImmutable(); return result; }
/** * Constructs an immutable instance which is the combination of the * given instance with the given additional annotation. The latter's * type must not already appear in the former. * * @param annotations {@code non-null;} the instance to augment * @param annotation {@code non-null;} the additional annotation * @return {@code non-null;} the combination * @throws IllegalArgumentException thrown if there is a duplicate type */ public static Annotations combine(Annotations annotations, Annotation annotation) { Annotations result = new Annotations(); result.addAll(annotations); result.add(annotation); result.setImmutable(); return result; }
/** * Adds all of the elements of the given instance to this one. The * instances must not have any duplicate types. * * @param toAdd {@code non-null;} the annotations to add * @throws IllegalArgumentException thrown if there is a duplicate type */ public void addAll(Annotations toAdd) { throwIfImmutable(); if (toAdd == null) { throw new NullPointerException("toAdd == null"); } for (Annotation a : toAdd.annotations.values()) { add(a); } }
/** * Constructs an immutable instance which is the combination of the * given instance with the given additional annotation. The latter's * type must not already appear in the former. * * @param annotations {@code non-null;} the instance to augment * @param annotation {@code non-null;} the additional annotation * @return {@code non-null;} the combination * @throws IllegalArgumentException thrown if there is a duplicate type */ public static Annotations combine(Annotations annotations, Annotation annotation) { Annotations result = new Annotations(); result.addAll(annotations); result.add(annotation); result.setImmutable(); return result; }
/** * Adds all of the elements of the given instance to this one. The * instances must not have any duplicate types. * * @param toAdd {@code non-null;} the annotations to add * @throws IllegalArgumentException thrown if there is a duplicate type */ public void addAll(Annotations toAdd) { throwIfImmutable(); if (toAdd == null) { throw new NullPointerException("toAdd == null"); } for (Annotation a : toAdd.annotations.values()) { add(a); } }
/** * Constructs an immutable instance which is the combination of the * given instance with the given additional annotation. The latter's * type must not already appear in the former. * * @param annotations {@code non-null;} the instance to augment * @param annotation {@code non-null;} the additional annotation * @return {@code non-null;} the combination * @throws IllegalArgumentException thrown if there is a duplicate type */ public static Annotations combine(Annotations annotations, Annotation annotation) { Annotations result = new Annotations(); result.addAll(annotations); result.add(annotation); result.setImmutable(); return result; }
/** * Adds all of the elements of the given instance to this one. The * instances must not have any duplicate types. * * @param toAdd {@code non-null;} the annotations to add * @throws IllegalArgumentException thrown if there is a duplicate type */ public void addAll(Annotations toAdd) { throwIfImmutable(); if (toAdd == null) { throw new NullPointerException("toAdd == null"); } for (Annotation a : toAdd.annotations.values()) { add(a); } }
/** * Constructs an immutable instance which is the combination of the * given instance with the given additional annotation. The latter's * type must not already appear in the former. * * @param annotations {@code non-null;} the instance to augment * @param annotation {@code non-null;} the additional annotation * @return {@code non-null;} the combination * @throws IllegalArgumentException thrown if there is a duplicate type */ public static Annotations combine(Annotations annotations, Annotation annotation) { Annotations result = new Annotations(); result.addAll(annotations); result.add(annotation); result.setImmutable(); return result; }
/** * Adds all of the elements of the given instance to this one. The * instances must not have any duplicate types. * * @param toAdd {@code non-null;} the annotations to add * @throws IllegalArgumentException thrown if there is a duplicate type */ public void addAll(Annotations toAdd) { throwIfImmutable(); if (toAdd == null) { throw new NullPointerException("toAdd == null"); } for (Annotation a : toAdd.annotations.values()) { add(a); } }
/** * Constructs an immutable instance which is the combination of the * given instance with the given additional annotation. The latter's * type must not already appear in the former. * * @param annotations {@code non-null;} the instance to augment * @param annotation {@code non-null;} the additional annotation * @return {@code non-null;} the combination * @throws IllegalArgumentException thrown if there is a duplicate type */ public static Annotations combine(Annotations annotations, Annotation annotation) { Annotations result = new Annotations(); result.addAll(annotations); result.add(annotation); result.setImmutable(); return result; }
/** * Adds all of the elements of the given instance to this one. The * instances must not have any duplicate types. * * @param toAdd {@code non-null;} the annotations to add * @throws IllegalArgumentException thrown if there is a duplicate type */ public void addAll(Annotations toAdd) { throwIfImmutable(); if (toAdd == null) { throw new NullPointerException("toAdd == null"); } for (Annotation a : toAdd.annotations.values()) { add(a); } }
/** * Constructs an immutable instance which is the combination of the * given instance with the given additional annotation. The latter's * type must not already appear in the former. * * @param annotations {@code non-null;} the instance to augment * @param annotation {@code non-null;} the additional annotation * @return {@code non-null;} the combination * @throws IllegalArgumentException thrown if there is a duplicate type */ public static Annotations combine(Annotations annotations, Annotation annotation) { Annotations result = new Annotations(); result.addAll(annotations); result.add(annotation); result.setImmutable(); return result; }
/** * Adds all of the elements of the given instance to this one. The * instances must not have any duplicate types. * * @param toAdd {@code non-null;} the annotations to add * @throws IllegalArgumentException thrown if there is a duplicate type */ public void addAll(Annotations toAdd) { throwIfImmutable(); if (toAdd == null) { throw new NullPointerException("toAdd == null"); } for (Annotation a : toAdd.annotations.values()) { add(a); } }
/** * Constructs an immutable instance which is the combination of the * given instance with the given additional annotation. The latter's * type must not already appear in the former. * * @param annotations {@code non-null;} the instance to augment * @param annotation {@code non-null;} the additional annotation * @return {@code non-null;} the combination * @throws IllegalArgumentException thrown if there is a duplicate type */ public static Annotations combine(Annotations annotations, Annotation annotation) { Annotations result = new Annotations(); result.addAll(annotations); result.add(annotation); result.setImmutable(); return result; }
/** * Adds all of the elements of the given instance to this one. The * instances must not have any duplicate types. * * @param toAdd {@code non-null;} the annotations to add * @throws IllegalArgumentException thrown if there is a duplicate type */ public void addAll(Annotations toAdd) { throwIfImmutable(); if (toAdd == null) { throw new NullPointerException("toAdd == null"); } for (Annotation a : toAdd.annotations.values()) { add(a); } }
/** * Adds all of the elements of the given instance to this one. The * instances must not have any duplicate types. * * @param toAdd {@code non-null;} the annotations to add * @throws IllegalArgumentException thrown if there is a duplicate type */ public void addAll(Annotations toAdd) { throwIfImmutable(); if (toAdd == null) { throw new NullPointerException("toAdd == null"); } for (Annotation a : toAdd.annotations.values()) { add(a); } }
/** * Parses an annotation list. * * @param visibility {@code non-null;} visibility of the parsed annotations * @return {@code non-null;} the list of annotations read from the attribute * data */ private Annotations parseAnnotations(AnnotationVisibility visibility) throws IOException { int count = input.readUnsignedShort(); if (observer != null) { parsed(2, "num_annotations: " + Hex.u2(count)); } Annotations annotations = new Annotations(); for (int i = 0; i < count; i++) { if (observer != null) { parsed(0, "annotations[" + i + "]:"); changeIndent(1); } Annotation annotation = parseAnnotation(visibility); annotations.add(annotation); if (observer != null) { observer.changeIndent(-1); } } annotations.setImmutable(); return annotations; }
/** * Parses an annotation list. * * @param visibility {@code non-null;} visibility of the parsed annotations * @return {@code non-null;} the list of annotations read from the attribute * data */ private Annotations parseAnnotations(AnnotationVisibility visibility) throws IOException { int count = input.readUnsignedShort(); if (observer != null) { parsed(2, "num_annotations: " + Hex.u2(count)); } Annotations annotations = new Annotations(); for (int i = 0; i < count; i++) { if (observer != null) { parsed(0, "annotations[" + i + "]:"); changeIndent(1); } Annotation annotation = parseAnnotation(visibility); annotations.add(annotation); if (observer != null) { observer.changeIndent(-1); } } annotations.setImmutable(); return annotations; }
/** * Parses an annotation list. * * @param visibility {@code non-null;} visibility of the parsed annotations * @return {@code non-null;} the list of annotations read from the attribute * data */ private Annotations parseAnnotations(AnnotationVisibility visibility) throws IOException { int count = input.readUnsignedShort(); if (observer != null) { parsed(2, "num_annotations: " + Hex.u2(count)); } Annotations annotations = new Annotations(); for (int i = 0; i < count; i++) { if (observer != null) { parsed(0, "annotations[" + i + "]:"); changeIndent(1); } Annotation annotation = parseAnnotation(visibility); annotations.add(annotation); if (observer != null) { observer.changeIndent(-1); } } annotations.setImmutable(); return annotations; }