• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: CoverageOptions.java,v 1.1.1.1.2.1 2004/06/27 22:58:26 vlad_r Exp $
8  */
9 package com.vladium.emma.data;
10 
11 import java.io.DataInput;
12 import java.io.DataOutput;
13 import java.io.IOException;
14 import java.io.Serializable;
15 
16 // ----------------------------------------------------------------------------
17 /**
18  * @author Vlad Roubtsov, (C) 2003
19  */
20 public
21 final class CoverageOptions implements Serializable
22 {
23     // public: ................................................................
24 
excludeSyntheticMethods()25     public boolean excludeSyntheticMethods ()
26     {
27         return m_excludeSyntheticMethods;
28     }
29 
excludeBridgeMethods()30     public boolean excludeBridgeMethods ()
31     {
32         return m_excludeBridgeMethods;
33     }
34 
doSUIDCompensation()35     public boolean doSUIDCompensation ()
36     {
37         return m_doSUIDCompensation;
38     }
39 
40     // protected: .............................................................
41 
42     // package: ...............................................................
43 
44     /*
45      * Package-private to be accessble by CoverageOptionsFactory
46      * (the factory is in a separate source file to avoid spurious
47      * classloading dependency via InnerClasses attr)
48      */
CoverageOptions(final boolean excludeSyntheticMethods, final boolean excludeBridgeMethods, final boolean doSUIDCompensation)49     CoverageOptions (final boolean excludeSyntheticMethods,
50                      final boolean excludeBridgeMethods,
51                      final boolean doSUIDCompensation)
52     {
53         m_excludeSyntheticMethods = excludeSyntheticMethods;
54         m_excludeBridgeMethods = excludeBridgeMethods;
55         m_doSUIDCompensation = doSUIDCompensation;
56     }
57 
58 
readExternal(final DataInput in)59     static CoverageOptions readExternal (final DataInput in)
60         throws IOException
61     {
62         return new CoverageOptions (in.readBoolean (),
63                                     in.readBoolean (),
64                                     in.readBoolean ());
65     }
66 
writeExternal(final CoverageOptions options, final DataOutput out)67     static void writeExternal (final CoverageOptions options, final DataOutput out)
68         throws IOException
69     {
70         out.writeBoolean (options.m_excludeSyntheticMethods);
71         out.writeBoolean (options.m_excludeBridgeMethods);
72         out.writeBoolean (options.m_doSUIDCompensation);
73     }
74 
75     // private: ...............................................................
76 
77 
78     private final boolean m_excludeSyntheticMethods;
79     private final boolean m_excludeBridgeMethods;
80     private final boolean m_doSUIDCompensation;
81 
82 } // end of class
83 // ----------------------------------------------------------------------------