aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/ClassLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/ClassLoader.java')
-rw-r--r--libjava/java/lang/ClassLoader.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/libjava/java/lang/ClassLoader.java b/libjava/java/lang/ClassLoader.java
index 4682dbb..e0463ac 100644
--- a/libjava/java/lang/ClassLoader.java
+++ b/libjava/java/lang/ClassLoader.java
@@ -1,5 +1,5 @@
/* ClassLoader.java -- responsible for loading classes into the VM
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,6 +45,7 @@ import gnu.java.util.EmptyEnumeration;
import java.io.IOException;
import java.io.InputStream;
+import java.lang.ref.WeakReference;
import java.net.URL;
import java.nio.ByteBuffer;
import java.security.CodeSource;
@@ -130,6 +131,15 @@ public abstract class ClassLoader
final HashMap loadedClasses = new HashMap();
/**
+ * Loading constraints registered with this classloader. This maps
+ * a class name to a weak reference to a class. When the reference
+ * is non-null, it means that a reference to the name must resolve
+ * to the indicated class.
+ */
+ final HashMap<String, WeakReference<Class>> loadingConstraints
+ = new HashMap<String, WeakReference<Class>>();
+
+ /**
* All packages defined by this classloader. It is not private in order to
* allow native code (and trusted subclasses) access to this field.
*/