/[classpath]/classpath/gnu/classpath/jdwp/id/JdwpId.java
ViewVC logotype

Diff of /classpath/gnu/classpath/jdwp/id/JdwpId.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.1 by gnu_andrew, Tue Aug 2 20:12:08 2005 UTC revision 1.2.2.2 by gnu_andrew, Sat Sep 10 15:31:36 2005 UTC
# Line 41  package gnu.classpath.jdwp.id; Line 41  package gnu.classpath.jdwp.id;
41    
42  import java.io.DataOutputStream;  import java.io.DataOutputStream;
43  import java.io.IOException;  import java.io.IOException;
44    import java.lang.ref.SoftReference;
45    
46  /**  /**
47   * A baseclass for all object types reported to the debugger   * A baseclass for all object types reported to the debugger
# Line 62  public abstract class JdwpId Line 63  public abstract class JdwpId
63    private byte _tag;    private byte _tag;
64    
65    /**    /**
66       * The object/class represented by this Id
67       */
68      protected SoftReference _reference;
69    
70      /**
71     * Constructs an empty <code>JdwpId</code>     * Constructs an empty <code>JdwpId</code>
72     */     */
73    public JdwpId (byte tag)    public JdwpId (byte tag)
# Line 72  public abstract class JdwpId Line 78  public abstract class JdwpId
78    /**    /**
79     * Sets the id for this object reference     * Sets the id for this object reference
80     */     */
81    void setId (long id)    public void setId (long id)
82    {    {
83      _id = id;      _id = id;
84    }    }
# Line 86  public abstract class JdwpId Line 92  public abstract class JdwpId
92    }    }
93    
94    /**    /**
95       * Gets the object/class reference for this ID
96       *
97       * @returns a refernce to the object or class
98       */
99      public SoftReference getReference ()
100      {
101        return _reference;
102      }
103    
104      /**
105       * Sets the object/class reference for this ID
106       *
107       * @param ref a refernce to the object or class
108       */
109      public void setReference (SoftReference ref)
110      {
111        _reference = ref;
112      }
113    
114      /**
115     * Compares two object ids for equality. Two object ids     * Compares two object ids for equality. Two object ids
116     * are equal if they point to the same type and contain to     * are equal if they point to the same type and contain to
117     * the same id number. (NOTE: This is a much stricter check     * the same id number.
    * than is necessary: all <code>JdwpId</code>s have unique  
    * ids.)  
118     */     */
119    public boolean equals (JdwpId id)    public boolean equals (JdwpId id)
120    {    {
121      return ((id.getClass () == getClass ()) && (id.getId () == getId ()));      return (id.getId () == getId ());
122    }    }
123    
124    /**    /**

Legend:
Removed from v.1.2.2.1  
changed lines
  Added in v.1.2.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26