Loads and returns the runtime context classes specified by the
ContextClassEntry array.

@return a 2 element Object array:  <br>
<pre>
index [0] is the Class[] containing the context classes.
index [1] is the String[] containing the context prefix names.
777855
public Object[] loadContextClasses(ClassLoader loader,
                                       ContextClassEntry[] contextClasses) 
    throws Exception {

        if (loader == null) {
            throw new IllegalArgumentException("ClassLoader is null");
        }

        if (contextClasses == null || contextClasses.length == 0) {
            throw new IllegalArgumentException("No Context Classes");
        }
                        
        Vector<Class<?>> classVector = 
            new Vector<Class<?>>(contextClasses.length);
        String[] prefixNames = new String[contextClasses.length];
        
        String className = null;
        for (int i = 0; i < contextClasses.length; i++) {
            className = contextClasses[i].getContextClassName();    
            Class<?> contextClass = loader.loadClass(className);
            
            classVector.addElement(contextClass);
            String prefixName = contextClasses[i].getPrefixName();
            if (prefixName != null) { 
                prefixNames[i] = prefixName + "$";
            }
            else {
                prefixNames[i] = null;
            }                                
        }
        
        Class<?>[] classes = new Class<?>[classVector.size()];
        classVector.copyInto(classes);
        
        return new Object[] {classes, prefixNames};
    }
20541
@Pure
	public static Class<?> getContextClass() throws AndroidException {
		try {
			final ClassLoader loader = ClassLoaderFinder.findClassLoader();
			return Class.forName("android.content.Context", true, loader); //$NON-NLS-1$
		} catch (Throwable e) {
			throw new AndroidException(e);
		}
	}
934925
public function get_contexts() : array {
        $contexts = [];
        foreach ($this->contextids as $contextid) {
            // It is possible that this context has been deleted and we now have subsequent calls being made with this
            // contextlist. Exceptions here will stop the further processing of this component and that is why we are
            // doing a try catch.
            try {
                $contexts[] = \context::instance_by_id($contextid);
            } catch (\Exception $e) {
                // Remove this context.
                unset($this->contextids[$this->iteratorposition]);
            }
        }

        return $contexts;
    }
255170
public ClassFile[] getInnerClasses() {
        if (mInnerClasses == null) {
            return new ClassFile[0];
        }

        return mInnerClasses.toArray(new ClassFile[mInnerClasses.size()]);
    }
636184
@Override
    public synchronized Enumeration getSubContexts() {
        Enumeration e = mySubContexts.elements();
        class Adapter implements Enumeration {
            Enumeration base;

            public Adapter(Enumeration e) {
                this.base = e;
            }

            @Override
            public boolean hasMoreElements() {
                return base.hasMoreElements();
            }

            @Override
            public Object nextElement() {
                return ((Entry) base.nextElement()).getCtx();
            }
        }
        return new Adapter(e);
    }
1329628
public Map<String, Context> getJndiContexts() {
        Map<String, Context> jndiContexts = new HashMap<>();
        jndiContexts.putAll(additionalJndiContexts);
        jndiContexts.put("default", defaultJndiContext);
        return jndiContexts;
    }
207445
@Override
    public URL[] findResources()
    {
        URL[] result = null;

        if (classesToScan != null && !classesToScan.isEmpty())
        {
            result = findResourcesByContextLoader();
        }
        // else
        // {
        // result = findResourcesByClasspath();
        // }
        return result;
    }
23881
public java.util.List<String> getContextKeyNames() {
        if (contextKeyNames == null) {
            contextKeyNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return contextKeyNames;
    }
308271
public final int[] getIndexRootsArray() {

        PersistentStore store =
            database.persistentStoreCollection.getStore(this);
        int[] roots = new int[getIndexCount()];

        for (int i = 0; i < getIndexCount(); i++) {
            CachedObject accessor = store.getAccessor(indexList[i]);

            roots[i] = accessor == null ? -1
                                        : accessor.getPos();
        }

        return roots;
    }
319939
public String[] classNames() {
      if (_domains == null || _domains.length == 0 || !isSupervised()) return null;
      return _domains[_domains.length - 1];
    }
215658
private int[] getIndexes() {
    int[] res = new int[this.indexes.size()];
    int i = 0;
    for (Integer idx : this.indexes) {
      res[i] = idx;
      i++;
    }
    return res;
  }
445401
@Override
  public ClassLoader getClassLoader() {

    return (this.bestCandidate == null)
        ? Thread.currentThread().getContextClassLoader()
        : this.bestCandidate.getClassLoader();
  }
121786
public ServletContext getCurrentServletContext() {
        final ClassLoader cl = getContextClassLoader();
        if (cl == null) {
            return null;
        }
        return servletContexts.get(cl);
    }
547894
public Class[] getLoadedClasses() {
        synchronized (classCache) {
            final Collection<Class> values = classCache.values();
            return values.toArray(new Class[values.size()]);
        }
    }
1195396
public static function getAllNames()
    {
        $className = get_called_class();

        if (!array_key_exists($className, self::$constantsArray)) {
            try {
                $class = new ReflectionClass($className);
            } catch (ReflectionException $e) {
                throw new RuntimeException($e->getMessage(), (int)$e->getCode(), $e);
            }

            self::$constantsArray[$className] = array_keys($class->getConstants());
        }

        return self::$constantsArray[$className];
    }
789713
public final Method[] getStringConverterMethods() {
        if (mStringConverters == null) {
            String name = getRuntimeStringConverter();

            Vector<Method> methods = new Vector<Method>();

            if (name != null) {
                Method[] contextMethods = getRuntimeContextMethods();
                for (int i=0; i<contextMethods.length; i++) {
                    Method m = contextMethods[i];
                    if (m.getName().equals(name) &&
                            m.getReturnType() == String.class &&
                            m.getParameterTypes().length == 1) {

                        methods.addElement(m);
                    }
                }
            }

            int customSize = methods.size();

            Method[] stringMethods = String.class.getMethods();
            for (int i=0; i<stringMethods.length; i++) {
                Method m = stringMethods[i];
                if (m.getName().equals("valueOf") &&
                        m.getReturnType() == String.class &&
                        m.getParameterTypes().length == 1 &&
                        Modifier.isStatic(m.getModifiers())) {

                    // Don't add to list if a custom converter already handles
                    // this method's parameter type.
                    Class<?> type = m.getParameterTypes()[0];
                    int j;
                    for (j=0; j<customSize; j++) {
                        Method cm = methods.elementAt(j);
                        if (cm.getParameterTypes()[0] == type) {
                            break;
                        }
                    }

                    if (j == customSize) {
                        methods.addElement(m);
                    }
                }
            }

            mStringConverters = new Method[methods.size()];
            methods.copyInto(mStringConverters);
        }

        return mStringConverters.clone();
    }
855633
public ContextItems getMarshaledContext() {
        ContextItems marshaledContext = new ContextItems();

        for (IManagedContext<?> managedContext : managedContexts) {
            marshaledContext.addItems(managedContext.getContextItems(false));
        }

        return marshaledContext;
    }