KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > vladium > emma > report > AllItem


1 /* Copyright (C) 2003 Vladimir Roubtsov. All rights reserved.
2  *
3  * This program and the accompanying materials are made available under
4  * the terms of the Common Public License v1.0 which accompanies this distribution,
5  * and is available at http://www.eclipse.org/legal/cpl-v10.html
6  *
7  * $Id: AllItem.java,v 1.1.1.1 2004/05/09 16:57:36 vlad_r Exp $
8  */

9 package com.vladium.emma.report;
10
11 // ----------------------------------------------------------------------------
12
/**
13  * @author Vlad Roubtsov, (C) 2003
14  */

15 public
16 final class AllItem extends Item
17 {
18     // public: ................................................................
19

20     public AllItem ()
21     {
22         super (null);
23     }
24     
25     public String JavaDoc getName ()
26     {
27         return "all classes";
28     }
29         
30     public void accept (final IItemVisitor visitor, final Object JavaDoc ctx)
31     {
32         visitor.visit (this, ctx);
33     }
34     
35     // TODO: remove these instance methods returning static data
36
public final IItemMetadata getMetadata ()
37     {
38         return METADATA;
39     }
40
41     public static IItemMetadata getTypeMetadata ()
42     {
43         return METADATA;
44     }
45         
46     // protected: .............................................................
47

48     // package: ...............................................................
49

50     // private: ...............................................................
51

52     
53     private static final Item.ItemMetadata METADATA; // set in <clinit>
54

55     static
56     {
57         METADATA = new Item.ItemMetadata (IItemMetadata.TYPE_ID_ALL, "all",
58             1 << IItemAttribute.ATTRIBUTE_NAME_ID |
59             1 << IItemAttribute.ATTRIBUTE_CLASS_COVERAGE_ID |
60             1 << IItemAttribute.ATTRIBUTE_METHOD_COVERAGE_ID |
61             1 << IItemAttribute.ATTRIBUTE_BLOCK_COVERAGE_ID |
62             1 << IItemAttribute.ATTRIBUTE_LINE_COVERAGE_ID);
63     }
64
65 } // end of class
66
// ----------------------------------------------------------------------------
Popular Tags