Looks up for a JNDI definition of the provided key.

@param key name of configuration key, e.g. "dsn"
@return the value as defined in JNDI or null if it isn't defined.
185440
public static String jndiLookup(String key) {
        String value = null;
        try {
            Context c = new InitialContext();
            value = (String) c.lookup(JNDI_PREFIX + key);
        } catch (NoInitialContextException e) {
            logger.trace("JNDI not configured for Sentry (NoInitialContextEx)");
        } catch (NamingException e) {
            logger.trace("No /sentry/" + key + " in JNDI");
        } catch (RuntimeException e) {
            logger.warn("Odd RuntimeException while testing for JNDI", e);
        }
        return value;
    }
719
public synchronized Map<String, Object> getConfiguration(String key) {
		return Optional.ofNullable(inventory.get(key))
				.flatMap(v->v.getConfiguration())
				.map(v->v.getMap())
				.orElse(null);
	}
898372
public String get(String key) {
		if(key==null)return null;
		int idx=0,equal=0,amp=0;
		while(idx>=0 && (equal = tresp.indexOf('=',idx))>=0) {
			amp = tresp.indexOf('&',equal);
			if(key.regionMatches(0, tresp, idx, equal-idx)) {
				return amp>=0?tresp.substring(equal+1, amp):tresp.substring(equal+1); 
			}
			idx=amp+(amp>0?1:0);
		}
		return null;
	}
172800
public Object get(String key)
    {
        if (key==null)
            return _nullValue;
        
        Map.Entry entry = getEntry(key,0,key.length());
        if (entry==null)
            return null;
        return entry.getValue();
    }
889369
protected final <T> String getString(final IKey<T> key) {
        final Object value = config.get(key.key());

        return String.valueOf(value != null ? value : key.getDefaultValue());
    }
135067
private String getInternal(String key) {
		Preconditions.checkArgument(configuredOptions.containsKey(key),
			"The configuration " + key + " has not been configured.");

		return configuredOptions.get(key);
	}
452330
public T getValue(Object key) {
        Rsp<T> rsp=get(key);
        return rsp != null? rsp.getValue() : null;
    }
1334743
public String get(String key) {
        Preconditions.checkNotNull(key, "key is null");
        return values.get(key);
    }
1268700
public String getKeyOrDefault(String key) {
        if (StringUtils.isBlank(key)) {
            if (this.hasDefaultEnvironment()) {
                return defaultEnvironment;
            } else {
                throw new MultiEnvSupportException("[environment] property is mandatory and can't be empty");
            }
        }
        if (map.containsKey(key)) {
            return key;
        }
        if (this.hasTemplateEnvironment()) {
            return this.templateEnvironment;
        }
        LOG.error("Failed to find environment [{}] in {}", key, this.keySet());
        throw new MultiEnvSupportException(String.format(
                "Failed to find configuration for environment %s", key));
    }
1019366
protected Plugin lookupPlugin(String key) {
        List<Plugin> plugins = project.getBuildPlugins();

        for (Iterator<Plugin> iterator = plugins.iterator(); iterator.hasNext();) {
            Plugin plugin = iterator.next();
            if(key.equalsIgnoreCase(plugin.getKey())) {
                return plugin;
            }
        }
        return null;
    }
1209655
public String getProperty(String key)
	{
		String servicePid = this.getServicePid();
		String value = null;
		if (!key.contains("."))
		{
			value = context.getProperty(servicePid + '.' + key);
	        if ((value == null) && (properties != null))
	            value = properties.get(servicePid + '.' + key);
		}
        if (value == null)
			value = context.getProperty(key);
        if ((value == null) && (properties != null))
            value = properties.get(key);
		return value;
	}
770198
@Nullable
  public <T> T get(Key<T> key) {
    for (int i = size - 1; i >= 0; i--) {
      if (bytesEqual(key.asciiName(), name(i))) {
        return key.parseBytes(value(i));
      }
    }
    return null;
  }
1214891
public String getProperty(String key)
    {
        if (properties == null)
            return null;
        String value = properties.get(key);
        if (value == null)
        {
            if (key.startsWith(PROPERTY_PREFIX))
                value = properties.get(key.substring(PROPERTY_PREFIX.length()));
            else
                value = properties.get(PROPERTY_PREFIX + key);
        }
        return value;
    }
873181
public String get(String key) {
    	if(requestedKeys == null) requestedKeys = new HashSet<String>();
    	String value = map.get(key);
    	requestedKeys.add(key);
    	return value;
    }
1153844
protected final String getConfigurationValue(String key)
    {
        //get value
        String value=this.monitorConfiguration.get(key);
        
        //trim value
        if(value!=null)
        {
            value=value.trim();
            
            //set as null if empty string
            if(value.length()==0)
            {
                value=null;
            }
        }
        
        this.monitorLogger.logDebug(new Object[]{"Extracted configuration for key: ",key," value: ",value},null);
        
        return value;
    }
550447
public Object get(String key) {
    	if(config != null) {
    		return config.get(key);
    	}
    	else
    		return null;
    }
120665
@Override
    public String get(final String key) {
        return retrieve(new Callable<String>() {
            @Override
            public String call() throws Exception {
                return configuration.getString(key);
            }
        }, null);
    }