You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2002/09/20 11:14:10 UTC
cvs commit: jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/reader ClassLoaderSetBuilder.java
donaldp 2002/09/20 02:14:10
Modified: loader/src/java/org/apache/excalibur/loader/reader
ClassLoaderSetBuilder.java
Log:
Boilerplate javadocs
Revision Changes Path
1.3 +94 -14 jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/reader/ClassLoaderSetBuilder.java
Index: ClassLoaderSetBuilder.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/reader/ClassLoaderSetBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ClassLoaderSetBuilder.java 16 Sep 2002 11:57:16 -0000 1.2
+++ ClassLoaderSetBuilder.java 20 Sep 2002 09:14:10 -0000 1.3
@@ -25,6 +25,13 @@
*/
public class ClassLoaderSetBuilder
{
+ /**
+ * Build ClassLoader MetaData from a DOM tree.
+ *
+ * @param config the root element
+ * @return the meta data
+ * @throws Exception if malformed DOM
+ */
public ClassLoaderSetMetaData build( final Element config )
throws Exception
{
@@ -67,13 +74,14 @@
joins );
}
- private boolean isUnspecified( final String defaultClassLoader )
- {
- return "".equals( defaultClassLoader );
- }
-
+ /**
+ * Parse out a set of predefined classloaders from
+ * specified nodes.
+ *
+ * @param configs the nodes to process
+ * @return the predefined classloaders
+ */
private String[] buildPredefined( final NodeList configs )
- throws Exception
{
final ArrayList predefines = new ArrayList();
@@ -88,6 +96,12 @@
return (String[])predefines.toArray( new String[ predefines.size() ] );
}
+ /**
+ * Build an array of ClassLoader meta datas from node list.
+ *
+ * @param configs the nodes to process
+ * @return the classloaders
+ */
private ClassLoaderMetaData[] buildClassLoaders( final NodeList configs )
throws Exception
{
@@ -104,6 +118,12 @@
return (ClassLoaderMetaData[])loaders.toArray( new ClassLoaderMetaData[ loaders.size() ] );
}
+ /**
+ * Build a ClassLoader meta datas from element.
+ *
+ * @param config the nodes to process
+ * @return the classloader
+ */
private ClassLoaderMetaData buildLoader( final Element config )
throws Exception
{
@@ -120,6 +140,12 @@
extensions, fileSets );
}
+ /**
+ * Build and array of extensions
+ *
+ * @param configs the nodes to process
+ * @return an array of extensions
+ */
private Extension[] buildExtensions( final NodeList configs )
throws Exception
{
@@ -136,6 +162,12 @@
return (Extension[])extensions.toArray( new Extension[ extensions.size() ] );
}
+ /**
+ * Build an extension from a DOM element.
+ *
+ * @param config the node to process
+ * @return an extension
+ */
private Extension buildExtension( final Element config )
throws Exception
{
@@ -163,8 +195,13 @@
implURL );
}
+ /**
+ * Build and array of file sets.
+ *
+ * @param configs the nodes to process
+ * @return an array of file sets
+ */
private FileSetMetaData[] buildFileSets( final NodeList configs )
- throws Exception
{
final ArrayList fileSets = new ArrayList();
@@ -179,8 +216,13 @@
return (FileSetMetaData[])fileSets.toArray( new FileSetMetaData[ fileSets.size() ] );
}
+ /**
+ * Build a fileset from a DOM element.
+ *
+ * @param config the node to process
+ * @return a fileset
+ */
private FileSetMetaData buildFileSet( final Element config )
- throws Exception
{
final String dir = config.getAttribute( "dir" );
final String[] includes =
@@ -190,8 +232,13 @@
return new FileSetMetaData( dir, includes, excludes );
}
+ /**
+ * Build and array of selectors (ie includes/excludes).
+ *
+ * @param configs the nodes to process
+ * @return an array of selectors
+ */
private String[] buildSelectors( final NodeList configs )
- throws Exception
{
final ArrayList selectors = new ArrayList();
@@ -206,8 +253,13 @@
return (String[])selectors.toArray( new String[ selectors.size() ] );
}
+ /**
+ * Build file entrys from a nodelist.
+ *
+ * @param configs the nodes to procexx
+ * @return an array of file entrys
+ */
private String[] buildEntrys( final NodeList configs )
- throws Exception
{
final ArrayList entrys = new ArrayList();
@@ -222,8 +274,13 @@
return (String[])entrys.toArray( new String[ entrys.size() ] );
}
+ /**
+ * Build an array of Join classloaders out of supplied nodes.
+ *
+ * @param configs the nodes to process
+ * @return the join meta data array
+ */
private JoinMetaData[] buildJoins( final NodeList configs )
- throws Exception
{
final ArrayList joins = new ArrayList();
@@ -238,8 +295,13 @@
return (JoinMetaData[])joins.toArray( new JoinMetaData[ joins.size() ] );
}
+ /**
+ * Build a Join classloader out of supplied Element.
+ *
+ * @param config the config element
+ * @return the join meta data
+ */
private JoinMetaData buildJoin( final Element config )
- throws Exception
{
final String name = config.getAttribute( "name" );
final NodeList children =
@@ -249,8 +311,14 @@
return new JoinMetaData( name, classloaders );
}
+ /**
+ * Create a set of strings for ClassLoader references
+ * in a Join classloader.
+ *
+ * @param configs the nodes to process
+ * @return the strings for class loader refs
+ */
private String[] buildClassLoaderRefs( final NodeList configs )
- throws Exception
{
final ArrayList refs = new ArrayList();
@@ -263,5 +331,17 @@
}
return (String[])refs.toArray( new String[ refs.size() ] );
+ }
+
+ /**
+ * Utility class to test if attribute is unspecified (by
+ * testing if it is equal to empty string).
+ *
+ * @param attribute the attribute
+ * @return true if equal to empty string
+ */
+ private boolean isUnspecified( final String attribute )
+ {
+ return "".equals( attribute );
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>