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 Fri, 14 Jun 2002 07:47:07 GMT
donaldp     2002/06/14 00:47:07

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/metainfo
                        EntryDescriptor.java
  Log:
  Add optional flag into EntryDescriptor
  
  Revision  Changes    Path
  1.2       +30 -2     jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/EntryDescriptor.java
  
  Index: EntryDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/EntryDescriptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntryDescriptor.java	9 Jun 2002 00:51:01 -0000	1.1
  +++ EntryDescriptor.java	14 Jun 2002 07:47:06 -0000	1.2
  @@ -13,6 +13,7 @@
    * <ul>
    *   <li>key: the key that component uses to look up entry</li>
    *   <li>type: the class/interface of the entry</li>
  + *   <li>isOptional: true if entry is optional rather than required</li>
    * </ul>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  @@ -31,9 +32,25 @@
       private final String m_type;
   
       /**
  +     * Flag if entry is optional, false otherwise.
  +     */
  +    private final boolean m_optional;
  +
  +    /**
        * Construct an Entry.
        */
  -    public EntryDescriptor( final String key, final String type )
  +    public EntryDescriptor( final String key,
  +                            final String type )
  +    {
  +        this( key, type, false );
  +    }
  +
  +    /**
  +     * Construct an Entry.
  +     */
  +    public EntryDescriptor( final String key,
  +                            final String type,
  +                            final boolean optional )
       {
           if( null == key )
           {
  @@ -47,6 +64,7 @@
   
           m_key = key;
           m_type = type;
  +        m_optional = optional;
       }
   
       /**
  @@ -67,5 +85,15 @@
       public String getType()
       {
           return m_type;
  +    }
  +
  +    /**
  +     * Return true if entry is optional, false otherwise.
  +     *
  +     * @return true if entry is optional, false otherwise.
  +     */
  +    public boolean isOptional()
  +    {
  +        return m_optional;
       }
   }
  
  
  

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