Home | History | Annotate | Download | only in annotation

Lines Matching refs:Annotations

30 public final class Annotations extends MutabilityControl
31 implements Comparable<Annotations> {
33 public static final Annotations EMPTY = new Annotations();
39 /** {@code non-null;} map from types to annotations */
40 private final TreeMap<CstType, Annotation> annotations;
52 public static Annotations combine(Annotations a1, Annotations a2) {
53 Annotations result = new Annotations();
67 * @param annotations {@code non-null;} the instance to augment
72 public static Annotations combine(Annotations annotations,
74 Annotations result = new Annotations();
76 result.addAll(annotations);
86 public Annotations() {
87 annotations = new TreeMap<CstType, Annotation>();
93 return annotations.hashCode();
99 if (! (other instanceof Annotations)) {
103 Annotations otherAnnotations = (Annotations) other;
105 return annotations.equals(otherAnnotations.annotations);
109 public int compareTo(Annotations other) {
110 Iterator<Annotation> thisIter = annotations.values().iterator();
111 Iterator<Annotation> otherIter = other.annotations.values().iterator();
137 sb.append("annotations{");
139 for (Annotation a : annotations.values()) {
158 return annotations.size();
177 if (annotations.containsKey(type)) {
182 annotations.put(type, annotation);
189 * @param toAdd {@code non-null;} the annotations to add
192 public void addAll(Annotations toAdd) {
199 for (Annotation a : toAdd.annotations.values()) {
205 * Gets the set of annotations contained in this instance. The
208 * @return {@code non-null;} the set of annotations
211 return Collections.unmodifiableCollection(annotations.values());