Coverage Report - org.apache.maven.plugin.idea.Library
 
Classes in this File Line Coverage Branch Coverage Complexity
Library
81%
21/26
83%
5/6
1,429
 
 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  14
 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  18
         return name;
 40  
     }
 41  
 
 42  
     public void setName( String name )
 43  
     {
 44  8
         this.name = name;
 45  8
     }
 46  
 
 47  
     public String getSources()
 48  
     {
 49  2
         return sources;
 50  
     }
 51  
 
 52  
     public void setSources( String sources )
 53  
     {
 54  6
         this.sources = sources;
 55  6
     }
 56  
 
 57  
     public String[] getSplitSources()
 58  
     {
 59  12
         if ( sources == null )
 60  
         {
 61  2
             return new String[0];
 62  
         }
 63  
 
 64  10
         return sources.split( "[,\\s]+" );
 65  
     }
 66  
 
 67  
     public String[] getSplitClasses()
 68  
     {
 69  12
         if ( classes == null )
 70  
         {
 71  2
             return new String[0];
 72  
         }
 73  
 
 74  10
         return classes.split( "[,\\s]+" );
 75  
     }
 76  
 
 77  
     public boolean isExclude()
 78  
     {
 79  8
         return exclude;
 80  
     }
 81  
 
 82  
     public void setExclude( boolean exclude )
 83  
     {
 84  4
         this.exclude = exclude;
 85  4
     }
 86  
 
 87  
     public String getClasses()
 88  
     {
 89  2
         return classes;
 90  
     }
 91  
 
 92  
     public void setClasses( String classes )
 93  
     {
 94  6
         this.classes = classes;
 95  6
     }
 96  
 
 97  
     public String getJavadocs()
 98  
     {
 99  0
         return javadocs;
 100  
     }
 101  
 
 102  
     public void setJavadocs( String javadocs )
 103  
     {
 104  0
         this.javadocs = javadocs;
 105  0
     }
 106  
 
 107  
     public String[] getSplitJavadocs()
 108  
     {
 109  4
         if ( javadocs == null )
 110  
         {
 111  4
             return new String[0];
 112  
         }
 113  
 
 114  0
         return javadocs.split( "[,\\s]+" );
 115  
     }
 116  
 
 117  
     public String toString()
 118  
     {
 119  0
         return name + " : " + getSplitSources() + "; " + getSplitClasses() + "; " + exclude;
 120  
     }
 121  
 }