1 package net.sourceforge.argval.packageinfo;
2
3
4 import java.util.Set;
5
6
7 /**
8 * A helper class which stores once the <code>Package</code> details and contains a Set
9 * containing all the related Java language package names (the dot separated package name
10 * like <code>net.sourceforge.argval.packageinfo</code> ).
11 *
12 * @author <a href="http://sourceforge.net/users/verhagent/">T. Verhagen</a>
13 */
14 public interface PackageInfo extends PackageInfoVisitorAcceptor {
15 /** If no specification and implementation title is known, the value {@value} is used. */
16 String UNKNOWN_PACKAGE_TITLE = "Unknown package title";
17 /** If no specification and implementation version is known, the value {@value} is used. */
18 String UNKNOWN_VERSION = "Unknown";
19
20 /**
21 * Returns the implementation title.
22 *
23 * @return The implementation title.
24 */
25 String getImplementationTitle();
26
27 /**
28 * Returns the implementation vendor.
29 *
30 * @return The implementation vendor.
31 */
32 String getImplementationVendor();
33
34 /**
35 * Returns the implementation version.
36 *
37 * @return The implementation version.
38 */
39 String getImplementationVersion();
40
41
42 /**
43 * Returns the specification title.
44 *
45 * @return The specification title.
46 */
47 String getSpecificationTitle();
48
49 /**
50 * Returns the specification vendor.
51 *
52 * @return The specification vendor.
53 */
54 String getSpecificationVendor();
55
56 /**
57 * Returns the specification version.
58 *
59 * @return The specification version.
60 */
61 String getSpecificationVersion();
62
63
64 /**
65 * Returns the specification title, when it is known. Or when not the
66 * implementation title is returned. Or when that is also not known, the
67 * value {@link #UNKNOWN_PACKAGE_TITLE} is returned.
68 *
69 * @return The title of the specification, or the implementation or just
70 * {@link #UNKNOWN_PACKAGE_TITLE}.
71 */
72 String getTitle();
73
74
75 /**
76 * Returns all the package names associated with this <code>Package</code>.
77 *
78 * @return The set with all package names associated with this <code>Package</code>.
79 */
80 Set<String> getNameSet();
81 /**
82 * Adds the name of the package from the Java language dot notation
83 * ( <code>net.sourceforge.argval.packageinfo</code> ).
84 *
85 * @param name The name of the package.
86 */
87 void addPackageName(String name);
88
89
90 /** {@inheritDoc}. */
91 void accept(PackageInfoVisitor visitor);
92
93 }