Clover coverage report - Code Coverage for hivemind release 1.1-beta-2
Coverage timestamp: Tue Jun 28 2005 10:28:23 EDT
file stats: LOC: 118   Methods: 15
NCLOC: 72   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
RegistryImpl.java 50% 87.5% 86.7% 84.8%
coverage coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // 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
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.hivemind.impl;
 16   
 17    import java.util.List;
 18    import java.util.Locale;
 19   
 20    import org.apache.hivemind.Location;
 21    import org.apache.hivemind.Messages;
 22    import org.apache.hivemind.Registry;
 23    import org.apache.hivemind.internal.Module;
 24    import org.apache.hivemind.internal.RegistryInfrastructure;
 25   
 26    /**
 27    * Implementation of {@link org.apache.hivemind.Registry} that delegates to an instance of
 28    * {@link org.apache.hivemind.internal.RegistryInfrastructure}.
 29    *
 30    * @since 1.1
 31    */
 32    public class RegistryImpl implements Registry
 33    {
 34    private RegistryInfrastructure _infrastructure;
 35   
 36  121 public RegistryImpl(RegistryInfrastructure infrastructure)
 37    {
 38  121 _infrastructure = infrastructure;
 39    }
 40   
 41  2 public boolean containsConfiguration(String configurationId)
 42    {
 43  2 return _infrastructure.containsConfiguration(configurationId, null);
 44    }
 45   
 46  2 public boolean containsService(Class serviceInterface)
 47    {
 48  2 return _infrastructure.containsService(serviceInterface, null);
 49    }
 50   
 51  3 public boolean containsService(String serviceId, Class serviceInterface)
 52    {
 53  3 return _infrastructure.containsService(serviceId, serviceInterface, null);
 54    }
 55   
 56  36 public List getConfiguration(String configurationId)
 57    {
 58  36 return _infrastructure.getConfiguration(configurationId, null);
 59    }
 60   
 61  1 public String expandSymbols(String input, Location location)
 62    {
 63  1 return _infrastructure.expandSymbols(input, location);
 64    }
 65   
 66  77 public Object getService(String serviceId, Class serviceInterface)
 67    {
 68  77 return _infrastructure.getService(serviceId, serviceInterface, null);
 69    }
 70   
 71  11 public Object getService(Class serviceInterface)
 72    {
 73  11 return _infrastructure.getService(serviceInterface, null);
 74    }
 75   
 76  3 public Locale getLocale()
 77    {
 78  3 return _infrastructure.getLocale();
 79    }
 80   
 81  29 public void shutdown()
 82    {
 83  29 _infrastructure.shutdown();
 84    }
 85   
 86  803 public void cleanupThread()
 87    {
 88  803 _infrastructure.cleanupThread();
 89    }
 90   
 91  0 public String valueForSymbol(String name)
 92    {
 93  0 return _infrastructure.valueForSymbol(name);
 94    }
 95   
 96    /** @since 1.1 */
 97  2 public void setupThread()
 98    {
 99  2 _infrastructure.setupThread();
 100    }
 101   
 102    /**
 103    * @since 1.1
 104    */
 105  0 public List getServiceIds( Class serviceInterface )
 106    {
 107  0 return _infrastructure.getServiceIds( serviceInterface );
 108    }
 109   
 110    /**
 111    * @since 1.1
 112    */
 113  1 public Messages getModuleMessages( String moduleId )
 114    {
 115  1 final Module module = _infrastructure.getModule( moduleId );
 116  1 return module == null ? null : module.getMessages();
 117    }
 118    }