Gets object type by its name and library where it is defined.

@param name    an object type name.
@param library a library where the type is defined
@return the object type or null is the type wasn't found.
770933
public static Class<?> getType(String name, String library) {
		try {
			// Load module
			if (library != null && !library.isEmpty()) {
				URL moduleUrl = new File(library).toURI().toURL();
				URLClassLoader child = new URLClassLoader(new URL[] { moduleUrl }, ClassLoader.getSystemClassLoader());
				return Class.forName(name, true, child);
			} else {
				return Class.forName(name);
			}
		} catch (Exception ex) {
			return null;
		}
	}
1344743
public ClassDocImpl lookupClass(String name) {
        ClassSymbol c = getClassSymbol(name);
        if (c != null) {
            return getClassDoc(c);
        } else {
            return null;
        }
    }
1127757
public <T> T get(Class<T> c, String name){
        return Objects.cast(get(name),c);
    }
1282205
public Object get(Object name) 
    {
        Object l=super.get(name);
        switch(LazyList.size(l))
        {
          case 0:
              return null;
          case 1:
              Object o=LazyList.get(l,0);
              return o;
          default:
              return LazyList.getList(l,true);
        }
    }
958505
public Object getFirst(String name) {
    Object value = get(name);
    if (value instanceof Collection<?>) {
      @SuppressWarnings("unchecked")
      Collection<Object> collectionValue = (Collection<Object>) value;
      Iterator<Object> iterator = collectionValue.iterator();
      return iterator.hasNext() ? iterator.next() : null;
    }
    return value;
  }
714633
function(name) {
            for (var i = 0; i < this.objects.length; i++) {
                if (this.objects[i].name === name) {
                    return this.objects[i];
                }
            }
            return null;
        }
33223
public <T extends AbstractSchemaProperty> T get(final Class<T> clazz, final String name) {
        Set<T> propertyCollection = get(clazz);
        for (T property : propertyCollection) {
            if (property.getName().equals(name)) {
                return property;
            }
        }
        return null;
    }
245107
public static <T> T lookup(String name) {
        InitialContext initialContext = initialContext();
        try {
            @SuppressWarnings("unchecked")
            T object = (T) initialContext.lookup(name);
            if (object == null) {
                throw new NameNotFoundException(name + " was found but is null");
            }
            return object;
        } catch (NameNotFoundException e) {
            throw new IllegalArgumentException(name + " was not found in JNDI", e);
        } catch (NamingException e) {
            throw new IllegalArgumentException("JNDI lookup failed", e);
        } finally {
            closeContext(initialContext);
        }
    }
1340402
public static ObjectIdentifier getOID(String name) {
        OIDInfo info = nameMap.get(name);
        return (info == null) ? null : info.oid;
    }
1013973
private Object find(String name) {
		if (name == null)
			throw new NullPointerException("Dependency name cannot be null");
		if (_references == null)
			throw new NullPointerException("References shall be set");

		return _dependencies.get(name);
	}
1155331
public ObjectReferenceDescriptor getObjectReferenceDescriptorByName(String name)
    {
        ObjectReferenceDescriptor ord = (ObjectReferenceDescriptor)
            getObjectReferenceDescriptorsNameMap().get(name);

        //
        // BRJ: if the ReferenceDescriptor is not found
        // look in the ClassDescriptor referenced by 'super' for it
        //
        if (ord == null)
        {
            ClassDescriptor superCld = getSuperClassDescriptor();
            if (superCld != null)
            {
                ord = superCld.getObjectReferenceDescriptorByName(name);
            }
        }
        return ord;
    }
832443
private static String determineMacLibrary(final String library) {
    String resourceName;
    String platform = "darwin";
    String fileExtension = "dylib";
    resourceName = "/" + platform + "/" + library + "." + fileExtension;
    return resourceName;
  }
1171652
public Method createFunction(String ns, String name)
    {
        for (int i = 0; i < this.libraries.length; i++)
        {
            if (this.libraries[i].containsFunction(ns, name))
            {
                return this.libraries[i].createFunction(ns, name);
            }
        }
        return null;
    }
104588
public <T> T get(String name){
        Map<String,Object> m = getMap(name);
        if(m!=null)
            return (T)m.get(name);
        return null;
    }
748348
@Override
    public <T> T get(String name, Class<T> type) {
        Object value = get(name);
        if (value == null) {
            value = findInherited(name, type);
            if (value == null) {
                value = UNDEFINED;
            }
            put(name, value); // cache the found value
        }
        return value != UNDEFINED ? type.cast(value) : null;
    }
547153
static private StringBuilder determineType(String name, Object o) {
        String value = null;
        if (o instanceof String || o instanceof StringBuffer || o instanceof java.nio.CharBuffer || o instanceof Integer || o instanceof Long || o instanceof Byte
            || o instanceof Double || o instanceof Float || o instanceof Short || o instanceof BigInteger || o instanceof java.math.BigDecimal) {
            value = o.toString();
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Skipping class: " + o.getClass());
            }
            return null;
        }

        // type="class" name="o"
        StringBuilder buffer = new StringBuilder(48);
        buffer.append(name);
        buffer.append("type=\"");
        // charbuffer is abstract so we might get HeapCharBuffer here, force it
        // to the generic layer in the XML output
        if (o instanceof java.nio.CharBuffer) {
            buffer.append("java.nio.CharBuffer");
        } else {
            buffer.append(o.getClass().getName());
        }
        buffer.append("\" ");
        buffer.append(name);
        buffer.append("=\"");
        buffer.append(value);
        buffer.append("\"");
        return buffer;
    }
631072
def get_library(self, library):
        
        if library in self._library_cache:
            return self._library_cache[library]

        try:
            error = None
            lib = ArcticLibraryBinding(self, library)
            lib_type = lib.get_library_type()
        except (OperationFailure, AutoReconnect) as e:
            error = e

        if error:
            raise LibraryNotFoundException("Library %s was not correctly initialized in %s.\nReason: %r)" %
                                           (library, self, error))
        elif not lib_type:
            raise LibraryNotFoundException("Library %s was not correctly initialized in %s." %
                                           (library, self))
        elif lib_type not in LIBRARY_TYPES:
            raise LibraryNotFoundException("Couldn't load LibraryType '%s' for '%s' (has the class been registered?)" %
                                           (lib_type, library))
        instance = LIBRARY_TYPES[lib_type](lib)
        self._library_cache[library] = instance
        # The library official name may be different from 'library': e.g. 'library' vs 'user.library'
        self._library_cache[lib.get_name()] = instance
        return self._library_cache[library]