Returns a deep copy of the first found connection descriptor
with the given <code>jcdAlias</code> name or <code>null</code>
if none found.
164930
private JdbcConnectionDescriptor deepCopyOfFirstFound(String jcdAlias)
    {
        Iterator it = jcdMap.values().iterator();
        JdbcConnectionDescriptor jcd;
        while (it.hasNext())
        {
            jcd = (JdbcConnectionDescriptor) it.next();
            if (jcdAlias.equals(jcd.getJcdAlias()))
            {
                return (JdbcConnectionDescriptor) SerializationUtils.clone(jcd);
            }
        }
        return null;
    }
836786
public static JClass localForName(String name)
  {
    JClassLoaderWrapper jLoader = JClassLoaderWrapper.create();
    
    return jLoader.forName(name);
  }
1327986
public OpDescriptor getOpDescriptorForOnnx(String name) {
        if(!onnxOpDescriptors.containsKey(name)) {
            throw new ND4JIllegalStateException("No op found with name " + name);
        }

        return onnxOpDescriptors.get(name);
    }
919450
public ClassDescriptor getDescriptorFor(String strClassName) throws ClassNotPersistenceCapableException
    {
        ClassDescriptor result = discoverDescriptor(strClassName);
        if (result == null)
        {
            throw new ClassNotPersistenceCapableException(strClassName + " not found in OJB Repository");
        }
        else
        {
            return result;
        }
    }
733659
@Override
    public DestinationHandler getNamedDestination(ConsumerDispatcher cd)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "getNamedDestination", cd);
            SibTr.exit(tc, "getNamedDestination", _destinationAttachedTo);
        }
        return _destinationAttachedTo;
    }
1102039
public ConnectionInfo getConnection(String name) {
    final URI uri = uriWithPath("./connections/" + encodePathSegment(name));
    return this.rt.getForObject(uri, ConnectionInfo.class);
  }
380677
@SuppressWarnings("unchecked")
    public <T> T getNamedObject(String name) {
        return (T)_named.get(name);
    }
823369
public CollectionDescriptorDef getCollection(String name)
    {
        CollectionDescriptorDef collDef = null;

        for (Iterator it = _collections.iterator(); it.hasNext(); )
        {
            collDef = (CollectionDescriptorDef)it.next();
            if (collDef.getName().equals(name))
            {
                return collDef;
            }
        }
        return null;
    }
413969
private static Object searchInCacheThenCopy(Map<Object, Object> copiedObjectMap, Object sourceObject,
            final KunderaMetadata kunderaMetadata)
    {
        Object copyTargetRelObj = null;
        copyTargetRelObj = deepCopyUsingMetadata(sourceObject, copiedObjectMap, kunderaMetadata);
        return copyTargetRelObj;
    }
1171320
private ArrayList<String> getConnectorStrings(String name) {
        ArrayList<String> connectorStrings = new ArrayList<String>();

        try {
            MBeanServer mbeanServer = getServerForName(name);
            Set<ObjectName> objs = mbeanServer.queryNames(new ObjectName("*:type=Connector,*"), null);
            String hostname = InetAddress.getLocalHost().getHostName();
            InetAddress[] addresses = InetAddress.getAllByName(hostname);

            for (Iterator<ObjectName> i = objs.iterator(); i.hasNext(); ) {
                ObjectName obj = i.next();
                String scheme = mbeanServer.getAttribute(obj, "scheme").toString();
                String port = obj.getKeyProperty("port");
                connectorStrings.add(scheme + "://localhost:" + port);
                logger.info("Adding: {}", scheme + "://localhost:" + port);
            }
        } catch (Exception e) {
        }

        return connectorStrings;
    }
