Look up a local home using its global home name in JNDI.
The semantics are identical to javax.naming.Context.lookup(). <p>

@param target The global JNDI name assigned to the bean.
@return The local home for this bean.
779371
public static Object lookup(String target) throws NamingException
    {
        if (theRootContext == null) {
            theRootContext = new InitialContext();
        }

        return theRootContext.lookup(localHomePrefixString + target);
    }
846109
public static PathAddress transformAddress(final PathAddress original, final TransformationTarget target) {
        return TransformersImpl.transformAddress(original, target);
    }
768191
public static Field getAccessibleField(final Object target, final String name) {
		for (Class<?> superClass = target.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) {
			try {
				Field field = superClass.getDeclaredField(name);
				makeAccessible(field);
				return field;
			} catch (NoSuchFieldException e) {
				// Field 不在当前类定义，继续向上转型
				LOG.trace("", e);
			}
		}
		return null;
	}
594411
@SuppressWarnings({"unused", "WeakerAccess"})
    public Object getProperty(String name) {
        if (!this.config.isPersonalizationEnabled()) return null;
        return getLocalDataStore().getProfileProperty(name);
    }
18394
public EJSHome getTargetHome(String child)
    {
        EJSHome targetHome = null;
        HomeRecord targetHomeRecord = childBeans.get(child);
        if (targetHomeRecord == null) {
            //try recursively
            Enumeration<HomeRecord> children = childBeans.elements();
            while (children.hasMoreElements()) {
                HomeRecord childHomeRecord = children.nextElement();
                targetHome = childHomeRecord.getTargetHome(child);
                if (targetHome != null)
                    break;
            }
        }
        // Get the EJSHome from the homeRecord.  If the home has not been
        // initialized yet, call HomeOfHomes.getHome() to trigger it.
        if (targetHomeRecord != null) {
            targetHome = targetHomeRecord.getHomeAndInitialize(); // d648522
        }
        return targetHome;
    }
135671
public Map<String, Map<String, String>> getPropertyLocaleSearch() {

        if (m_propertiesLocaleSearch == null) {
            m_propertiesLocaleSearch = CmsCollectionsGenericWrapper.createLazyMap(
                new CmsLocalePropertyLoaderTransformer(getCmsObject(), this, true));
            // result may still be null
            return (m_propertiesLocaleSearch == null) ? Collections.EMPTY_MAP : m_propertiesLocaleSearch;
        }
        return m_propertiesLocaleSearch;
    }
162828
@Override
    public Host lookup( final String hostName )
    {
        boolean isNew = false;
        Host h = hosts.get( hostName );
        if ( h == null )
        {
            isNew = true;
            h = new Host();
        }

        if ( h.isPatternsApplied() )
        {
            return h;
        }

        if ( h.getHostName() == null )
        {
            h.setHostName( hostName );
        }

        if ( h.getUser() == null )
        {
            h.setUser( userName() );
        }

        if ( h.getPort() < 1 )
        {
            h.setPort( SSH_PORT );
        }

        h.setPatternsApplied( true );

        if ( isNew )
        {
            hosts.put( hostName, h );
        }

        return h;
    }
183266
def _index_target(self, target_adaptor):
    """"""
    # Instantiate the target.
    address = target_adaptor.address
    target = self._instantiate_target(target_adaptor)
    self._target_by_address[address] = target

    for dependency in target_adaptor.dependencies:
      if dependency in self._target_dependencies_by_address[address]:
        raise self.DuplicateAddressError(
          'Addresses in dependencies must be unique. '
          "'{spec}' is referenced more than once by target '{target}'."
          .format(spec=dependency.spec, target=address.spec)
        )
      # Link its declared dependencies, which will be indexed independently.
      self._target_dependencies_by_address[address].add(dependency)
      self._target_dependees_by_address[dependency].add(address)
    return target
307150
private static String getLocalInterfaceName(EnterpriseBean enterpriseBean)
    {
        if (enterpriseBean instanceof ComponentViewableBean)
        {
            return ((ComponentViewableBean) enterpriseBean).getLocalInterfaceName();
        }

        return null;
    }
798021
public Displayer lookupDisplayer(DisplayerSettings target) {
        RendererLibrary renderer = rendererManager.getRendererForDisplayer(target);
        Displayer displayer = renderer.lookupDisplayer(target);
        if (displayer == null) {
            String rendererUuid = target.getRenderer();
            if (StringUtils.isBlank(rendererUuid)) throw new RuntimeException(CommonConstants.INSTANCE.displayerlocator_default_renderer_undeclared(target.getType().toString()));
            throw new RuntimeException(CommonConstants.INSTANCE.displayerlocator_unsupported_displayer_renderer(target.getType().toString(), rendererUuid));
        }
        displayer.setDisplayerSettings(target);

        // Check if a DataSet has been set instead of a DataSetLookup.
        DataSetLookup dataSetLookup = target.getDataSetLookup();
        if (target.getDataSet() != null) {
            DataSet dataSet = target.getDataSet();
            clientDataSetManager.registerDataSet(dataSet);
            dataSetLookup = new DataSetLookup(dataSet.getUUID());
        }

        DataSetHandler handler = new DataSetHandlerImpl(clientServices, dataSetLookup);
        displayer.setDataSetHandler(handler);
        setValueFormatters(displayer);
        return displayer;
    }
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;
    }
1312903
private static HttpHost determineTarget(HttpUriRequest request) throws ClientProtocolException {
		// A null target may be acceptable if there is a default target.
		// Otherwise, the null target is detected in the director.
		HttpHost target = null;
		URI requestURI = request.getURI();
		if (requestURI.isAbsolute()) {
			target = URIUtils.extractHost(requestURI);
			if (target == null) {
				throw new ClientProtocolException(
						"URI does not specify a valid host name: " + requestURI);
			}
		}
		return target;
	}
441927
private static String getIdentifier(String target) {

        // check map
        String id = LOCATION_IDENTIFIER_MAP.get(target);
        if (id == null) {
            id = LOCATION_IDENTIFIER_PREFIX + target;
            LOCATION_IDENTIFIER_MAP.put(target, id);
        }
        return id;

    }
753147
private static Class<?> findInterface(Class<?> target)
   {
      if (target == null)
      {
         return null;
      }
      Class<?>[] interfaces = target.getInterfaces();
      if (interfaces != null)
      {
         for (Class<?> c : TARGET_INTERFACES)
         {
            for (Class<?> i : interfaces)
            {
               if (c.getName().equals(i.getName()))
               {
                  return c;
               }
            }
         }
      }
      return findInterface(target.getSuperclass());
   }
1028357
String getTargetInternalName(String sourceInternalName, String targetPackage) {
        StringBuilder targetInternalName = new StringBuilder();
        targetInternalName.append(targetPackage.replaceAll("\\.", "/"));

        int lastSlashIndex = sourceInternalName.lastIndexOf('/');
        targetInternalName.append(sourceInternalName.substring(lastSlashIndex));

        return targetInternalName.toString();
    }
72387
public java.lang.String getTarget() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.target);

    }
1343663
public String resolveRelativePath(String source, String target) {

        String result = null;
        if (target.startsWith(".")) {
            if (target.startsWith("./")) {
                target = target.substring(2);
            }
            while (target.startsWith("../")) {
                source = CmsResource.getParentFolder(source);
                target = target.substring(3);
            }
            result = CmsStringUtil.joinPaths(source, target);
        } else {
            result = target;
        }
        return result;
    }