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-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo EntryDescriptor.java
Date Sun, 09 Jun 2002 00:51:01 GMT
donaldp     2002/06/08 17:51:01

  Added:       containerkit/src/java/org/apache/excalibur/containerkit/metainfo
                        EntryDescriptor.java
  Log:
  Add a descriptor for an entry in the context.
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/EntryDescriptor.java
  
  Index: EntryDescriptor.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.excalibur.containerkit.metainfo;
  
  /**
   * A descriptor that describes a value that must be placed
   * in components Context. It contains information about;
   * <ul>
   *   <li>key: the key that component uses to look up entry</li>
   *   <li>type: the class/interface of the entry</li>
   * </ul>
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/06/09 00:51:01 $
   */
  public final class EntryDescriptor
  {
      /**
       * The name the component uses to lookup entry.
       */
      private final String m_key;
  
      /**
       * The class/interface of the Entry.
       */
      private final String m_type;
  
      /**
       * Construct an Entry.
       */
      public EntryDescriptor( final String key, final String type )
      {
          if( null == key )
          {
              throw new NullPointerException( "key" );
          }
  
          if( null == type )
          {
              throw new NullPointerException( "type" );
          }
  
          m_key = key;
          m_type = type;
      }
  
      /**
       * Return the key that Component uses to lookup entry.
       *
       * @return the key that Component uses to lookup entry.
       */
      public String getKey()
      {
          return m_key;
      }
  
      /**
       * Return the key type of value that is stored in Context.
       *
       * @return the key type of value that is stored in Context.
       */
      public String getType()
      {
          return m_type;
      }
  }
  
  
  

--
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