mcconnell 2003/09/09 07:26:59
Modified: merlin/kernel/bootstrap/src/java Merlin.java
Log:
Add missing javadoc on private methods.
Revision Changes Path
1.12 +43 -1 avalon-sandbox/merlin/kernel/bootstrap/src/java/Merlin.java
Index: Merlin.java
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/kernel/bootstrap/src/java/Merlin.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Merlin.java 9 Sep 2003 09:45:05 -0000 1.11
+++ Merlin.java 9 Sep 2003 14:26:59 -0000 1.12
@@ -304,7 +304,21 @@
}
}
- private static URL[] getURLs( Repository repository, Properties properties,
String key )
+ /**
+ * Consruct an array of URLs based on the declarations provided
+ * in the supplied properties object. Each URL is specified
+ * as a property value is mapped to a numbered property key in
+ * the form [key].n. Each value is expressed as a repository
+ * entry in the form [group]:[artifact];[version].
+ *
+ * @param repository the repository from which artifacts shall be
+ * cached
+ * @param properties the properties holding the keyed artifact ids
+ * @param key the property name key
+ * @return the array of urls
+ */
+ private static URL[] getURLs(
+ Repository repository, Properties properties, String key )
{
int i = 0;
ArrayList list = new ArrayList();
@@ -318,12 +332,27 @@
return (URL[]) list.toArray( new URL[0] );
}
+ /**
+ * Return a property key by concatonation of the supplied
+ * key, the period character and an integer.
+ * @param prioperties the properties set containing the keyed entry
+ * @param key the partial key
+ * @param i the key index
+ * @return the value of the property [key].[i]
+ */
private static String getProperty( Properties properties, String key, int i )
{
final String label = key + "." + i;
return properties.getProperty( label );
}
+ /**
+ * Return a URL a a local repository cached resource replative to
+ * a suplied property value in the form [group]:[artifact];[version].
+ * @param repository the repository under whcih resources are cached
+ * @param item the encoded artifact identifier
+ * @return the URL to the locally cached artifact
+ */
private static URL getURL( Repository repository, String item )
{
try
@@ -354,6 +383,11 @@
}
}
+ /**
+ * Utilitiy method to test if the -debug flag is present.
+ * @param args the command line arguments
+ * @return TRUE if the -debug flag is present
+ */
private static boolean isDebugEnabled( final String[] args )
{
for( int i=0; i<args.length; i++ )
@@ -364,6 +398,14 @@
return false;
}
+ /**
+ * Debug utility to dump a classloader url set to system.out.
+ * The implementation will print url from the supplied loader
+ * following which it will print the parent recursively if the
+ * parent is a URLClassLoader.
+ *
+ * @param loader the classloader to dump
+ */
private static void printClassLoader( URLClassLoader loader )
{
URL[] urls = loader.getURLs();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]