Author: mcconnell
Date: Tue Jul 6 06:29:08 2004
New Revision: 22625
Modified:
avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Definition.java
Log:
add some javadoc
Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Definition.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Definition.java (original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Definition.java Tue Jul 6 06:29:08 2004
@@ -22,7 +22,9 @@
import java.io.File;
/**
- * Defintion of a project.
+ * A definition is an immutable description of a project including its name,
+ * group, version, structrual dependencies, plugin dependecies, and gump
+ * idiosyncrasies.
*
* @author <a href="mailto:[email protected]">Avalon Development Team</a>
* @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
@@ -33,6 +35,20 @@
private File m_basedir;
private String m_path;
+ /**
+ * Creation of a new definition relative to a supplied home, a unique project key,
+ * project base directory and path, statatory info, gump extras, depednecies and
+ * plugin assumptions.
+ *
+ * @param home the home into whjich this project is bound
+ * @param key a key unique with the home that identifies this project
+ * @param basedir the base directory relative to the index file that this project is defined
+ * @param path the basedir as a relative path
+ * @param info a descriptor of the name, grolup, version and delivery status
+ * @param gump addition gump idiosyncracies
+ * @param resource the set of resource dependencies
+ * @param plugins the set of plugin dependencies
+ */
public Definition(
final Home home, final String key, final File basedir, final String path, final Info info,
final Gump gump, final ResourceRef[] resources, final ResourceRef[] plugins )
@@ -44,21 +60,40 @@
m_path = path;
}
+ /**
+ * Return the base directory relative to main index file that this defintion is
+ * established within.
+ * @return the relative base directory path
+ */
public String getBasePath()
{
return m_path;
}
+ /**
+ * Return the base directory as an absolute file
+ * @return the relative base directory
+ */
public File getBaseDir()
{
return m_basedir;
}
+ /**
+ * Return the set of plugin references that this defintion declares
+ * @return the set of plugin references referencing plugins needed
+ * as part of the project build
+ */
public ResourceRef[] getPluginRefs()
{
return m_plugins;
}
+ /**
+ * Return the filename of the documentation directory relative to the
+ * common magic dumumentation cache for this project.
+ * @return the projects doc destination directory
+ */
public File getDocDirectory()
{
final File cache = getHome().getDocsRepository().getCacheDirectory();
@@ -66,11 +101,19 @@
return new File( cache, spec );
}
+ /**
+ * Return the string representation of this defintion.
+ * @return the string representation
+ */
public String toString()
{
return "[" + getInfo().getGroup() + "/" + getInfo().getName() + "]";
}
+ /**
+ * Return TRUE is this defintionj is equal to a supplied defintion
+ * @return the equality status
+ */
public boolean equals( final Object other )
{
if( super.equals( other ) && ( other instanceof Definition ))
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.