Looks up a binding.

@param name the name passed to {@link #bind}
@return the binding, or null if unavailable
@throws NotContextException if a lookup attempts to use a binding as a
context name
501155
public T lookup(String name) throws NamingException {
        T binding = super.get(name);
        if (binding != null) {
            return binding;
        }

        // Binding does not exist.  Check if any the contexts are bindings.
        String contextName = name;
        while (!(contextName = getContextName(contextName)).isEmpty()) {
            if (containsKey(contextName)) {
                throw new NotContextException(namespace + "/" + contextName);
            }
        }

        return null;
    }
226975
public synchronized String getValue(String name) {
        if (map == null) {
            return null;
        }
        return map.get(name);
    }
309499
protected PropertyValueBindingBuilder bindProperty( final String name )
    {
        checkNotNull( name, "Property name cannot be null." );

        return new PropertyValueBindingBuilder()
        {

            public void toValue( final String value )
            {
                checkNotNull( value, "Null value not admitted for property '%s's", name );

                bindConstant().annotatedWith( named( name ) ).to( value );
            }

        };
    }
266069
public void setName(String name) {
		if (name == null || name.isEmpty()) {
			throw new IllegalContextNameException(
					IllegalContextNameException.Reason.EMPTY_NAME,
					"The context name must not be null nor empty.");
		}

		this.name = name;
	}
1367320
public String find(String name) {
        String value = null;
        for (DataBinder top = this; top != null && (value = top.get(name)) == null; top = top.getLower());
        return value;
    }
37513
public final synchronized L[] get(String name) {
        return (this.map != null)
                ? this.map.get(name)
                : null;
    }
626179
public static String getRequestParameter(FacesContext context, String name) {
		return context.getExternalContext().getRequestParameterMap().get(name);
	}
818423
@SuppressWarnings("unchecked")
    public <T> T getContextData(String name) {
        T rc = null;
        if (null != this.inheritableLocals) {
            rc = (T) this.inheritableLocals.get(name);
        }
        if (null == rc && null != this.locals) {
            rc = (T) this.locals.get(name);
        }
        return rc;
    }
90585
public static Variable lookup(String varName, BindingSet bindingSet) {
        if (bindingSet == null) {
            return null;
        }
        Binding binding = bindingSet.lookup(varName);
        return (binding != null) ? binding.getVariable() : null;
    }
1243787
public Object getNonXslTopLevel(QName name)
  {
    return (null != m_NonXslTopLevel) ? m_NonXslTopLevel.get(name) : null;
  }
940659
public Context locate(ILexNameToken name)
	{
		Value v = get(name);

		if (v == null)
		{
			if (outer != null)
			{
				return outer.locate(name);
			} else
			{
				return null;
			}
		} else
		{
			return this;
		}
	}
565152
@Override
	public NamingEnumeration<Binding> listBindings(String name) throws NamingException
    {
        return listBindings(new CompositeName(name));
    }
133421
public static Cookie getCookie(final WebContext context, final String name) {
        return getCookie(context.getRequestCookies(), name);
    }
575665
@SuppressWarnings("unchecked")
	public static <T> T lookup(String name) {
		try {
			return (T) new InitialContext().lookup(name);
		} catch (NamingException e) {
			throw new IllegalStateException(e);
		}
	}
226716
public String getByName(final String name) {
		if (headerMap == null) {
			throw new IllegalStateException("No header available");
		}

		final Integer col = headerMap.get(name);
		if (col != null) {
			return get(col);
		}
		return null;
	}
773575
public <T>  T get(String name, Class<T> type){
        Object o = context.get(name);
        return o == null? null : (T) o;
    }
1247135
@Override
    public Object lookup(String name)
    {
        // Note: this context method is allowed from all bean methods,
        //       except the constructor... which has not way to access
        //       the context.  Therefore, no 'state' checking needs
        //       to be performed... just validate the parameter.
        if (name == null)
            throw new IllegalArgumentException("null 'name' parameter.");

        Object result = null;

        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "lookup: " + name);

        // Previously, this method used Naming for comp/env, which tolerated the
        // 'name' starting with 'java:comp/env/', but that is NOT part of the
        // name in our map.                                                d473811
        String lookupName = name;
        if (name.startsWith("java:comp/env/")) // F743-609 remove useless null check
        {
            lookupName = name.substring(14);
        }

        // -----------------------------------------------------------------------
        // Rather than perform a lookup using Naming, the InjectionBinding
        // that was created during populateJavaNameSpace will be located
        // and used to obtain/create the result object, just like it
        // would be done for injection.                                    d473811
        // -----------------------------------------------------------------------

        InjectionBinding<?> binding = home.beanMetaData.ivJavaColonCompEnvMap.get(lookupName);

        if (binding != null)
        {
            try
            {
                result = binding.getInjectionObject();
            } catch (InjectionException ex)
            {
                FFDCFilter.processException(ex, CLASS_NAME + ".lookup",
                                            "1342", this);
                IllegalArgumentException iae = new IllegalArgumentException
                                ("Failure occurred obtaining object for " + name +
                                 " reference defined for " + home.beanMetaData.j2eeName, ex);

                if (isTraceOn && tc.isEntryEnabled())
                    Tr.exit(tc, "lookup: " + iae);

                throw iae;
            }
        }
        else
        {
            result = container.getEJBRuntime().javaColonLookup(name, home);
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "lookup: " + result.getClass().getName());

        return result;
    }