avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/cpbuilder/metadata ClassloaderSetDef.java
Date Sun, 01 Sep 2002 00:55:03 GMT
donaldp     2002/08/31 17:55:03

  Modified:    src/java/org/apache/avalon/phoenix/components/cpbuilder/metadata
                        ClassloaderSetDef.java
  Log:
  Merge joins into set
  
  Revision  Changes    Path
  1.2       +42 -2     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/cpbuilder/metadata/ClassloaderSetDef.java
  
  Index: ClassloaderSetDef.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/cpbuilder/metadata/ClassloaderSetDef.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClassloaderSetDef.java	1 Sep 2002 00:51:37 -0000	1.1
  +++ ClassloaderSetDef.java	1 Sep 2002 00:55:03 -0000	1.2
  @@ -29,13 +29,19 @@
       private final ClassLoaderDef[] m_classLoaders;
   
       /**
  +     * The joining classloaders defined in set.
  +     */
  +    private final JoinDef[] m_joins;
  +
  +    /**
        * Construct set with specified set and ClassLoaders.
        *
        * @param aDefault the name of default ClassLoader
        * @param classLoaders the ClassLoaders in set
        */
       public ClassloaderSetDef( final String aDefault,
  -                              final ClassLoaderDef[] classLoaders )
  +                              final ClassLoaderDef[] classLoaders,
  +                              final JoinDef[] joins )
       {
           if( null == aDefault )
           {
  @@ -45,9 +51,14 @@
           {
               throw new NullPointerException( "classLoaders" );
           }
  +        if( null == joins )
  +        {
  +            throw new NullPointerException( "joins" );
  +        }
   
           m_default = aDefault;
           m_classLoaders = classLoaders;
  +        m_joins = joins;
       }
   
       /**
  @@ -73,6 +84,17 @@
       }
   
       /**
  +     * Return the "join" classloaders in set.
  +     *
  +     * @return the "join" classloaders in set.
  +     * @see #m_joins
  +     */
  +    public JoinDef[] getJoins()
  +    {
  +        return m_joins;
  +    }
  +
  +    /**
        * Return the classloader with specified name.
        *
        * @return the classloader with specified name
  @@ -85,6 +107,24 @@
               if( classLoader.getName().equals( name ) )
               {
                   return classLoader;
  +            }
  +        }
  +        return null;
  +    }
  +
  +    /**
  +     * Return the "join" classloader with specified name.
  +     *
  +     * @return the "join" classloader with specified name
  +     */
  +    public JoinDef getJoin( final String name )
  +    {
  +        for( int i = 0; i < m_joins.length; i++ )
  +        {
  +            final JoinDef join = m_joins[ i ];
  +            if( join.getName().equals( name ) )
  +            {
  +                return join;
               }
           }
           return null;
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message