[CJ-dev] commonjava-projects/commonjava-opl/src/java/org/commonjava/opl/generics/config ConfigSnapIn
Brought to you by:
johnqueso
Update of /cvsroot/commonjava/commonjava-projects/commonjava-opl/src/java/org/commonjava/opl/generics/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2746/src/java/org/commonjava/opl/generics/config Modified Files: ConfigSnapIn.java ConfigSupport.java ConfigSnapInContainer.java Log Message: updated to 0.2, made method call parameter generation more robust. Index: ConfigSnapIn.java =================================================================== RCS file: /cvsroot/commonjava/commonjava-projects/commonjava-opl/src/java/org/commonjava/opl/generics/config/ConfigSnapIn.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ConfigSnapIn.java 9 Jan 2004 05:07:43 -0000 1.2 +++ ConfigSnapIn.java 12 Mar 2004 19:46:54 -0000 1.3 @@ -4,18 +4,18 @@ */ package org.commonjava.opl.generics.config; + /** For now, just a marker interface for [parsed] objects capable of snapping * into a configuration object. Provides the getId() method, only to enforce * consistent naming of snapIns. - * + * * @author John Casey * @deprecated Use CommonJava-config/org.commonjava.config.snapin.ConfigSnapIn. */ -public interface ConfigSnapIn { - +public interface ConfigSnapIn +{ /** Return the ID used to locate this snapIn within the configuration. * @return the snapIn identifier. */ public String getSnapInId(); - } Index: ConfigSupport.java =================================================================== RCS file: /cvsroot/commonjava/commonjava-projects/commonjava-opl/src/java/org/commonjava/opl/generics/config/ConfigSupport.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ConfigSupport.java 9 Jan 2004 05:07:43 -0000 1.3 +++ ConfigSupport.java 12 Mar 2004 19:46:54 -0000 1.4 @@ -7,37 +7,38 @@ import java.util.HashMap; import java.util.Map; -/** Contains the functionality to store and retrieve SnapIns, in support of + +/** Contains the functionality to store and retrieve SnapIns, in support of * configuration classes. - * + * * @author John Casey * @deprecated Use CommonJava-config/org.commonjava.config.snapin.SnapInContainerSupport. */ -public abstract class ConfigSupport implements ConfigSnapInContainer { - +public abstract class ConfigSupport implements ConfigSnapInContainer +{ private Map snapIns = new HashMap(); - + /** Create a new configuration support object, with the ability to store * snapIns. */ - protected ConfigSupport() { - } + protected ConfigSupport() {} /** Return the snapIn for the specified id, within this configuration instance. * @param snapInId The identifier to lookup * @return the associated snapIn, or null. */ - public ConfigSnapIn getSnapIn(String snapInId){ + public ConfigSnapIn getSnapIn(String snapInId) + { return (ConfigSnapIn)snapIns.get(snapInId); } - + /** Add a snapIn to this configuration instance. The id is extracted, and the * snapIn is keyed by it within the snapIn map. NOTE: This will override any * previously-added snapIns with the same ID. * @param snapIn The snapIn to add. */ - public void addSnapIn(ConfigSnapIn snapIn){ + public void addSnapIn(ConfigSnapIn snapIn) + { snapIns.put(snapIn.getSnapInId(), snapIn); } - } Index: ConfigSnapInContainer.java =================================================================== RCS file: /cvsroot/commonjava/commonjava-projects/commonjava-opl/src/java/org/commonjava/opl/generics/config/ConfigSnapInContainer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ConfigSnapInContainer.java 9 Jan 2004 05:07:43 -0000 1.2 +++ ConfigSnapInContainer.java 12 Mar 2004 19:46:54 -0000 1.3 @@ -4,24 +4,24 @@ */ package org.commonjava.opl.generics.config; + /** Represents something capable of storing and retrieving configuration snap-ins. - * + * * @author John Casey * @deprecated Use CommonJava-config/org.commonjava.config.snapin.SnapInContainer. */ -public interface ConfigSnapInContainer { - +public interface ConfigSnapInContainer +{ /** Return the snapIn for the specified id, within this configuration instance. * @param snapInId The identifier to lookup * @return the associated snapIn, or null. */ public ConfigSnapIn getSnapIn(String snapInId); - + /** Add a snapIn to this configuration instance. The id is extracted, and the * snapIn is keyed by it within the snapIn map. NOTE: This will override any * previously-added snapIns with the same ID. * @param snapIn The snapIn to add. */ public void addSnapIn(ConfigSnapIn snapIn); - -} \ No newline at end of file +} |