From 64089cc9f030d8ef7972adb5d117e0b23f47d62b Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 18 May 2006 17:29:21 +0000 Subject: Imported GNU Classpath 0.90 * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale. * sources.am: Regenerated. * gcj/javaprims.h: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * gnu/java/lang/VMInstrumentationImpl.java: New override. * gnu/java/net/local/LocalSocketImpl.java: Likewise. * gnu/classpath/jdwp/VMMethod.java: Likewise. * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest interface. * java/lang/Thread.java: Add UncaughtExceptionHandler. * java/lang/reflect/Method.java: Implements GenericDeclaration and isSynthetic(), * java/lang/reflect/Field.java: Likewise. * java/lang/reflect/Constructor.java * java/lang/Class.java: Implements Type, GenericDeclaration, getSimpleName() and getEnclosing*() methods. * java/lang/Class.h: Add new public methods. * java/lang/Math.java: Add signum(), ulp() and log10(). * java/lang/natMath.cc (log10): New function. * java/security/VMSecureRandom.java: New override. * java/util/logging/Logger.java: Updated to latest classpath version. * java/util/logging/LogManager.java: New override. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113887 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../java/rmi/activation/ActivationGroupID.java | 96 +++++++++++++++++----- 1 file changed, 74 insertions(+), 22 deletions(-) (limited to 'libjava/classpath/java/rmi/activation/ActivationGroupID.java') diff --git a/libjava/classpath/java/rmi/activation/ActivationGroupID.java b/libjava/classpath/java/rmi/activation/ActivationGroupID.java index 5e0b96442e8..e54b2a05d8d 100644 --- a/libjava/classpath/java/rmi/activation/ActivationGroupID.java +++ b/libjava/classpath/java/rmi/activation/ActivationGroupID.java @@ -1,5 +1,5 @@ /* ActivationGroupID.java -- - Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (c) 1996, 1997, 1998, 1999, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,36 +35,88 @@ this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.rmi.activation; import java.io.Serializable; +import java.rmi.server.UID; -public class ActivationGroupID implements Serializable +/** + * This identifier identifies the activation group inside the scope of its + * activation system. It also contains (and can provide) the reference to the + * groups activation system. + * + * @see ActivationSystem#registerGroup(ActivationGroupDesc) + */ +public class ActivationGroupID + implements Serializable { - static final long serialVersionUID = -1648432278909740833L; + /** + * Use SVUID for interoperability. + */ + static final long serialVersionUID = - 1648432278909740833L; -private ActivationSystem system; + /** + * The associated activation system. + */ + final ActivationSystem system; + + /** + * The object identifier, making the ID unique. + */ + final UID uid; -public ActivationGroupID(ActivationSystem system) { - this.system = system; -} + /** + * Create the new activation group id in the scope of the given activation + * system + * + * @param aSystem the activation system + */ + public ActivationGroupID(ActivationSystem aSystem) + { + system = aSystem; + uid = new UID(); + } -public ActivationSystem getSystem() { - return (system); -} + /** + * Get the associated activation system + * + * @return the associated activation system + */ + public ActivationSystem getSystem() + { + return system; + } -public int hashCode() { - return (system.hashCode()); -} + /** + * Get the hash code of the associated activation system. + */ + public int hashCode() + { + return uid.hashCode(); + } -public boolean equals(Object obj) { - if (obj instanceof ActivationGroupID) { - ActivationGroupID that = (ActivationGroupID)obj; - if (this.system.equals(that.system)) { - return (true); - } - } - return (false); -} + /** + * Copmare for equality, returns true if the passed object is also the + * activation group id and its activation system is the same. + */ + public boolean equals(Object obj) + { + if (obj instanceof ActivationGroupID) + { + ActivationGroupID that = (ActivationGroupID) obj; + return uid.equals(that.uid); + } + else + return false; + } + + /** + * Get the string representation + */ + public String toString() + { + return uid.toString(); + } } -- cgit v1.2.3