259885
private Object getJavaObjectInstance(Context c, Hashtable<?, ?> envmt, String className, String bindingName, ResourceInfo resourceRefInfo, IndirectReference ref) throws Exception {
        // Return null if we don't find a binding so that the caller can
        // use JNDI if enabled.
        Object resource = null;

        NamingConstants.JavaColonNamespace namespace = NamingConstants.JavaColonNamespace.match(bindingName);
        if (namespace != null) {
            ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
            if (cmd != null) {
                OSGiInjectionScopeData isd = injectionEngine.getInjectionScopeData(cmd, namespace);
                if (isd != null) {
                    String name = namespace.unprefix(bindingName);

                    InjectionBinding<?> binding = isd.getInjectionBinding(namespace, name);
                    if (binding == null && isd.processDeferredReferenceData()) {
                        // Try again after processing deferred reference data.
                        binding = isd.getInjectionBinding(namespace, name);
                    }

                    if (binding != null) {
                        resource = getBindingObjectInstance(c, envmt, className, resourceRefInfo, ref, binding);
                    }
                }
            }

            if (resource == null && namespace == NamingConstants.JavaColonNamespace.COMP) {
                resource = getDefaultJavaCompObjectInstance(namespace, bindingName, resourceRefInfo);
            }

            // If not found and the customer did not provide a binding, then try and
            // auto-link to a resource that matches on name in the service registry.
            if (resource == null && ref.defaultBinding && !ref.name.startsWith("java:")) {
                resource = createResource(ref.name, className, ref.name, resourceRefInfo);
            }
        }

        return resource;
    }
101907
@CheckForNull
    public Descriptor<T> findByName(String id) {
        for (Descriptor<T> d : this)
            if(d.getId().equals(id))
                return d;
        return null;
    }
1328555
public Optional<MapperInstance> getKeyDeserializer( JType type ) {
        return Optional.fromNullable( keyDeserializers.get( type.getQualifiedSourceName() ) );
    }
406514
@Override
    public Object getProperty(String name)
    {
        // DTD-specific properties...
        if (name.equals(STAX_PROP_ENTITIES)) {
            safeEnsureFinishToken();
            if (mDTD == null || !(mDTD instanceof DTDSubset)) {
                return null;
            }
            List<EntityDecl> l = ((DTDSubset) mDTD).getGeneralEntityList();
            /* Let's make a copy, so that caller can not modify
             * DTD's internal list instance
             */
            return new ArrayList<EntityDecl>(l);
        }
        if (name.equals(STAX_PROP_NOTATIONS)) {
            safeEnsureFinishToken();
            if (mDTD == null || !(mDTD instanceof DTDSubset)) {
                return null;
            }
            /* Let's make a copy, so that caller can not modify
             * DTD's internal list instance
             */
            List<NotationDeclaration> l = ((DTDSubset) mDTD).getNotationList();
            return new ArrayList<NotationDeclaration>(l);
        }
        return super.getProperty(name);
    }
28965
public static String[] getByJNDI() {
        try {
            Class<?> dirContext =
                    Class.forName("javax.naming.directory.DirContext");
            Hashtable<String, String> env = new Hashtable<String, String>();
            env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
            Class<?> initialDirContext =
                    Class.forName("javax.naming.directory.InitialDirContext");
            Constructor<?> constructor = initialDirContext.getConstructor(Hashtable.class);

            Object obj = constructor.newInstance(env);
            Method m = dirContext.getMethod("getEnvironment");
            Hashtable newEnv = (Hashtable) m.invoke(obj);
            String dns = (String) newEnv.get("java.naming.provider.url");
            String dnsTrim = dns.replace("dns://", "");
            return dnsTrim.split(" ");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
1214875
public CollectionDescriptor getCollectionDescriptorByName(String name)
    {
        if (name == null)
        {
            return null;
        }

        CollectionDescriptor cod  = (CollectionDescriptor) getCollectionDescriptorNameMap().get(name);

        //
        // BRJ: if the CollectionDescriptor is not found
        // look in the ClassDescriptor referenced by 'super' for it
        //
        if (cod == null)
        {
            ClassDescriptor superCld = getSuperClassDescriptor();
            if (superCld != null)
            {
                cod = superCld.getCollectionDescriptorByName(name);
            }
        }

        return cod;
    }
163754
public RequestDispatcher getNamedDispatcher(String name)
    {
        if (name == null || name.length()==0)
            name=__DEFAULT_SERVLET;

        try { return new Dispatcher(ServletHandler.this,name); }
        catch(Exception e) {LogSupport.ignore(log,e);}
        
        return null;
    }