Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Member Functions | Static Public Member Functions | Package Attributes
Reference Class Reference
Inheritance diagram for Reference:
Inheritance graph
[legend]
Collaboration diagram for Reference:
Collaboration graph
[legend]

List of all members.

Classes

class  ByAddress
 Sorts in order of increasing addresses. More...

Public Member Functions

 Reference (String addr, Type type, Object[] refs) throws NumberFormatException
boolean contains (long address)
 Tests whether ref is an interior pointer into this reference.

Static Public Member Functions

static Reference findNearest (Reference[] sortedRefs, int address)

Package Attributes

int mAddress
Type mType
Object[] mReferences

Detailed Description

Definition at line 40 of file Reference.java.


Constructor & Destructor Documentation

Reference.Reference ( String  addr,
Type  type,
Object[]  refs 
) throws NumberFormatException [inline]

Definition at line 45 of file Reference.java.

                                                                                         {
        mAddress = Integer.parseInt(addr.substring(2), 16);
        mType = type;
        mReferences = refs;
    }

Here is the caller graph for this function:


Member Function Documentation

boolean Reference.contains ( long  address) [inline]

Tests whether ref is an interior pointer into this reference.

Definition at line 54 of file Reference.java.

                                          {
        return (mAddress <= address && address < (mAddress + mType.mSize));
    }
static Reference Reference.findNearest ( Reference[]  sortedRefs,
int  address 
) [inline, static]

Definition at line 68 of file Reference.java.

                                                                             {
              int length = sortedRefs.length;
              int minIndex = 0, maxIndex = length - 1;
              int index = maxIndex / 2;
              while (minIndex <= maxIndex) {
                     Reference ref = sortedRefs[index];
                     if (address < ref.mAddress) {
                            maxIndex = (index - 1);
                            index = (minIndex + maxIndex) / 2;
                     } else {
                            if (address < (ref.mAddress + ref.mType.mSize)) {
                                   return ref;
                            }
                            minIndex = (index + 1);
                            index = (minIndex + maxIndex) / 2;
                     }
              }
              return null;
    }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 41 of file Reference.java.

Definition at line 43 of file Reference.java.

Type Reference.mType [package]

Definition at line 42 of file Reference.java.


The documentation for this class was generated from the following file: