Returns the first ScopeListExtension found in the given collection of extensions,
or null if the extension collection does not contain a ScopeListExtension.
321638
public static ScopeListExtension findFirst(Collection<? extends Extension> extensions)
    {
        for (Extension extension : extensions)
        {
            if (SCOPE_LIST_EXTENSION_ID == extension.getId())
                return (ScopeListExtension)extension;
        }
        return null;
    }
1361880
public static Map<String,String> getExtensions() {
		 StackInfo result = MDC.get();
		 if (result == null) {
			 return StackInfo.collectExtensions();
		 } else {
			 return result.extensions;
		 }
	 }
806014
@Override
    public List getPatternList() {
        ExtensionFactory delegate = this.delegate;
        if (delegate != null)
            return delegate.getPatternList();
        return Collections.emptyList();
    }
930704
public static ProductExtensionInfo getProductExtension(String extensionName) throws IOException {
        ProductExtensionInfo productExtensionInfo = null;

        List<ProductExtensionInfo> productExtensionList = getProductExtensions(Utils.getInstallDir());

        for (ProductExtensionInfo currentProductExtension : productExtensionList) {
            if (currentProductExtension.getName().equalsIgnoreCase(extensionName)) {
                productExtensionInfo = currentProductExtension;
                break;
            }
        }

        return productExtensionInfo;
    }
736093
@SuppressWarnings("unchecked")
	public static <T extends ExtensionPoint<?>> T getExtensionPoint(Class<T> clazz) {
		synchronized (points) {
			for (ExtensionPoint<?> ep : points)
				if (clazz.isAssignableFrom(ep.getClass()))
					return (T)ep;
		}
		return null;
	}
424271
public XExtension getByName(String name) {
                for (XExtension ext : extensionList) {
                        if (ext.getName().equals(name)) {
                                return ext;
                        }
                }
                return null;
        }
362164
public static LanguageExtension findFirst(Collection<? extends Extension> extensions)
    {
        for (Extension extension : extensions)
        {
            if (LANGUAGE_EXTENSION_ID == extension.getId())
                return (LanguageExtension)extension;
        }
        return null;
    }
911650
public Extension getExtension(String name) {
        if (name != null) {
            for (int i = 0; i < extensionList.size(); i++) {
                Extension p = getExtension(i);
                if (p.getName().equalsIgnoreCase(name)) {
                    return p;
                }
            }
        }
        
        return null;
    }
818023
@Nullable
  @ReturnsMutableCopy
  public ICommonsList <MimeTypeInfo> getAllInfosOfExtension (@Nullable final String sExtension)
  {
    // Extension may be empty!
    if (sExtension == null)
      return null;

    return m_aRWLock.readLocked ( () -> {
      ICommonsList <MimeTypeInfo> ret = m_aMapExt.get (sExtension);
      if (ret == null)
      {
        // Especially on Windows, sometimes file extensions like "JPG" can be
        // found. Therefore also test for the lowercase version of the
        // extension.
        ret = m_aMapExt.get (sExtension.toLowerCase (Locale.US));
      }
      // Create a copy if present
      return ret == null ? null : ret.getClone ();
    });
  }
701842
public <T> T getLocalExtension(Class<T> extensionType) {
        Object obj = extensions.get(extensionType);
        if (null != obj) {
            return extensionType.cast(obj);
        }
        return null;
    }
1340052
public java.util.List<ExtensionField> getExtensionFields() {
        if (extensionFields == null) {
            extensionFields = new com.amazonaws.internal.SdkInternalList<ExtensionField>();
        }
        return extensionFields;
    }
1228371
private ExtensionsElement readExtensions(Location location, String documentation) {
    int start = reader.readInt(); // Range start.
    int end = start;
    if (reader.peekChar() != ';') {
      if (!"to".equals(reader.readWord())) throw reader.unexpected("expected ';' or 'to'");
      String s = reader.readWord(); // Range end.
      if (s.equals("max")) {
        end = Util.MAX_TAG_VALUE;
      } else {
        end = Integer.parseInt(s);
      }
    }
    reader.require(';');
    return new ExtensionsElement(location, documentation, start, end);
  }
634360
public boolean isExtension(String name) throws Exception {
        return null != readResource(Address.root().add(EXTENSION, name));
    }
1233941
public function findFirstWithExtension($extension)
	{
		foreach ($this->getFlatListOfFiles() as $file)
		{
			if ($file->hasExtension($extension))
			{
				return $file;
			}
		}

		return false;
	}
668294
public Set<String> getCriticalExtensionOIDs() {
        if (extensions == null) {
            return null;
        }
        Set<String> extSet = new TreeSet<>();
        for (Extension ex : extensions.getAllExtensions()) {
            if (ex.isCritical()) {
                extSet.add(ex.getExtensionId().toString());
            }
        }
        return extSet;
    }
503229
public function getExtensions()
		{

			// Loop through extension map
			$exts = array();
			foreach (self::$extensionMap as $ext => $type) {
				if ($type == $this->type) {
					$exts[] = $ext;
				}
			}
			return $exts;

		}
1330924
public List<String> getScopes(final int scopeIndex) {
    this.checkInitialized();
    return this.scopes.getOrDefault(Integer.valueOf(scopeIndex), SemanticHighlightingRegistry.UNKNOWN_SCOPES);
  }