mcconnell 2004/01/25 05:17:51
Modified: repository platform.xml
repository/main/src/java/org/apache/avalon/repository/main
DefaultInitialContext.java
repository/spi/src/java/org/apache/avalon/repository/provider
InitialContext.java
Log:
Improve the InitialContext interface and impl by exposing an operation to create a
builder as opposed to the factory. This maintains the same benefits as before of
isolating DefaultBuilder, but improves the interface usage because the builder also
provides us with the constructed classloader.
Revision Changes Path
1.6 +1 -1 avalon/repository/platform.xml
Index: platform.xml
===================================================================
RCS file: /home/cvs/avalon/repository/platform.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- platform.xml 24 Jan 2004 23:20:03 -0000 1.5
+++ platform.xml 25 Jan 2004 13:17:50 -0000 1.6
@@ -22,7 +22,7 @@
<dependency>
<groupId>avalon-util</groupId>
<artifactId>avalon-util-defaults</artifactId>
- <version>1.1</version>
+ <version>1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>avalon-util</groupId>
1.15 +9 -14
avalon/repository/main/src/java/org/apache/avalon/repository/main/DefaultInitialContext.java
Index: DefaultInitialContext.java
===================================================================
RCS file:
/home/cvs/avalon/repository/main/src/java/org/apache/avalon/repository/main/DefaultInitialContext.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- DefaultInitialContext.java 24 Jan 2004 23:20:05 -0000 1.14
+++ DefaultInitialContext.java 25 Jan 2004 13:17:50 -0000 1.15
@@ -363,34 +363,29 @@
}
/**
- * Create a factory using a supplied artifact.
+ * Create a factory builder using a supplied artifact.
* @param artifact the factory artifact
- * @return the factory
- * @exception Exception if a factory creation error occurs
+ * @return the factory builder
+ * @exception Exception if a builder creation error occurs
*/
- public Factory createFactory( Artifact artifact )
+ public Builder newBuilder( Artifact artifact )
throws Exception
{
- Builder builder =
- new DefaultBuilder( this, artifact );
- return builder.getFactory();
+ return new DefaultBuilder( this, artifact );
}
/**
- * Create a factory using a supplied artifact.
+ * Create a factory builder using a supplied artifact.
* @param classloader the parent classloader
* @param artifact the factory artifact
* @return the factory
* @exception Exception if a factory creation error occurs
*/
- public Factory createFactory( ClassLoader classloader, Artifact artifact )
+ public Builder newBuilder( ClassLoader classloader, Artifact artifact )
throws Exception
{
- Builder builder =
- new DefaultBuilder( this, classloader, artifact );
- return builder.getFactory();
+ return new DefaultBuilder( this, classloader, artifact );
}
-
// ------------------------------------------------------------------------
// implementation
1.6 +7 -7
avalon/repository/spi/src/java/org/apache/avalon/repository/provider/InitialContext.java
Index: InitialContext.java
===================================================================
RCS file:
/home/cvs/avalon/repository/spi/src/java/org/apache/avalon/repository/provider/InitialContext.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- InitialContext.java 24 Jan 2004 23:20:05 -0000 1.5
+++ InitialContext.java 25 Jan 2004 13:17:51 -0000 1.6
@@ -69,22 +69,22 @@
Factory getInitialFactory();
/**
- * Create a factory using a supplied artifact.
+ * Create a factory builder using a supplied artifact.
* @param artifact the factory artifact
- * @return the factory
- * @exception Exception if a factory creation error occurs
+ * @return the factory builder
+ * @exception Exception if a builder creation error occurs
*/
- Factory createFactory( Artifact artifact )
+ Builder newBuilder( Artifact artifact )
throws Exception;
/**
- * Create a factory using a supplied artifact.
+ * Create a factory builder using a supplied artifact.
* @param classloader the parent classloader
* @param artifact the factory artifact
* @return the factory
* @exception Exception if a factory creation error occurs
*/
- Factory createFactory( ClassLoader classloader, Artifact artifact )
+ Builder newBuilder( ClassLoader classloader, Artifact artifact )
throws Exception;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]