1. /*
  2. * @(#)NamedWeakReference.java 1.4 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.naming.internal;
  8. /**
  9. * A NamedWeakReference is a WeakReference with an immutable string name.
  10. *
  11. * @author Scott Seligman
  12. * @version 1.4 03/12/19
  13. */
  14. class NamedWeakReference extends java.lang.ref.WeakReference {
  15. private final String name;
  16. NamedWeakReference(Object referent, String name) {
  17. super(referent);
  18. this.name = name;
  19. }
  20. String getName() {
  21. return name;
  22. }
  23. }