1 package org.robolectric.annotation.processing; 2 3 import java.util.Collection; 4 import java.util.Map; 5 import java.util.TreeMap; 6 7 public class DocumentedPackage extends DocumentedElement { 8 private final Map<String, DocumentedType> documentedTypes = new TreeMap<>(); 9 10 DocumentedPackage(String name) { 11 super(name); 12 } 13 14 public Collection<DocumentedType> getDocumentedTypes() { 15 return documentedTypes.values(); 16 } 17 18 public DocumentedType getDocumentedType(String name) { 19 DocumentedType documentedType = documentedTypes.get(name); 20 if (documentedType == null) { 21 documentedType = new DocumentedType(name); 22 documentedTypes.put(name, documentedType); 23 } 24 return documentedType; 25 } 26 } 27