mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-26 22:34:27 +08:00
Proxy.java: New version from Classpath.
* java/lang/reflect/Proxy.java: New version from Classpath. * java/lang/Package.java: New version from Classpath. From-SVN: r65007
This commit is contained in:
parent
ff77a44171
commit
4544c3f387
@ -1,3 +1,8 @@
|
|||||||
|
2003-03-28 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* java/lang/reflect/Proxy.java: New version from Classpath.
|
||||||
|
* java/lang/Package.java: New version from Classpath.
|
||||||
|
|
||||||
2003-03-29 Ulrich Weigand <uweigand@de.ibm.com>
|
2003-03-29 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
* configure.in (HAVE_BACKTRACE) [s390*-*-linux*]: Define.
|
* configure.in (HAVE_BACKTRACE) [s390*-*-linux*]: Define.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Package.java -- information about a package
|
/* Package.java -- information about a package
|
||||||
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
@ -269,8 +269,7 @@ public class Package
|
|||||||
public static Package getPackage(String name)
|
public static Package getPackage(String name)
|
||||||
{
|
{
|
||||||
// Get the caller's classloader
|
// Get the caller's classloader
|
||||||
SecurityManager sm = System.getSecurityManager();
|
Class c = VMSecurityManager.getClassContext()[1];
|
||||||
Class c = sm.getClassContext()[1];
|
|
||||||
ClassLoader cl = c.getClassLoader();
|
ClassLoader cl = c.getClassLoader();
|
||||||
return cl != null ? cl.getPackage(name) : null;
|
return cl != null ? cl.getPackage(name) : null;
|
||||||
}
|
}
|
||||||
@ -284,8 +283,7 @@ public class Package
|
|||||||
public static Package[] getPackages()
|
public static Package[] getPackages()
|
||||||
{
|
{
|
||||||
// Get the caller's classloader
|
// Get the caller's classloader
|
||||||
SecurityManager sm = System.getSecurityManager();
|
Class c = VMSecurityManager.getClassContext()[1];
|
||||||
Class c = sm.getClassContext()[1];
|
|
||||||
ClassLoader cl = c.getClassLoader();
|
ClassLoader cl = c.getClassLoader();
|
||||||
// Sun's implementation returns the packages loaded by the bootstrap
|
// Sun's implementation returns the packages loaded by the bootstrap
|
||||||
// classloader if cl is null, but right now our bootstrap classloader
|
// classloader if cl is null, but right now our bootstrap classloader
|
||||||
@ -313,12 +311,7 @@ public class Package
|
|||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return "package: " + name +
|
return ("package " + name + (specTitle == null ? "" : ", " + specTitle)
|
||||||
" spec: " + specTitle +
|
+ (specVersion == null ? "" : ", version " + specVersion));
|
||||||
" version: " + specVersion +
|
|
||||||
" vendor: " + specVendor +
|
|
||||||
" implementation: " + implTitle +
|
|
||||||
" version: " + implVersion +
|
|
||||||
" vendor: " + implVendor + " sealed: " + sealed;
|
|
||||||
}
|
}
|
||||||
} // class Package
|
} // class Package
|
||||||
|
@ -185,7 +185,7 @@ public class Proxy implements Serializable
|
|||||||
* Proxy.
|
* Proxy.
|
||||||
* @serial invocation handler associated with this proxy instance
|
* @serial invocation handler associated with this proxy instance
|
||||||
*/
|
*/
|
||||||
protected final InvocationHandler h;
|
protected InvocationHandler h;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new Proxy from a subclass (usually a proxy class),
|
* Constructs a new Proxy from a subclass (usually a proxy class),
|
||||||
|
Loading…
Reference in New Issue
Block a user