ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder DefaultTargetMetaData.java
Date Fri, 07 Jun 2002 07:13:03 GMT
donaldp     2002/06/07 00:13:03

  Added:       container/src/java/org/apache/myrmidon/components/builder
                        DefaultTargetMetaData.java
  Log:
  Add better implementation of TargetMetaData
  
  Revision  Changes    Path
  1.1                  jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultTargetMetaData.java
  
  Index: DefaultTargetMetaData.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.myrmidon.components.builder;
  
  import org.apache.myrmidon.interfaces.model.TargetMetaData;
  
  /**
   * Targets in build file.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/06/07 07:13:03 $
   */
  public class DefaultTargetMetaData
      implements TargetMetaData
  {
      private static final TargetMetaData[] EMPTY_TARGETS = new TargetMetaData[ 0 ];
  
      private final String m_name;
      private final String m_descrption;
      private final TargetMetaData[] m_targets;
  
      public DefaultTargetMetaData( final String name,
                                    final String description )
      {
          this( name, description, EMPTY_TARGETS );
      }
  
      public DefaultTargetMetaData( final String name,
                                    final String description,
                                    final TargetMetaData[] targets )
      {
          m_name = name;
          m_descrption = description;
          m_targets = targets;
      }
  
      /**
       * Retrieve the name of the Target.
       *
       * @return the name of the Target.
       */
      public String getName()
      {
          return m_name;
      }
  
      /**
       * Retrieve a description of the target.
       *
       * @return a description of the target.
       */
      public String getDescription()
      {
          return m_descrption;
      }
  
      /**
       * Return an array of child targets.
       * Must return a non-null value, even when there
       * are no child targets.
       *
       * @return a non-null array of child targets.
       */
      public TargetMetaData[] getTargets()
      {
          return m_targets;
      }
  }
  
  
  

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


Mime
View raw message