49 |
49 |
50 /** |
50 /** |
51 * List of baseclasses. Contains only java.lang.Object. Can be used to get |
51 * List of baseclasses. Contains only java.lang.Object. Can be used to get |
52 * the mapped listing of sub-classes. |
52 * the mapped listing of sub-classes. |
53 */ |
53 */ |
54 private List<ClassDoc> baseclasses = new ArrayList<ClassDoc>(); |
54 private List<ClassDoc> baseclasses = new ArrayList<>(); |
55 |
55 |
56 /** |
56 /** |
57 * Mapping for each Class with their SubClasses |
57 * Mapping for each Class with their SubClasses |
58 */ |
58 */ |
59 private Map<ClassDoc,List<ClassDoc>> subclasses = new HashMap<ClassDoc,List<ClassDoc>>(); |
59 private Map<ClassDoc,List<ClassDoc>> subclasses = new HashMap<>(); |
60 |
60 |
61 /** |
61 /** |
62 * List of base-interfaces. Contains list of all the interfaces who do not |
62 * List of base-interfaces. Contains list of all the interfaces who do not |
63 * have super-interfaces. Can be used to get the mapped listing of |
63 * have super-interfaces. Can be used to get the mapped listing of |
64 * sub-interfaces. |
64 * sub-interfaces. |
65 */ |
65 */ |
66 private List<ClassDoc> baseinterfaces = new ArrayList<ClassDoc>(); |
66 private List<ClassDoc> baseinterfaces = new ArrayList<>(); |
67 |
67 |
68 /** |
68 /** |
69 * Mapping for each Interface with their SubInterfaces |
69 * Mapping for each Interface with their SubInterfaces |
70 */ |
70 */ |
71 private Map<ClassDoc,List<ClassDoc>> subinterfaces = new HashMap<ClassDoc,List<ClassDoc>>(); |
71 private Map<ClassDoc,List<ClassDoc>> subinterfaces = new HashMap<>(); |
72 |
72 |
73 private List<ClassDoc> baseEnums = new ArrayList<ClassDoc>(); |
73 private List<ClassDoc> baseEnums = new ArrayList<>(); |
74 private Map<ClassDoc,List<ClassDoc>> subEnums = new HashMap<ClassDoc,List<ClassDoc>>(); |
74 private Map<ClassDoc,List<ClassDoc>> subEnums = new HashMap<>(); |
75 |
75 |
76 private List<ClassDoc> baseAnnotationTypes = new ArrayList<ClassDoc>(); |
76 private List<ClassDoc> baseAnnotationTypes = new ArrayList<>(); |
77 private Map<ClassDoc,List<ClassDoc>> subAnnotationTypes = new HashMap<ClassDoc,List<ClassDoc>>(); |
77 private Map<ClassDoc,List<ClassDoc>> subAnnotationTypes = new HashMap<>(); |
78 |
78 |
79 /** |
79 /** |
80 * Mapping for each Interface with classes who implement it. |
80 * Mapping for each Interface with classes who implement it. |
81 */ |
81 */ |
82 private Map<ClassDoc,List<ClassDoc>> implementingclasses = new HashMap<ClassDoc,List<ClassDoc>>(); |
82 private Map<ClassDoc,List<ClassDoc>> implementingclasses = new HashMap<>(); |
83 |
83 |
84 /** |
84 /** |
85 * Constructor. Build the Tree using the Root of this Javadoc run. |
85 * Constructor. Build the Tree using the Root of this Javadoc run. |
86 * |
86 * |
87 * @param configuration the configuration of the doclet. |
87 * @param configuration the configuration of the doclet. |
232 * @returns boolean true if class added, false if class already processed. |
232 * @returns boolean true if class added, false if class already processed. |
233 */ |
233 */ |
234 private boolean add(Map<ClassDoc,List<ClassDoc>> map, ClassDoc superclass, ClassDoc cd) { |
234 private boolean add(Map<ClassDoc,List<ClassDoc>> map, ClassDoc superclass, ClassDoc cd) { |
235 List<ClassDoc> list = map.get(superclass); |
235 List<ClassDoc> list = map.get(superclass); |
236 if (list == null) { |
236 if (list == null) { |
237 list = new ArrayList<ClassDoc>(); |
237 list = new ArrayList<>(); |
238 map.put(superclass, list); |
238 map.put(superclass, list); |
239 } |
239 } |
240 if (list.contains(cd)) { |
240 if (list.contains(cd)) { |
241 return false; |
241 return false; |
242 } else { |
242 } else { |
254 * @returns List Sub-Class list for the class passed. |
254 * @returns List Sub-Class list for the class passed. |
255 */ |
255 */ |
256 private List<ClassDoc> get(Map<ClassDoc,List<ClassDoc>> map, ClassDoc cd) { |
256 private List<ClassDoc> get(Map<ClassDoc,List<ClassDoc>> map, ClassDoc cd) { |
257 List<ClassDoc> list = map.get(cd); |
257 List<ClassDoc> list = map.get(cd); |
258 if (list == null) { |
258 if (list == null) { |
259 return new ArrayList<ClassDoc>(); |
259 return new ArrayList<>(); |
260 } |
260 } |
261 return list; |
261 return list; |
262 } |
262 } |
263 |
263 |
264 /** |
264 /** |