Returns a configuration parameter.
@param key the parameter name
@return the {@link LocalCall} object to make the call
320186
public static LocalCall<String> get(String key) {
        return new LocalCall<>(
            "config.get",
            Optional.of(Arrays.asList(key)),
            Optional.empty(),
            new TypeToken<String>() { });
    }
417
public static String get(PropertyKey key, ConfigurationValueOptions options) {
    return sConf.get(key, options);
  }
1020882
protected String getConfig(IConfigKey key) {
        if (configs == null) {
            loadConfigs();
        }
        String value = configs.getProperty(key.getKeyString());
        if (value == null && key instanceof IConfigKeyHaveDefault) {
            return ((IConfigKeyHaveDefault) key).getDefaultValueStr();
        }
        return value;
    }
1301060
public ConfigurationItem getConfigurationItem(final String key) {
    if(key==null || key.trim().isEmpty()) throw new IllegalArgumentException("The passed key was null or empty");
    return getConfigurationItemByKey(configItemsByKey, key);
  }
492842
public String getParameter(final String _key)
    {
        String value = null;
        if (this.parameters != null) {
            final String[] values = this.parameters.get(_key);
            if (values != null && values.length > 0) {
                value = values[0];
            }
        }
        return value;
    }
426544
public String getAsString(String key) {
		Object obj = this.get(key);
		if (obj == null)
			return null;
		return obj.toString();
	}
630101
@SuppressWarnings("unchecked")
    public <T> T get(EventLocal<T> key) {
        EventLocalMap<EventLocal<?>, Object> map = getMap(key);
        if (null == map) {
            return key.initialValue();
        }
        return (T) map.get(key);
    }
1346759
@SuppressWarnings({ "unchecked", "rawtypes" })
    public Option<Adapter<V>> get(final K key) {
        return Option.ofNullable((Adapter) registered.get(key));
    }
1280750
public static String getRequestParameterValue(final HttpServletRequest request, final String key) {
		String[] values = getRequestParameterValues(request, key);
		return values == null || values.length == 0 ? null : values[0];
	}
627479
@Override
    public List<Object> getProperty(String key) {
        List<?> nodes = fetchNodeList(key);

        if (nodes.size() == 0) {
            return null;
        } else {
            List<Object> list = new ArrayList<>();
            for (Object node : nodes) {
                ConfigurationNode configurationNode = (ConfigurationNode) node;
                if (configurationNode.getValue() != null) {
                    list.add(configurationNode.getValue());
                }
            }

            if (list.size() < 1) {
                return null;
            } else {
                return list;
            }
        }
    }
691211
public Parameters getAsParameters(String key) {
		AnyValueMap value = getAsMap(key);
		return new Parameters(value);
	}
331172
public String get(ConfigKey pKey) {
        String value = params.get(pKey);
        if (value != null) {
            return value;
        } else {
            return pKey.getDefaultValue();
        }
    }
