All Packages  This Package  Class Hierarchy  Class Search  Index

Class utah.npm.core.Reference
java.lang.Object
   |
   +----utah.npm.core.Lockable
           |
           +----utah.npm.core.NPMObject
                   |
                   +----utah.npm.core.Reference

  Summary

public final class  Reference
     extends utah.npm.core.NPMObject
{
          // Fields 2
     public static final Reference NullReference;
     Link link_;

          // Constructors 4
     public Reference();
     public Reference(int);
     public Reference(Refable);
     public Reference(Refable, int);

          // Methods 13
     static String typeName();

     public boolean check();
     public boolean compare(Reference);
     public void destroy();
     public boolean equals(Object);
     public void nullify();
     void s_associate(Link);
     void s_associate(Refable);
     Link s_getLink();
     private void s_init(Refable, int);
     int s_type();
     public String toString();
     public Class type();
}

A Reference object is a cross-process capability to any Reference-able NPMObject.

Version:
NPMJava 0.5.0 April, 1998
Author:
Patrick Tullmann tullmann@cs.utah.edu

See Also: Refable


  Cross Reference

Returned By:
Refable.reference()





  Fields

· NullReference

Summary  |  Top
   public static final Reference NullReference


· link_

Summary  |  Top
   Link link_

link_ points to the Refable, indirectly. The link_ is always vaild (a Link is allocated by the constructor.) Though, the Link may point to the null object.


  Constructors

· Reference

Summary  |  Top

   public Reference() 

Construct a null reference. It can be defined to Reference a specific object by using the reference method of the target object.

See Also: Refable.reference



· Reference

Summary  |  Top
   public Reference(Refable refObj) 

Construct a new reference that will refer to the provided object.

Parameter Description
refObj the object the reference will refer to



· Reference

Summary  |  Top
   public Reference(int hashCode) 

Construct a null reference with the given hash code.

Parameter Description
hashCode the hash code for this reference

See Also: Refable.reference



· Reference

Summary  |  Top
   public Reference(Refable refObj, 
                    int hashCode) 

Construct a reference to the provided object with the provided hash code.

Parameter Description
refObj the object to create a reference to
hashCode the hashCode of the reference object (not the refObj)



  Methods

· s_init

Summary  |  Top
   private void s_init(Refable refObj, 
                       int hashCode) 

Private initialization that happens after the constructor is called.



· type

Summary  |  Top
   public Class type() 

Return Class of object this object points to.

Returns:
Class object for object this reference points to, or null if this reference is null.


· destroy

Summary  |  Top
   public void destroy() 

Destroy this reference object.

Overrides:
destroy in class NPMObject


· compare

Summary  |  Top
   public boolean compare(Reference otherRef) 

Returns true if this and given ref point to the same object. If both refs are null, returns true. If one ref is null, returns false.

Parameter Description
otherRef the reference to compare this reference to

Returns:
true if this and otherRef point to the same object, false otherwise.


· nullify

Summary  |  Top
   public void nullify() 

Nullify a reference, clearing its link to whatever its touching. After this opertion, this.compare(Reference.NullReference) will return true.



· equals

Summary  |  Top
   public boolean equals(Object obj) 

Equality is determined by the objects a Reference points to. If two References refer to the exact same object they are "equal."

Parameter Description
obj the Object to compare to.

Returns:
true if obj is a Reference object that points to the same object as this.
Overrides:
equals in class Object

See Also: compare



· check

Summary  |  Top
   public boolean check() 

Return true if this reference is valid.

Returns:
true if this reference is valid (non-null).


· toString

Summary  |  Top
   public String toString() 

Return a string representation of this Reference (includes the type and hashCode of the target object.

Returns:
a string representation of this Reference
Overrides:
toString in class NPMObject


· s_associate

Summary  |  Top
   void s_associate(Refable obj) 

Associate the given object with the under-lying Link in this Reference.

Parameter Description
obj the object to associate this Reference with.

See Also: Link



· s_associate

Summary  |  Top
   void s_associate(Link newLink) 

Associate this reference with object pointed to by the given Link.

Parameter Description
newLink a link to the object to associate this reference with

See Also: Link



· s_getLink

Summary  |  Top
   Link s_getLink() 

Get the under-lying Link object this Reference is using.

Returns:
the link object this Reference is using.


· typeName

Summary  |  Top
   static String typeName() 

Return the type of this object as a string, "Reference".

Returns:
the string "Reference"
Overrides:
typeName in class NPMObject


· s_type

Summary  |  Top
   int s_type() 

Return the type of this object, NPMObject.ReferenceType

Returns:
NPMObject.ReferenceType
Overrides:
s_type in class NPMObject

See Also: NPMObject.ReferenceType



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7