Coverage Report - org.mule.registry.RegistryMap
 
Classes in this File Line Coverage Branch Coverage Complexity
RegistryMap
0%
0/16
0%
0/2
1.2
 
 1  
 /*
 2  
  * $Id: RegistryMap.java 17843 2010-07-03 22:08:57Z rossmason $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 package org.mule.registry;
 11  
 
 12  
 import org.mule.api.registry.Registry;
 13  
 import org.mule.util.CaseInsensitiveHashMap;
 14  
 
 15  
 import java.util.Map;
 16  
 
 17  
 /**
 18  
  * Provides a {@link java.util.HashMap} view of values stored in the registry
 19  
  */
 20  
 public class RegistryMap extends CaseInsensitiveHashMap
 21  
 {
 22  
     private Registry registry;
 23  
 
 24  
     public RegistryMap(Registry registry)
 25  0
     {
 26  0
         this.registry = registry;
 27  0
     }
 28  
 
 29  
     public RegistryMap(int i, Registry registry)
 30  
     {
 31  0
         super(i);
 32  0
         this.registry = registry;
 33  0
     }
 34  
 
 35  
     public RegistryMap(int i, float v, Registry registry)
 36  
     {
 37  0
         super(i, v);
 38  0
         this.registry = registry;
 39  0
     }
 40  
 
 41  
     public RegistryMap(Map map, Registry registry)
 42  
     {
 43  0
         super(map);
 44  0
         this.registry = registry;
 45  0
     }
 46  
 
 47  
     public Object get(Object key)
 48  
     {
 49  0
         Object val = super.get(key);
 50  0
         if (val == null)
 51  
         {
 52  0
             val = registry.lookupObject(key.toString());
 53  
         }
 54  0
         return val;
 55  
     }
 56  
 }