diff options
Diffstat (limited to 'libjava/gnu/java/net/loader')
-rw-r--r-- | libjava/gnu/java/net/loader/FileResource.h | 49 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/FileURLLoader.h | 52 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/JarURLLoader.h | 60 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/JarURLResource.h | 60 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/Load_gcjlib$SoResource.h | 50 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/Load_gcjlib.h | 58 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/Load_gcjlib.java | 77 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/RemoteResource.h | 52 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/RemoteURLLoader.h | 50 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/Resource.h | 62 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/URLLoader.h | 63 | ||||
-rw-r--r-- | libjava/gnu/java/net/loader/URLStreamHandlerCache.h | 48 |
12 files changed, 681 insertions, 0 deletions
diff --git a/libjava/gnu/java/net/loader/FileResource.h b/libjava/gnu/java/net/loader/FileResource.h new file mode 100644 index 000000000..37f1d12ca --- /dev/null +++ b/libjava/gnu/java/net/loader/FileResource.h @@ -0,0 +1,49 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_FileResource__ +#define __gnu_java_net_loader_FileResource__ + +#pragma interface + +#include <gnu/java/net/loader/Resource.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class FileResource; + class FileURLLoader; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + } +} + +class gnu::java::net::loader::FileResource : public ::gnu::java::net::loader::Resource +{ + +public: + FileResource(::gnu::java::net::loader::FileURLLoader *, ::java::io::File *); + ::java::io::InputStream * getInputStream(); + jint getLength(); + ::java::net::URL * getURL(); +public: // actually package-private + ::java::io::File * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::Resource)))) file; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_FileResource__ diff --git a/libjava/gnu/java/net/loader/FileURLLoader.h b/libjava/gnu/java/net/loader/FileURLLoader.h new file mode 100644 index 000000000..4592f7f9a --- /dev/null +++ b/libjava/gnu/java/net/loader/FileURLLoader.h @@ -0,0 +1,52 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_FileURLLoader__ +#define __gnu_java_net_loader_FileURLLoader__ + +#pragma interface + +#include <gnu/java/net/loader/URLLoader.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class FileURLLoader; + class Resource; + class URLStreamHandlerCache; + } + } + } + } + namespace java + { + namespace net + { + class URL; + class URLClassLoader; + class URLStreamHandlerFactory; + } + } +} + +class gnu::java::net::loader::FileURLLoader : public ::gnu::java::net::loader::URLLoader +{ + +public: + FileURLLoader(::java::net::URLClassLoader *, ::gnu::java::net::loader::URLStreamHandlerCache *, ::java::net::URLStreamHandlerFactory *, ::java::net::URL *, ::java::net::URL *); + ::gnu::java::net::loader::Resource * getResource(::java::lang::String *); +private: + ::java::io::File * walkPathComponents(::java::lang::String *); +public: // actually package-private + ::java::io::File * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::URLLoader)))) dir; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_FileURLLoader__ diff --git a/libjava/gnu/java/net/loader/JarURLLoader.h b/libjava/gnu/java/net/loader/JarURLLoader.h new file mode 100644 index 000000000..68114ab36 --- /dev/null +++ b/libjava/gnu/java/net/loader/JarURLLoader.h @@ -0,0 +1,60 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_JarURLLoader__ +#define __gnu_java_net_loader_JarURLLoader__ + +#pragma interface + +#include <gnu/java/net/loader/URLLoader.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class JarURLLoader; + class Resource; + class URLStreamHandlerCache; + } + } + } + } + namespace java + { + namespace net + { + class URL; + class URLClassLoader; + class URLStreamHandlerFactory; + } + } +} + +class gnu::java::net::loader::JarURLLoader : public ::gnu::java::net::loader::URLLoader +{ + + JarURLLoader(::java::net::URLClassLoader *, ::gnu::java::net::loader::URLStreamHandlerCache *, ::java::net::URLStreamHandlerFactory *, ::java::net::URL *, ::java::net::URL *, ::java::util::Set *); +public: + JarURLLoader(::java::net::URLClassLoader *, ::gnu::java::net::loader::URLStreamHandlerCache *, ::java::net::URLStreamHandlerFactory *, ::java::net::URL *, ::java::net::URL *); +private: + void initialize(); +public: + ::gnu::java::net::loader::Resource * getResource(::java::lang::String *); + ::java::util::jar::Manifest * getManifest(); + ::java::util::ArrayList * getClassPath(); +public: // actually package-private + jboolean __attribute__((aligned(__alignof__( ::gnu::java::net::loader::URLLoader)))) initialized; + ::java::util::jar::JarFile * jarfile; + ::java::net::URL * baseJarURL; + ::java::util::ArrayList * classPath; + ::java::util::Set * indexSet; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_JarURLLoader__ diff --git a/libjava/gnu/java/net/loader/JarURLResource.h b/libjava/gnu/java/net/loader/JarURLResource.h new file mode 100644 index 000000000..e9fe6a638 --- /dev/null +++ b/libjava/gnu/java/net/loader/JarURLResource.h @@ -0,0 +1,60 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_JarURLResource__ +#define __gnu_java_net_loader_JarURLResource__ + +#pragma interface + +#include <gnu/java/net/loader/Resource.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class JarURLLoader; + class JarURLResource; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + namespace security + { + namespace cert + { + class Certificate; + } + } + } +} + +class gnu::java::net::loader::JarURLResource : public ::gnu::java::net::loader::Resource +{ + +public: + JarURLResource(::gnu::java::net::loader::JarURLLoader *, ::java::lang::String *, ::java::util::jar::JarEntry *); + ::java::io::InputStream * getInputStream(); + jint getLength(); + JArray< ::java::security::cert::Certificate * > * getCertificates(); + ::java::net::URL * getURL(); +private: + ::java::util::jar::JarEntry * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::Resource)))) entry; + ::java::lang::String * name; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_JarURLResource__ diff --git a/libjava/gnu/java/net/loader/Load_gcjlib$SoResource.h b/libjava/gnu/java/net/loader/Load_gcjlib$SoResource.h new file mode 100644 index 000000000..da8a2aca1 --- /dev/null +++ b/libjava/gnu/java/net/loader/Load_gcjlib$SoResource.h @@ -0,0 +1,50 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_Load_gcjlib$SoResource__ +#define __gnu_java_net_loader_Load_gcjlib$SoResource__ + +#pragma interface + +#include <gnu/java/net/loader/Resource.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class Load_gcjlib; + class Load_gcjlib$SoResource; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + } +} + +class gnu::java::net::loader::Load_gcjlib$SoResource : public ::gnu::java::net::loader::Resource +{ + +public: // actually package-private + Load_gcjlib$SoResource(::gnu::java::net::loader::Load_gcjlib *, ::java::net::URL *); +public: + ::java::io::InputStream * getInputStream(); + jint getLength(); + ::java::net::URL * getURL(); +private: + ::java::net::URL * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::Resource)))) url; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_Load_gcjlib$SoResource__ diff --git a/libjava/gnu/java/net/loader/Load_gcjlib.h b/libjava/gnu/java/net/loader/Load_gcjlib.h new file mode 100644 index 000000000..69d2ef5ac --- /dev/null +++ b/libjava/gnu/java/net/loader/Load_gcjlib.h @@ -0,0 +1,58 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_Load_gcjlib__ +#define __gnu_java_net_loader_Load_gcjlib__ + +#pragma interface + +#include <gnu/java/net/loader/URLLoader.h> +extern "Java" +{ + namespace gnu + { + namespace gcj + { + namespace runtime + { + class SharedLibHelper; + } + } + namespace java + { + namespace net + { + namespace loader + { + class Load_gcjlib; + class Resource; + class URLStreamHandlerCache; + } + } + } + } + namespace java + { + namespace net + { + class URL; + class URLClassLoader; + class URLStreamHandlerFactory; + } + } +} + +class gnu::java::net::loader::Load_gcjlib : public ::gnu::java::net::loader::URLLoader +{ + +public: + Load_gcjlib(::java::net::URLClassLoader *, ::gnu::java::net::loader::URLStreamHandlerCache *, ::java::net::URLStreamHandlerFactory *, ::java::net::URL *, ::java::net::URL *); + ::java::lang::Class * getClass(::java::lang::String *); + ::gnu::java::net::loader::Resource * getResource(::java::lang::String *); +private: + ::gnu::gcj::runtime::SharedLibHelper * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::URLLoader)))) helper; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_Load_gcjlib__ diff --git a/libjava/gnu/java/net/loader/Load_gcjlib.java b/libjava/gnu/java/net/loader/Load_gcjlib.java new file mode 100644 index 000000000..ea392041f --- /dev/null +++ b/libjava/gnu/java/net/loader/Load_gcjlib.java @@ -0,0 +1,77 @@ +/* Copyright (C) 2007 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +package gnu.java.net.loader; + +import gnu.gcj.runtime.SharedLibHelper; +import java.io.InputStream; +import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; +import java.net.URLConnection; +import java.net.URLStreamHandlerFactory; + +/** + * A <code>Load_gcjlib</code> is a type of <code>URLLoader</code> + * that loads classes and resources from a shared library. + */ +public final class Load_gcjlib extends URLLoader +{ + private SharedLibHelper helper; + + public Load_gcjlib(URLClassLoader classloader, + URLStreamHandlerCache cache, + URLStreamHandlerFactory factory, + URL url, URL absoluteUrl) + { + super(classloader, cache, factory, url, absoluteUrl); + helper = SharedLibHelper.findHelper(classloader, url.getFile(), + noCertCodeSource, true); + } + + public Class getClass(String className) + { + return helper.findClass(className); + } + + public Resource getResource(String name) + { + URL url = helper.findResource(name); + if (url == null) + return null; + return new SoResource(this, url); + } + + final static class SoResource extends Resource + { + private final URL url; + + SoResource(Load_gcjlib loader, URL url) + { + super(loader); + this.url = url; + } + + public InputStream getInputStream() throws IOException + { + URLConnection conn = url.openConnection(); + return conn.getInputStream(); + } + + public int getLength() + { + // FIXME we could find this by asking the core object. + return -1; + } + + public URL getURL () + { + return url; + } + } +} diff --git a/libjava/gnu/java/net/loader/RemoteResource.h b/libjava/gnu/java/net/loader/RemoteResource.h new file mode 100644 index 000000000..29ccf16a6 --- /dev/null +++ b/libjava/gnu/java/net/loader/RemoteResource.h @@ -0,0 +1,52 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_RemoteResource__ +#define __gnu_java_net_loader_RemoteResource__ + +#pragma interface + +#include <gnu/java/net/loader/Resource.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class RemoteResource; + class RemoteURLLoader; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + } +} + +class gnu::java::net::loader::RemoteResource : public ::gnu::java::net::loader::Resource +{ + +public: + RemoteResource(::gnu::java::net::loader::RemoteURLLoader *, ::java::lang::String *, ::java::net::URL *, ::java::io::InputStream *, jint); + ::java::io::InputStream * getInputStream(); + jint getLength(); + ::java::net::URL * getURL(); +private: + ::java::net::URL * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::Resource)))) url; + ::java::io::InputStream * stream; +public: // actually package-private + jint length; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_RemoteResource__ diff --git a/libjava/gnu/java/net/loader/RemoteURLLoader.h b/libjava/gnu/java/net/loader/RemoteURLLoader.h new file mode 100644 index 000000000..2c051651b --- /dev/null +++ b/libjava/gnu/java/net/loader/RemoteURLLoader.h @@ -0,0 +1,50 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_RemoteURLLoader__ +#define __gnu_java_net_loader_RemoteURLLoader__ + +#pragma interface + +#include <gnu/java/net/loader/URLLoader.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class RemoteURLLoader; + class Resource; + class URLStreamHandlerCache; + } + } + } + } + namespace java + { + namespace net + { + class URL; + class URLClassLoader; + class URLStreamHandlerFactory; + } + } +} + +class gnu::java::net::loader::RemoteURLLoader : public ::gnu::java::net::loader::URLLoader +{ + +public: + RemoteURLLoader(::java::net::URLClassLoader *, ::gnu::java::net::loader::URLStreamHandlerCache *, ::java::net::URLStreamHandlerFactory *, ::java::net::URL *); + ::gnu::java::net::loader::Resource * getResource(::java::lang::String *); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::URLLoader)))) protocol; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_RemoteURLLoader__ diff --git a/libjava/gnu/java/net/loader/Resource.h b/libjava/gnu/java/net/loader/Resource.h new file mode 100644 index 000000000..98b626f4a --- /dev/null +++ b/libjava/gnu/java/net/loader/Resource.h @@ -0,0 +1,62 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_Resource__ +#define __gnu_java_net_loader_Resource__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class Resource; + class URLLoader; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + namespace security + { + class CodeSource; + namespace cert + { + class Certificate; + } + } + } +} + +class gnu::java::net::loader::Resource : public ::java::lang::Object +{ + +public: + Resource(::gnu::java::net::loader::URLLoader *); + virtual ::java::security::CodeSource * getCodeSource(); + virtual JArray< ::java::security::cert::Certificate * > * getCertificates(); + virtual ::gnu::java::net::loader::URLLoader * getLoader(); + virtual ::java::net::URL * getURL() = 0; + virtual jint getLength() = 0; + virtual ::java::io::InputStream * getInputStream() = 0; +public: // actually package-private + ::gnu::java::net::loader::URLLoader * __attribute__((aligned(__alignof__( ::java::lang::Object)))) loader; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_Resource__ diff --git a/libjava/gnu/java/net/loader/URLLoader.h b/libjava/gnu/java/net/loader/URLLoader.h new file mode 100644 index 000000000..76c294b1f --- /dev/null +++ b/libjava/gnu/java/net/loader/URLLoader.h @@ -0,0 +1,63 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_URLLoader__ +#define __gnu_java_net_loader_URLLoader__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class Resource; + class URLLoader; + class URLStreamHandlerCache; + } + } + } + } + namespace java + { + namespace net + { + class URL; + class URLClassLoader; + class URLStreamHandlerFactory; + } + namespace security + { + class CodeSource; + } + } +} + +class gnu::java::net::loader::URLLoader : public ::java::lang::Object +{ + +public: + URLLoader(::java::net::URLClassLoader *, ::gnu::java::net::loader::URLStreamHandlerCache *, ::java::net::URLStreamHandlerFactory *, ::java::net::URL *); + URLLoader(::java::net::URLClassLoader *, ::gnu::java::net::loader::URLStreamHandlerCache *, ::java::net::URLStreamHandlerFactory *, ::java::net::URL *, ::java::net::URL *); + virtual ::java::net::URL * getBaseURL(); + virtual ::java::lang::Class * getClass(::java::lang::String *); + virtual ::gnu::java::net::loader::Resource * getResource(::java::lang::String *) = 0; + virtual ::java::util::jar::Manifest * getManifest(); + virtual ::java::util::ArrayList * getClassPath(); +public: // actually package-private + ::java::net::URLClassLoader * __attribute__((aligned(__alignof__( ::java::lang::Object)))) classloader; + ::java::net::URL * baseURL; + ::java::net::URLStreamHandlerFactory * factory; + ::gnu::java::net::loader::URLStreamHandlerCache * cache; + ::java::security::CodeSource * noCertCodeSource; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_URLLoader__ diff --git a/libjava/gnu/java/net/loader/URLStreamHandlerCache.h b/libjava/gnu/java/net/loader/URLStreamHandlerCache.h new file mode 100644 index 000000000..a41d1d982 --- /dev/null +++ b/libjava/gnu/java/net/loader/URLStreamHandlerCache.h @@ -0,0 +1,48 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_URLStreamHandlerCache__ +#define __gnu_java_net_loader_URLStreamHandlerCache__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class URLStreamHandlerCache; + } + } + } + } + namespace java + { + namespace net + { + class URLStreamHandler; + class URLStreamHandlerFactory; + } + } +} + +class gnu::java::net::loader::URLStreamHandlerCache : public ::java::lang::Object +{ + +public: + URLStreamHandlerCache(); + virtual void add(::java::net::URLStreamHandlerFactory *); + virtual ::java::net::URLStreamHandler * get(::java::net::URLStreamHandlerFactory *, ::java::lang::String *); +private: + ::java::util::HashMap * __attribute__((aligned(__alignof__( ::java::lang::Object)))) factoryCache; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_URLStreamHandlerCache__ |