Clover Coverage Report - guice
Coverage timestamp: Wed Jan 7 2009 19:09:55 CST
../../../../../img/srcFileCovDistChart0.png 84% of files have more coverage
6   61   2   3
0   31   0.33   0.29
2     1  
7    
 
  JmxTest       Line # 30 1 1 2 0% 0.0
  JmxTest.Foo       Line # 32 0 0 0 - -1.0
  JmxTest.FooImpl       Line # 34 0 0 0 - -1.0
  JmxTest.TransactionalFoo       Line # 37 0 0 0 - -1.0
  JmxTest.Bar       Line # 39 0 0 0 - -1.0
  JmxTest.Transactional       Line # 42 0 0 0 - -1.0
  JmxTest.TestModule       Line # 48 5 1 6 0% 0.0
 
No Tests
 
1    /**
2    * Copyright (C) 2006 Google Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
15    */
16   
17    package com.google.inject.tools.jmx;
18   
19    import com.google.inject.AbstractModule;
20    import com.google.inject.BindingAnnotation;
21    import com.google.inject.Key;
22    import com.google.inject.Singleton;
23    import com.google.inject.name.Names;
24    import java.lang.annotation.Retention;
25    import static java.lang.annotation.RetentionPolicy.RUNTIME;
26   
27    /**
28    * @author crazybob@google.com (Bob Lee)
29    */
 
30    public class JmxTest {
31   
 
32    interface Foo {}
33   
 
34    static class FooImpl implements Foo {}
35   
36    @Singleton
 
37    static class TransactionalFoo implements Foo {}
38   
 
39    static class Bar {}
40   
41    @BindingAnnotation @Retention(RUNTIME)
 
42    @interface Transactional {}
43   
 
44  0 toggle public static void main(String[] args) throws Exception {
45  0 Manager.main(new String[] { TestModule.class.getName() });
46    }
47   
 
48    public static class TestModule extends AbstractModule {
49   
 
50  0 toggle protected void configure() {
51  0 bind(Foo.class).to(FooImpl.class);
52  0 bind(Bar.class);
53  0 bind(Foo.class)
54    .annotatedWith(Transactional.class)
55    .to(FooImpl.class);
56  0 bindConstant().annotatedWith(Names.named("port")).to(8080);
57  0 bind(Key.get(Object.class)).to(Key.get(Bar.class));
58    // install(new ServletModule());
59    }
60    }
61    }