avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/composition/src/test/org/apache/avalon/composition/model/testa Facade.java DefaultFacade.java
Date Mon, 14 Jul 2003 22:04:21 GMT
mcconnell    2003/07/14 15:04:21

  Added:       merlin/composition/src/test/org/apache/avalon/composition/model/testa
                        Facade.java DefaultFacade.java
  Log:
  Add missing test classes.
  
  Revision  Changes    Path
  1.1                  avalon-sandbox/merlin/composition/src/test/org/apache/avalon/composition/model/testa/Facade.java
  
  Index: Facade.java
  ===================================================================
  
  
  package org.apache.avalon.composition.model.testa;
  
  import org.apache.avalon.framework.context.Context;
  
  public interface Facade extends Context
  {    
      String getName();
  }
  
  
  
  1.1                  avalon-sandbox/merlin/composition/src/test/org/apache/avalon/composition/model/testa/DefaultFacade.java
  
  Index: DefaultFacade.java
  ===================================================================
  
  
  package org.apache.avalon.composition.model.testa;
  
  import org.apache.avalon.framework.context.Context;
  import org.apache.avalon.framework.context.ContextException;
  
  public class DefaultFacade implements Facade
  {
      private Context m_context;
  
      public DefaultFacade( Context context )
      {
          m_context = context;
      }
  
      //------------------------------------------------------------
      // Context
      //------------------------------------------------------------
  
      public Object get( final Object key ) throws ContextException
      {
          return m_context.get( key );
      }
  
      //------------------------------------------------------------
      // Extra
      //------------------------------------------------------------
      
      public String getName()
      {
          try
          {
              return (String) m_context.get( "urn:avalon:name" );
          }
          catch( ContextException e )
          {
              throw new RuntimeException( e.toString() );
          }
      }
  }
  
  
  

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


Mime
View raw message