View Javadoc

1   package org.apache.maven.plugin.idea;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  /**
23   * @author Patrick Lightbody (plightbo at gmail dot com)
24   */
25  public class Library
26  {
27      private String name;
28  
29      private String sources;
30  
31      private String classes;
32  
33      private boolean exclude;
34  
35      private String javadocs;
36  
37      public String getName()
38      {
39          return name;
40      }
41  
42      public void setName( String name )
43      {
44          this.name = name;
45      }
46  
47      public String getSources()
48      {
49          return sources;
50      }
51  
52      public void setSources( String sources )
53      {
54          this.sources = sources;
55      }
56  
57      public String[] getSplitSources()
58      {
59          if ( sources == null )
60          {
61              return new String[0];
62          }
63  
64          return sources.split( "[,\\s]+" );
65      }
66  
67      public String[] getSplitClasses()
68      {
69          if ( classes == null )
70          {
71              return new String[0];
72          }
73  
74          return classes.split( "[,\\s]+" );
75      }
76  
77      public boolean isExclude()
78      {
79          return exclude;
80      }
81  
82      public void setExclude( boolean exclude )
83      {
84          this.exclude = exclude;
85      }
86  
87      public String getClasses()
88      {
89          return classes;
90      }
91  
92      public void setClasses( String classes )
93      {
94          this.classes = classes;
95      }
96  
97      public String getJavadocs()
98      {
99          return javadocs;
100     }
101 
102     public void setJavadocs( String javadocs )
103     {
104         this.javadocs = javadocs;
105     }
106 
107     public String[] getSplitJavadocs()
108     {
109         if ( javadocs == null )
110         {
111             return new String[0];
112         }
113 
114         return javadocs.split( "[,\\s]+" );
115     }
116 
117     public String toString()
118     {
119         return name + " : " + getSplitSources() + "; " + getSplitClasses() + "; " + exclude;
120     }
121 }