Clover Coverage Report - FEST Swing 1.2
Coverage timestamp: Tue Jun 1 2010 15:19:25 PDT
../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
4   57   3   1.33
0   17   0.75   3
3     1  
1    
 
  ComponentLookupException       Line # 26 4 0% 3 0 100% 1.0
 
No Tests
 
1    /*
2    * Created on Sep 29, 2006
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5    * in compliance with the License. You may obtain a copy of the License at
6    *
7    * http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software distributed under the License
10    * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11    * or implied. See the License for the specific language governing permissions and limitations under
12    * the License.
13    *
14    * Copyright @2006-2010 the original author or authors.
15    */
16    package org.fest.swing.exception;
17   
18    import java.awt.Component;
19    import java.util.*;
20   
21    /**
22    * Understands an error thrown when looking up a component using a <code>{@link org.fest.swing.core.ComponentFinder}</code>.
23    *
24    * @author Alex Ruiz
25    */
 
26    public class ComponentLookupException extends RuntimeException {
27   
28    private static final long serialVersionUID = 1L;
29   
30    private final Collection<Component> found = new ArrayList<Component>();
31   
32    /**
33    * Creates a new </code>{@link ComponentLookupException}</code>.
34    * @param message the detail message.
35    * @param found the <code>Component</code>s found by the lookup (if any.)
36    */
 
37  5 toggle public ComponentLookupException(String message, Collection<? extends Component> found) {
38  5 this(message);
39  5 this.found.addAll(found);
40    }
41   
42    /**
43    * Creates a new <code>{@link ComponentLookupException}</code>.
44    * @param message the detail message.
45    */
 
46  7365 toggle public ComponentLookupException(String message) {
47  7365 super(message);
48    }
49   
50    /**
51    * Returns the <code>Component</code>s found by the lookup (if any.)
52    * @return the <code>Component</code>s found by the lookup (if any.)
53    */
 
54  2 toggle public final Collection<? extends Component> found() {
55  2 return Collections.<Component>unmodifiableCollection(found);
56    }
57    }