1 package net.sourceforge.argval.packageinfo;
2
3
4 /**
5 *
6 * @author <a href="http://sourceforge.net/users/verhagent/">T. Verhagen</a>
7 */
8 public abstract class AbstractPackageInfo implements PackageInfo {
9
10
11 /**
12 * Returns the specification title, when it is known. Or when not the
13 * implementation title is returned. Or when that is also not known, the
14 * value {@link #UNKNOWN_PACKAGE_TITLE} is returned.
15 *
16 * @return The title of the specification, or the implementation or just
17 * {@link #UNKNOWN_PACKAGE_TITLE}.
18 */
19 public String getTitle() {
20 String title = getSpecificationTitle();
21 if (title == null) {
22 title = getImplementationTitle();
23 if (title == null) {
24 title = UNKNOWN_PACKAGE_TITLE;
25 }
26 }
27 return title;
28 }
29
30
31 /** {@inheritDoc}. */
32 public void accept(PackageInfoVisitor visitor) {
33 visitor.visit(this);
34 }
35
36 }