View Javadoc

1   /*
2    AbstractProgrammingLanguageContext.java
3    Creation date : 3/09/2010
4    Copyright © Benjamin Croizet (graffity2199@yahoo.fr)
5   
6    This program is free software; you can redistribute it and/or
7    modify it under the terms of the GNU General Public License
8    or GNU Lesser General Public License as published by the
9    Free Software Foundation; either version 3 of the License,
10   or (at your option) any later version.
11  
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16  
17   You should have received copies of the GNU General Public License
18   and GNU Lesser General Public License along with this program;
19   if not, write to the Free Software Foundation, Inc.,
20   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21   http://www.fsf.org/licensing/licenses/gpl.html
22   http://www.gnu.org/licenses/lgpl.html
23   */
24  
25  package net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context;
26  
27  import static java.util.logging.Level.SEVERE;
28  import static java.util.logging.Logger.getLogger;
29  import static net.sourceforge.plantumldependency.cli.constants.PlantUMLDependencyConstants.DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN;
30  import static net.sourceforge.plantumldependency.cli.constants.PlantUMLDependencyConstants.DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN;
31  import static net.sourceforge.plantumldependency.cli.constants.PlantUMLDependencyConstants.JAVA_LANG_PACKAGE;
32  import static net.sourceforge.plantumldependency.cli.constants.log.ErrorConstants.DEPENDENCY_NAME_NULL_ERROR;
33  import static net.sourceforge.plantumldependency.cli.constants.log.ErrorConstants.DEPENDENCY_NULL_ERROR;
34  import static net.sourceforge.plantumldependency.cli.main.option.display.type.argument.DisplayType.DISPLAY_TYPES_OPTIONS;
35  import static net.sourceforge.plantumldependency.common.constants.log.ErrorConstants.UNEXPECTED_ERROR;
36  import static net.sourceforge.plantumldependency.common.utils.check.ParameterCheckerUtils.checkNull;
37  import static net.sourceforge.plantumldependency.common.utils.comparable.ComparableResult.AFTER;
38  import static net.sourceforge.plantumldependency.common.utils.comparable.ComparableResult.BEFORE;
39  import static net.sourceforge.plantumldependency.common.utils.comparable.ComparableResult.EQUAL;
40  
41  import java.util.Collection;
42  import java.util.Map;
43  import java.util.Set;
44  import java.util.TreeMap;
45  import java.util.TreeSet;
46  import java.util.logging.Logger;
47  import java.util.regex.Pattern;
48  
49  import net.sourceforge.plantumldependency.cli.generic.GenericDependency;
50  import net.sourceforge.plantumldependency.cli.main.option.display.type.argument.DisplayType;
51  import net.sourceforge.plantumldependency.cli.plantumldiagram.classes.PlantUMLClassesDiagram;
52  import net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.PlantUMLClassesDiagramElement;
53  import net.sourceforge.plantumldependency.cli.plantumldiagram.classes.impl.PlantUMLClassesDiagramImpl;
54  import net.sourceforge.plantumldependency.cli.plantumldiagram.classes.relation.PlantUMLClassesDiagramRelation;
55  
56  /**
57   * An abstract implementation of the {@link ProgrammingLanguageContext} interface, providing common
58   * behaviors.
59   *
60   * @author Benjamin Croizet (<a href="mailto:graffity2199@yahoo.fr>graffity2199@yahoo.fr</a>)
61   * @since 1.0.0
62   * @version 1.4.0
63   */
64  public abstract class AbstractProgrammingLanguageContext implements ProgrammingLanguageContext {
65  
66      /** The class logger. */
67      private static final transient Logger LOGGER = getLogger(AbstractProgrammingLanguageContext.class.getName());
68  
69      /** Serial version UID. */
70      private static final long serialVersionUID = -2181655116426569842L;
71  
72      /**
73       * The display types options which have to appear in the plantUML description, mustn't be
74       * <code>null</code>.
75       */
76      private Set < DisplayType > displayTypesOptions;
77  
78      /**
79       * The display package name pattern which have to appear in the plantUML description, mustn't be
80       * <code>null</code>.
81       */
82      private Pattern displayPackageNamePattern;
83  
84      /**
85       * The display name pattern which have to appear in the plantUML description, mustn't be
86       * <code>null</code>.
87       */
88      private Pattern displayNamePattern;
89  
90      /**
91       * The {@link Map} containing all dependencies which have already been treated or seen, it
92       * contains dependencies full names (package + name) as keys and their associated
93       * {@link GenericDependency} as values.
94       */
95      private Map < String, GenericDependency > parsedAndSeenDependenciesMap;
96  
97      /**
98       * The {@link Map} containing all dependencies which have already been marked and seen as a
99       * potential "java.lang" dependency. This should be used when the dependency package can be
100      * known between the current package and the "java.lang" package because dependencies are read
101      * in a sequential way.
102      */
103     private Map < String, GenericDependency > potentialJavaLangSeenDependenciesMap;
104 
105     /**
106      * The {@link Map} containing all dependencies which have already been treated, it contains
107      * dependencies full names (package + name) as keys and their associated
108      * {@link GenericDependency} as values.
109      */
110     private Map < String, GenericDependency > parsedDependenciesMap;
111 
112     /**
113      * Default constructor.
114      *
115      * @since 1.0.0
116      */
117     protected AbstractProgrammingLanguageContext() {
118         this(new TreeSet < GenericDependency >(), DISPLAY_TYPES_OPTIONS, DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN,
119                 DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN);
120     }
121 
122     /**
123      * Medium constructor.
124      *
125      * @param displayTypesOpts
126      *            the {@link Set} of display types options which filter type to appear in the
127      *            plantUML description, mustn't be <code>null</code>.
128      * @param displayPackageNamePatternOpt
129      *            the {@link Pattern} which filter package name to appear in the plantUML
130      *            description, mustn't be <code>null</code>.
131      * @param displayNamePatternOpt
132      *            the {@link Pattern} which filter name to appear in the plantUML description,
133      *            mustn't be <code>null</code>.
134      * @since 1.0.0
135      */
136     protected AbstractProgrammingLanguageContext(final Set < DisplayType > displayTypesOpts,
137             final Pattern displayPackageNamePatternOpt, final Pattern displayNamePatternOpt) {
138         this(new TreeSet < GenericDependency >(), displayTypesOpts, displayPackageNamePatternOpt, displayNamePatternOpt);
139     }
140 
141     /**
142      * Medium constructor.
143      *
144      * @param parsedAndSeenDependencies
145      *            the original parsed and seen dependencies {@link Set} of {@link GenericDependency}
146      *            to put in the context, mustn't be <code>null</code>.
147      * @param displayTypesOpts
148      *            the {@link Set} of display types options which filter type to appear in the
149      *            plantUML description, mustn't be <code>null</code>.
150      * @param displayPackageNamePatternOpt
151      *            the {@link Pattern} which filter package name to appear in the plantUML
152      *            description, mustn't be <code>null</code>.
153      * @param displayNamePatternOpt
154      *            the {@link Pattern} which filter name to appear in the plantUML description,
155      *            mustn't be <code>null</code>.
156      * @since 1.0.0
157      */
158     protected AbstractProgrammingLanguageContext(final Set < GenericDependency > parsedAndSeenDependencies,
159             final Set < DisplayType > displayTypesOpts, final Pattern displayPackageNamePatternOpt,
160             final Pattern displayNamePatternOpt) {
161         this(parsedAndSeenDependencies, parsedAndSeenDependencies, new TreeSet < GenericDependency >(),
162                 displayTypesOpts, displayPackageNamePatternOpt, displayNamePatternOpt);
163     }
164 
165     /**
166      * Full constructor.
167      *
168      * @param parsedAndSeenDependencies
169      *            the original parsed and seen dependencies {@link Set} of {@link GenericDependency}
170      *            to put in the context, mustn't be <code>null</code>.
171      * @param parsedDependencies
172      *            the original parsed dependencies {@link Set} of {@link GenericDependency} to put
173      *            in the context, mustn't be <code>null</code>.
174      * @param potentialJavaLangSeenDependencies
175      *            the original potential "java.lang" seen dependencies {@link Set} of
176      *            {@link GenericDependency} to put in the context, mustn't be <code>null</code>.
177      * @param displayTypesOpts
178      *            the {@link Set} of display types options which filter type to appear in the
179      *            plantUML description, mustn't be <code>null</code>.
180      * @param displayPackageNamePatternOpt
181      *            the {@link Pattern} which filter package name to appear in the plantUML
182      *            description, mustn't be <code>null</code>.
183      * @param displayNamePatternOpt
184      *            the {@link Pattern} which filter name to appear in the plantUML description,
185      *            mustn't be <code>null</code>.
186      * @since 1.0.0
187      */
188     protected AbstractProgrammingLanguageContext(final Set < GenericDependency > parsedAndSeenDependencies,
189             final Set < GenericDependency > parsedDependencies,
190             final Set < GenericDependency > potentialJavaLangSeenDependencies,
191             final Set < DisplayType > displayTypesOpts, final Pattern displayPackageNamePatternOpt,
192             final Pattern displayNamePatternOpt) {
193         // TODO test null
194         final Map < String, GenericDependency > firstDependenciesMap = new TreeMap < String, GenericDependency >();
195         for (final GenericDependency genericDependency : parsedAndSeenDependencies) {
196             firstDependenciesMap.put(genericDependency.getFullName(), genericDependency);
197         }
198         setParsedAndSeenDependenciesMap(firstDependenciesMap);
199 
200         // FIXME should test that all dependencies of the parsedDependencies Set are in the
201         // parsedAndSeenDependencies Set
202         final Map < String, GenericDependency > secondDependenciesMap = new TreeMap < String, GenericDependency >();
203         for (final GenericDependency genericDependency : parsedDependencies) {
204             secondDependenciesMap.put(genericDependency.getFullName(), genericDependency);
205         }
206         setParsedDependenciesMap(secondDependenciesMap);
207 
208         // FIXME should test that all dependencies of the PotentialJavaLangSeenDependencies Set are
209         // in the parsedAndSeenDependencies Set
210         final Map < String, GenericDependency > thirdDependenciesMap = new TreeMap < String, GenericDependency >();
211         for (final GenericDependency genericDependency : potentialJavaLangSeenDependencies) {
212             thirdDependenciesMap.put(genericDependency.getFullName(), genericDependency);
213         }
214         setPotentialJavaLangSeenDependenciesMap(thirdDependenciesMap);
215 
216         setDisplayTypesOptions(new TreeSet < DisplayType >(displayTypesOpts));
217         setDisplayPackageNamePattern(displayPackageNamePatternOpt);
218         setDisplayNamePattern(displayNamePatternOpt);
219     }
220 
221     /**
222      * {@inheritDoc}
223      *
224      * @since 1.0.0
225      */
226     @Override
227     public void addParsedAndSeenDependencies(final GenericDependency dependency) {
228         checkNull(dependency, DEPENDENCY_NULL_ERROR);
229         getParsedDependenciesMap().put(dependency.getFullName(), dependency);
230         getParsedAndSeenDependenciesMap().put(dependency.getFullName(), dependency);
231     }
232 
233     /**
234      * {@inheritDoc}
235      *
236      * @since 1.2.0
237      */
238     @Override
239     public void addPotentialJavaLangSeenDependencies(final GenericDependency dependency) {
240         checkNull(dependency, DEPENDENCY_NULL_ERROR);
241         getParsedAndSeenDependenciesMap().put(dependency.getFullName(), dependency);
242         getPotentialJavaLangSeenDependenciesMap().put(dependency.getFullName(), dependency);
243     }
244 
245     /**
246      * {@inheritDoc}
247      *
248      * @since 1.0.0
249      */
250     @Override
251     public void addSeenDependencies(final GenericDependency dependency) {
252         checkNull(dependency, DEPENDENCY_NULL_ERROR);
253         getParsedAndSeenDependenciesMap().put(dependency.getFullName(), dependency);
254     }
255 
256     /**
257      * {@inheritDoc}
258      *
259      * @since 1.0.0
260      */
261     @Override
262     public int compareTo(final ProgrammingLanguageContext o) {
263         final int thisSize = getParsedDependencies().size();
264         final int anotherSize = o.getParsedDependencies().size();
265         return thisSize < anotherSize ? BEFORE.getResult() : thisSize == anotherSize ? EQUAL.getResult() : AFTER
266                 .getResult();
267     }
268 
269     /**
270      * {@inheritDoc}
271      *
272      * @since 1.0.0
273      */
274     @Override
275     public ProgrammingLanguageContext deepClone() {
276         AbstractProgrammingLanguageContext a = null;
277 
278         try {
279             a = (AbstractProgrammingLanguageContext) super.clone();
280             a.parsedAndSeenDependenciesMap = new TreeMap < String, GenericDependency >();
281             for (final GenericDependency genericDependency : getParsedAndSeenDependencies()) {
282                 a.parsedAndSeenDependenciesMap.put(genericDependency.getFullName(), genericDependency.deepClone());
283             }
284             a.potentialJavaLangSeenDependenciesMap = new TreeMap < String, GenericDependency >(
285                     a.potentialJavaLangSeenDependenciesMap);
286             a.parsedDependenciesMap = new TreeMap < String, GenericDependency >(a.parsedDependenciesMap);
287             a.displayTypesOptions = new TreeSet < DisplayType >(getDisplayTypesOptions());
288             a.displayPackageNamePattern = displayPackageNamePattern;
289             a.displayNamePattern = displayNamePattern;
290         } catch (final CloneNotSupportedException cnse) {
291             LOGGER.log(SEVERE, UNEXPECTED_ERROR, cnse);
292         }
293 
294         return a;
295     }
296 
297     /**
298      * {@inheritDoc}
299      *
300      * @since 1.0
301      */
302     @Override
303     public boolean equals(final Object obj) {
304         if (this == obj) {
305             return true;
306         }
307         if (obj == null) {
308             return false;
309         }
310         if (getClass() != obj.getClass()) {
311             return false;
312         }
313         final AbstractProgrammingLanguageContext other = (AbstractProgrammingLanguageContext) obj;
314         if (displayNamePattern == null) {
315             if (other.displayNamePattern != null) {
316                 return false;
317             }
318         } else if (!displayNamePattern.equals(other.displayNamePattern)) {
319             return false;
320         }
321         if (displayPackageNamePattern == null) {
322             if (other.displayPackageNamePattern != null) {
323                 return false;
324             }
325         } else if (!displayPackageNamePattern.equals(other.displayPackageNamePattern)) {
326             return false;
327         }
328         if (displayTypesOptions == null) {
329             if (other.displayTypesOptions != null) {
330                 return false;
331             }
332         } else if (!displayTypesOptions.equals(other.displayTypesOptions)) {
333             return false;
334         }
335         if (parsedAndSeenDependenciesMap == null) {
336             if (other.parsedAndSeenDependenciesMap != null) {
337                 return false;
338             }
339         } else if (!parsedAndSeenDependenciesMap.equals(other.parsedAndSeenDependenciesMap)) {
340             return false;
341         }
342         if (parsedDependenciesMap == null) {
343             if (other.parsedDependenciesMap != null) {
344                 return false;
345             }
346         } else if (!parsedDependenciesMap.equals(other.parsedDependenciesMap)) {
347             return false;
348         }
349         if (potentialJavaLangSeenDependenciesMap == null) {
350             if (other.potentialJavaLangSeenDependenciesMap != null) {
351                 return false;
352             }
353         } else if (!potentialJavaLangSeenDependenciesMap.equals(other.potentialJavaLangSeenDependenciesMap)) {
354             return false;
355         }
356         return true;
357     }
358 
359     /**
360      * Gets all dependencies which have been seen (as import for instance) and parsed within the
361      * context and which have to be displayed following display types options.
362      *
363      * @param displayTypesOpts
364      *            the {@link Set} of display types options which filter type, if empty, this method
365      *            returns and empty {@link Collection}, mustn't be <code>null</code>.
366      * @param displayPackageNamePatternOpt
367      *            the {@link Pattern} which filter package name, if empty, this method returns and
368      *            empty {@link Collection}, mustn't be <code>null</code>.
369      * @param displayNamePatternOpt
370      *            the {@link Pattern} which filter name, if empty, this method returns and empty
371      *            {@link Collection}, mustn't be <code>null</code>.
372      * @return the {@link Collection} of all {@link GenericDependency} which have been seen (as
373      *         import for instance) and parsed and associated with this context and which have to be
374      *         displayed following display types options.
375      * @since 1.1.1
376      */
377     private Collection < GenericDependency > getDisplayableParsedAndSeenDependencies(
378             final Set < DisplayType > displayTypesOpts, final Pattern displayPackageNamePatternOpt,
379             final Pattern displayNamePatternOpt) {
380         final Set < GenericDependency > displayableParsedAndSeenDependencies = new TreeSet < GenericDependency >();
381         for (final GenericDependency dependency : getParsedAndSeenDependencies()) {
382             if (dependency.getDependencyType().isDisplayable(displayTypesOpts, displayPackageNamePatternOpt,
383                     displayNamePatternOpt)) {
384                 displayableParsedAndSeenDependencies.add(dependency);
385             }
386         }
387 
388         return displayableParsedAndSeenDependencies;
389     }
390 
391     /**
392      * Gets the value of <code>displayNamePattern</code>.
393      *
394      * @return the value of <code>displayNamePattern</code>.
395      * @see #setDisplayNamePattern(Pattern)
396      * @since 1.4.0
397      */
398     private Pattern getDisplayNamePattern() {
399         return displayNamePattern;
400     }
401 
402     /**
403      * Gets the value of <code>displayPackageNamePattern</code>.
404      *
405      * @return the value of <code>displayPackageNamePattern</code>.
406      * @see #setDisplayPackageNamePattern(Pattern)
407      * @since 1.4.0
408      */
409     private Pattern getDisplayPackageNamePattern() {
410         return displayPackageNamePattern;
411     }
412 
413     /**
414      * Gets the value of <code>displayTypesOptions</code>.
415      *
416      * @return the value of <code>displayTypesOptions</code>.
417      * @see #setDisplayTypesOptions(Set)
418      * @since 1.0.0
419      */
420     private Set < DisplayType > getDisplayTypesOptions() {
421         return displayTypesOptions;
422     }
423 
424     /**
425      * {@inheritDoc}
426      *
427      * @since 1.0.0
428      */
429     @Override
430     public Collection < GenericDependency > getParsedAndSeenDependencies() {
431         return getParsedAndSeenDependenciesMap().values();
432     }
433 
434     /**
435      * Gets the value of <code>parsedAndSeenDependenciesMap</code>.
436      *
437      * @return the value of <code>parsedAndSeenDependenciesMap</code>.
438      * @see #setParsedAndSeenDependenciesMap(Map)
439      * @since 1.0.0
440      */
441     private Map < String, GenericDependency > getParsedAndSeenDependenciesMap() {
442         return parsedAndSeenDependenciesMap;
443     }
444 
445     /**
446      * {@inheritDoc}
447      *
448      * @since 1.0.0
449      */
450     @Override
451     public Collection < GenericDependency > getParsedDependencies() {
452         return getParsedDependenciesMap().values();
453     }
454 
455     /**
456      * Gets the value of <code>parsedDependenciesMap</code>.
457      *
458      * @return the value of <code>parsedDependenciesMap</code>.
459      * @see #setParsedDependenciesMap(Map)
460      * @since 1.0.0
461      */
462     private Map < String, GenericDependency > getParsedDependenciesMap() {
463         return parsedDependenciesMap;
464     }
465 
466     /**
467      * {@inheritDoc}
468      *
469      * @since 1.2.0
470      */
471     @Override
472     public GenericDependency getParsedDependency(final String fullName) {
473         checkNull(fullName, DEPENDENCY_NAME_NULL_ERROR);
474         return getParsedDependenciesMap().get(fullName);
475     }
476 
477     /**
478      * {@inheritDoc}
479      *
480      * @since 1.0.0
481      */
482     @Override
483     public GenericDependency getParsedOrSeenDependency(final String fullName) {
484         checkNull(fullName, DEPENDENCY_NAME_NULL_ERROR);
485         return getParsedAndSeenDependenciesMap().get(fullName);
486     }
487 
488     /**
489      * {@inheritDoc}
490      *
491      * @since 1.1.1
492      */
493     @Override
494     public PlantUMLClassesDiagram getPlantUMLClassesDiagram() {
495         final Set < PlantUMLClassesDiagramElement > plantUMLClassesDiagramElements = new TreeSet < PlantUMLClassesDiagramElement >();
496         final Set < PlantUMLClassesDiagramRelation > plantUMLClassesDiagramRelations = new TreeSet < PlantUMLClassesDiagramRelation >();
497 
498         for (final GenericDependency genericDependency : getDisplayableParsedAndSeenDependencies(
499                 getDisplayTypesOptions(), getDisplayPackageNamePattern(), getDisplayNamePattern())) {
500             plantUMLClassesDiagramElements
501                     .add(genericDependency.getDependencyType().getPlantUMLClassesDiagramElement());
502             plantUMLClassesDiagramRelations.addAll(genericDependency.getDependencyType()
503                     .getPlantUMLClassesDiagramRelations(getDisplayTypesOptions(), getDisplayPackageNamePattern(),
504                             getDisplayNamePattern()));
505         }
506 
507         return new PlantUMLClassesDiagramImpl(plantUMLClassesDiagramElements, plantUMLClassesDiagramRelations);
508     }
509 
510     /**
511      * {@inheritDoc}
512      *
513      * @since 1.2.0
514      */
515     @Override
516     public Collection < GenericDependency > getPotentialJavaLangSeenDependencies() {
517         return getPotentialJavaLangSeenDependenciesMap().values();
518     }
519 
520     /**
521      * Gets the value of <code>potentialJavaLangSeenDependenciesMap</code>.
522      *
523      * @return the value of <code>potentialJavaLangSeenDependenciesMap</code>.
524      * @see #setPotentialJavaLangSeenDependenciesMap(Map)
525      * @since 1.2.0
526      */
527     private Map < String, GenericDependency > getPotentialJavaLangSeenDependenciesMap() {
528         return potentialJavaLangSeenDependenciesMap;
529     }
530 
531     /**
532      * {@inheritDoc}
533      *
534      * @since 1.0.0
535      */
536     @Override
537     public int hashCode() {
538         final int prime = 31;
539         int result = 1;
540         result = prime * result + ((displayNamePattern == null) ? 0 : displayNamePattern.hashCode());
541         result = prime * result + ((displayPackageNamePattern == null) ? 0 : displayPackageNamePattern.hashCode());
542         result = prime * result + ((displayTypesOptions == null) ? 0 : displayTypesOptions.hashCode());
543         result = prime * result
544                 + ((parsedAndSeenDependenciesMap == null) ? 0 : parsedAndSeenDependenciesMap.hashCode());
545         result = prime * result + ((parsedDependenciesMap == null) ? 0 : parsedDependenciesMap.hashCode());
546         result = prime
547                 * result
548                 + ((potentialJavaLangSeenDependenciesMap == null) ? 0 : potentialJavaLangSeenDependenciesMap.hashCode());
549         return result;
550     }
551 
552     /**
553      * {@inheritDoc}
554      *
555      * @since 1.0.0
556      */
557     @Override
558     public boolean hasToDisplay(final DisplayType displayType) {
559         return getDisplayTypesOptions().contains(displayType);
560     }
561 
562     /**
563      * {@inheritDoc}
564      *
565      * @since 1.2.0
566      */
567     @Override
568     public void removeAllPotentialJavaLangSeenDependencyAndChangePackageToJavaLang() {
569         for (final GenericDependency dependency : getPotentialJavaLangSeenDependencies()) {
570             getParsedAndSeenDependenciesMap().remove(dependency.getFullName());
571             dependency.getDependencyType().setFullName(JAVA_LANG_PACKAGE, dependency.getName());
572             addSeenDependencies(dependency);
573         }
574 
575         getPotentialJavaLangSeenDependenciesMap().clear();
576     }
577 
578     /**
579      * {@inheritDoc}
580      *
581      * @since 1.2.0
582      */
583     @Override
584     public void removePotentialJavaLangSeenDependency(final String fullName) {
585         checkNull(fullName, DEPENDENCY_NAME_NULL_ERROR);
586         getPotentialJavaLangSeenDependenciesMap().remove(fullName);
587     }
588 
589     /**
590      * Sets the value of <code>displayNamePattern</code>.
591      *
592      * @param value
593      *            the <code>displayNamePattern</code> to set, can be <code>null</code>.
594      * @see #getDisplayNamePattern()
595      * @since 1.4.0
596      */
597     private void setDisplayNamePattern(final Pattern value) {
598         displayNamePattern = value;
599     }
600 
601     /**
602      * Sets the value of <code>displayPackageNamePattern</code>.
603      *
604      * @param value
605      *            the <code>displayPackageNamePattern</code> to set, can be <code>null</code>.
606      * @see #getDisplayPackageNamePattern()
607      * @since 1.4.0
608      */
609     private void setDisplayPackageNamePattern(final Pattern value) {
610         displayPackageNamePattern = value;
611     }
612 
613     /**
614      * Sets the value of <code>displayTypesOptions</code>.
615      *
616      * @param value
617      *            the <code>displayTypesOptions</code> to set, can be <code>null</code>.
618      * @see #getDisplayTypesOptions()
619      * @since 1.0.0
620      */
621     private void setDisplayTypesOptions(final Set < DisplayType > value) {
622         displayTypesOptions = value;
623     }
624 
625     /**
626      * Sets the value of <code>parsedAndSeenDependenciesMap</code>.
627      *
628      * @param value
629      *            the <code>parsedAndSeenDependenciesMap</code> to set, can be <code>null</code>.
630      * @see #getParsedAndSeenDependenciesMap()
631      * @since 1.0.0
632      */
633     private void setParsedAndSeenDependenciesMap(final Map < String, GenericDependency > value) {
634         parsedAndSeenDependenciesMap = value;
635     }
636 
637     /**
638      * Sets the value of <code>parsedDependenciesMap</code>.
639      *
640      * @param value
641      *            the <code>parsedDependenciesMap</code> to set, can be <code>null</code>.
642      * @see #getParsedDependenciesMap()
643      * @since 1.0.0
644      */
645     private void setParsedDependenciesMap(final Map < String, GenericDependency > value) {
646         parsedDependenciesMap = value;
647     }
648 
649     /**
650      * Sets the value of <code>potentialJavaLangSeenDependenciesMap</code>.
651      *
652      * @param value
653      *            the <code>potentialJavaLangSeenDependenciesMap</code> to set, can be
654      *            <code>null</code>.
655      * @see #getPotentialJavaLangSeenDependenciesMap()
656      * @since 1.2.0
657      */
658     private void setPotentialJavaLangSeenDependenciesMap(final Map < String, GenericDependency > value) {
659         potentialJavaLangSeenDependenciesMap = value;
660     }
661 
662     /**
663      * {@inheritDoc}
664      *
665      * @since 1.0.0
666      */
667     @Override
668     public String toString() {
669         return getClass().getSimpleName() + " [displayTypesOptions=" + displayTypesOptions
670                 + ", displayPackageNamePattern=" + displayPackageNamePattern + ", displayNamePattern="
671                 + displayNamePattern + ", parsedAndSeenDependenciesMap=" + parsedAndSeenDependenciesMap
672                 + ", potentialJavaLangSeenDependenciesMap=" + potentialJavaLangSeenDependenciesMap
673                 + ", parsedDependenciesMap=" + parsedDependenciesMap + "]";
674     }
675 }