KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > loom > classman > metadata > FileSetMetaData


1 /*
2  * Copyright (C) The Spice Group. All rights reserved.
3  *
4  * This software is published under the terms of the Spice
5  * Software License version 1.1, a copy of which has been included
6  * with this distribution in the LICENSE.txt file.
7  */

8 package org.codehaus.loom.classman.metadata;
9
10 /**
11  * This class represent a set of files anchored in a base directory. The set of
12  * files is determined by the include and excludes that are specified for
13  * fileset. If no includes or excludes are specified then all files in base
14  * directory are added to fileset.
15  *
16  * @author Peter Donald
17  * @version $Revision: 1.1 $ $Date: 2004/04/19 22:19:25 $
18  */

19 public class FileSetMetaData
20 {
21     /** The base directory from which to apply all the includes/excludes. */
22     private final String JavaDoc m_baseDirectory;
23
24     /** The set of patterns to include in fileset. */
25     private final String JavaDoc[] m_includes;
26
27     /** The set of patterns to exclude from fileset. */
28     private final String JavaDoc[] m_excludes;
29
30     public FileSetMetaData( final String JavaDoc baseDirectory,
31                             final String JavaDoc[] includes,
32                             final String JavaDoc[] excludes )
33     {
34         if( null == baseDirectory )
35         {
36             throw new NullPointerException JavaDoc( "baseDirectory" );
37         }
38         if( null == includes )
39         {
40             throw new NullPointerException JavaDoc( "includes" );
41         }
42         if( null == excludes )
43         {
44             throw new NullPointerException JavaDoc( "excludes" );
45         }
46
47         m_baseDirectory = baseDirectory;
48         m_includes = includes;
49         m_excludes = excludes;
50     }
51
52     /**
53      * Return the base directory of fileset.
54      *
55      * @return the base directory of fileset.
56      */

57     public String JavaDoc getBaseDirectory()
58     {
59         return m_baseDirectory;
60     }
61
62     /**
63      * Return the list of includes for fileset.
64      *
65      * @return the list of includes for fileset.
66      */

67     public String JavaDoc[] getIncludes()
68     {
69         return m_includes;
70     }
71
72     /**
73      * Return the list of excludes for fileset.
74      *
75      * @return the list of excludes for fileset.
76      */

77     public String JavaDoc[] getExcludes()
78     {
79         return m_excludes;
80     }
81 }
82
Popular Tags