533043
@SuppressWarnings("unchecked")
	public <T> T get(String key) {
		Preconditions.checkArgument(key != null && !key.isEmpty(), "Parameter 'key' must not be [" + key + "]");
		Context context = factory.enterContext();
		
		try {
			if (values.containsKey(key)) {
				Object value = values.get(key);
				return (T) ((value instanceof Function) 
						? ((Function) value).call(context, scope, (Scriptable) value, null)
						: value);
			}
			
			synchronized (values) {
				if (values.containsKey(key)) {
					Object value = values.get(key);
					return (T) ((value instanceof Function) 
							? ((Function) value).call(context, scope, (Scriptable) value, null)
							: value);
				} else if (key.equals(ENDPOINTS)) {
					Object endpoints = scope.get(ENDPOINTS);
					
					if (endpoints == null && configuration != null) {
						endpoints = Collections2.filter((Collection<Class<?>>) get(COMPONENTS), new Predicate<Class<?>>() {

							@Override
							public boolean apply(Class<?> clazz) {
								return clazz.isAnnotationPresent(Endpoint.class);
							}
							
						});
					}
					
					values.put(ENDPOINTS, endpoints);
					return (T) ((endpoints instanceof Function) 
							? ((Function) endpoints).call(context, scope, (Scriptable) endpoints, null)
							: endpoints);
				} else if (key.equals(PIPELINE)) {
					Object pipeline = scope.get(PIPELINE);
					
					if (pipeline == null && configuration != null) {
						Pipeline<WebContext> p = configuration.pipeline();
						p.remove(2);
						p.set(2, "JaguarInvoke", new Invoke() {
							
							@Override
							protected <E> E instantiate(Class<E> endpoint) throws Exception {
								return component(endpoint);
							}
							
						});
						pipeline = p;
					}
					
					values.put(PIPELINE, pipeline);
					return (T) ((pipeline instanceof Function) 
							? ((Function) pipeline).call(context, scope, (Scriptable) pipeline, null)
							: pipeline);
				} else if (key.equals(REQUEST_TYPES)) {
					Object requestTypes = scope.get(REQUEST_TYPES);
					
					if (requestTypes == null && configuration != null) {
						requestTypes = configuration.requestTypes();
					}
					
					values.put(REQUEST_TYPES, requestTypes);
					return (T) ((requestTypes instanceof Function) 
							? ((Function) requestTypes).call(context, scope, (Scriptable) requestTypes, null)
							: requestTypes);
				} else if (key.equals(RESPONSE_TYPES)) {
					Object responseTypes = scope.get(RESPONSE_TYPES);
					
					if (responseTypes == null && configuration != null) {
						responseTypes = configuration.responseTypes();
					}
					
					values.put(RESPONSE_TYPES, responseTypes);
					return (T) ((responseTypes instanceof Function) 
							? ((Function) responseTypes).call(context, scope, (Scriptable) responseTypes, null)
							: responseTypes);
				} else if (key.equals(ROUTING)) {
					Object routing = scope.get(ROUTING);
					
					if (routing == null && configuration != null) {
						routing = configuration.routing();
					}
					
					values.put(ROUTING, routing);
					return (T) ((routing instanceof Function) 
							? ((Function) routing).call(context, scope, (Scriptable) routing, null)
							: routing);
				} else if (key.equals(DEPLOYMENT)) {
					Object deployment = scope.get(DEPLOYMENT);
					values.put(DEPLOYMENT, deployment);
					return (T) ((deployment instanceof Function) 
							? ((Function) deployment).call(context, scope, (Scriptable) deployment, null)
							: deployment);
				} else if (key.equals(COMPONENTS)) {
					Object components = scope.get(COMPONENTS);
					
					if (components == null) {
						components = components();
					}
					
					values.put(COMPONENTS, components);
					return (T) ((components instanceof Function) 
							? ((Function) components).call(context, scope, (Scriptable) components, null)
							: components);
				} else {
					Object value = scope.get(key);
					
					if (value == null) {
						return null;
					}
					
					values.put(key, value);
					return (T) ((value instanceof Function) 
							? ((Function) value).call(context, scope, (Scriptable) value, null)
							: value);
				}
			}
			
		} finally {
			Context.exit();
		}
	}
606114
@Override
    public String key(String key, Object[] args) {

        if (hasConfigValue(key)) {
            return getConfigValue(key, args);
        }
        return m_messages.key(key, args);
    }
1245026
@ManagedOperation
    public V get(K key) {

        // 1. Try the L1 cache first
        if(l1_cache != null) {
            V val=l1_cache.get(key);
            if(val != null) {
                if(log.isTraceEnabled())
                    log.trace("returned value " + val + " for " + key + " from L1 cache");
                return val;
            }
        }

        // 2. Try the local cache
        Cache.Value<Value<V>> val=l2_cache.getEntry(key);
        Value<V> tmp;
        if(val != null) {
            tmp=val.getValue();
            if(tmp !=null) {
                V real_value=tmp.getVal();
                if(real_value != null && l1_cache != null && val.getTimeout() >= 0)
                    l1_cache.put(key, real_value, val.getTimeout());
                return tmp.getVal();
            }
        }

        // 3. Execute a cluster wide GET
        try {
            RspList<Object> rsps=disp.callRemoteMethods(null,
                                                new MethodCall(GET, key),
                                                new RequestOptions(ResponseMode.GET_ALL, call_timeout));
            for(Rsp rsp: rsps.values()) {
                Object obj=rsp.getValue();
                if(obj == null || obj instanceof Throwable)
                    continue;
                val=(Cache.Value<Value<V>>)rsp.getValue();
                if(val != null) {
                    tmp=val.getValue();
                    if(tmp != null) {
                        V real_value=tmp.getVal();
                        if(real_value != null && l1_cache != null && val.getTimeout() >= 0)
                            l1_cache.put(key, real_value, val.getTimeout());
                        return real_value;
                    }
                }
            }
            return null;
        }
        catch(Throwable t) {
            if(log.isWarnEnabled())
                log.warn("get() failed", t);
            return null;
        }
    }
1318776
public String getString(String key) {
    	String value = get(key);
    	Utils.require(value != null, key + " parameter is not set");
    	return value;
    }
1110209
public String getConfig(String key) throws MojoExecutionException {
		ResourceBundle resource = null;
		try {
			resource = ResourceBundle.getBundle(
					"io/sarl/maven/compiler/config", //$NON-NLS-1$
					java.util.Locale.getDefault(),
					MavenHelper.class.getClassLoader());
		} catch (MissingResourceException e) {
			throw new MojoExecutionException(e.getLocalizedMessage(), e);
		}
		String value = resource.getString(key);
		if (value == null || value.isEmpty()) {
			value = Strings.nullToEmpty(value);
			this.log.warn(MessageFormat.format(Messages.MavenHelper_1, key));
		}
		return value;
	}