GetResources() private method

private GetResources ( string name ) : IEnumerable
name string
return IEnumerable
Example #1
0
        public static global::java.util.Enumeration getResources(global::java.lang.ClassLoader classLoader, Assembly assembly, string name)
        {
#if FIRST_PASS
            return(null);
#else
            global::java.util.Vector v = new global::java.util.Vector();
            if (assembly != null)
            {
                IKVM.Internal.AssemblyClassLoader wrapper = IKVM.Internal.AssemblyClassLoader.FromAssembly(assembly);
                foreach (global::java.net.URL url in wrapper.GetResources(name))
                {
                    v.addElement(url);
                }
            }
            // we'll only generate a stub class if there isn't already a resource with this name
            if (v.isEmpty())
            {
                global::java.net.URL curl = GetClassResource(classLoader, assembly, name);
                if (curl != null)
                {
                    v.addElement(curl);
                }
            }
            return(v.elements());
#endif
        }
Example #2
0
        public static global::java.net.URL getResource(global::java.lang.ClassLoader _this, string name)
        {
#if !FIRST_PASS
            AssemblyClassLoader_ wrapper = (AssemblyClassLoader_)ClassLoaderWrapper.GetClassLoaderWrapper(_this);
            foreach (global::java.net.URL url in wrapper.GetResources(name))
            {
                return(url);
            }
#endif
            return(null);
        }
Example #3
0
        public static global::java.net.URL getResource(global::java.lang.ClassLoader classLoader, Assembly assembly, string name)
        {
#if FIRST_PASS
            return(null);
#else
            if (assembly != null)
            {
                IKVM.Internal.AssemblyClassLoader wrapper = IKVM.Internal.AssemblyClassLoader.FromAssembly(assembly);
                foreach (global::java.net.URL url in wrapper.GetResources(name))
                {
                    return(url);
                }
            }
            return(GetClassResource(classLoader, assembly, name));
#endif
        }