public abstract class NdNode extends java.lang.Object implements IDestructable
| Modifier and Type | Field and Description |
|---|---|
long |
address |
static FieldShort |
NODE_TYPE |
static StructDef<NdNode> |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
NdNode(Nd nd) |
protected |
NdNode(Nd nd,
long address) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(INdVisitor visitor) |
static long |
addressOf(NdNode nullable) |
void |
delete()
Invokes the destructor on this node and frees up its memory
|
void |
destruct()
Dispose this
NdNode. |
boolean |
equals(java.lang.Object obj) |
long |
getAddress() |
long |
getBindingID() |
protected static boolean |
getBit(int bitVector,
int offset)
Returns the bit at the specified offset in a bit vector.
|
protected byte |
getByte(long offset)
Convenience method for fetching a byte from the database.
|
protected Database |
getDB() |
Nd |
getNd() |
static int |
getNodeId(int linkageID,
int nodeType)
Return an value to globally identify the given node within the given linkage.
|
short |
getNodeType()
Return a value to uniquely identify the node within the factory that is responsible for loading
instances of this node from the
Nd. |
int |
hashCode() |
static NdNode |
load(Nd nd,
long address)
Load a node from the specified address in the given database.
|
static <T extends NdNode> |
load(Nd nd,
long address,
java.lang.Class<T> clazz) |
public static final FieldShort NODE_TYPE
public final long address
public static long addressOf(NdNode nullable)
public static NdNode load(Nd nd, long address)
public final void delete()
protected Database getDB()
public Nd getNd()
public short getNodeType()
Nd.
public final long getAddress()
public final long getBindingID()
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic void accept(INdVisitor visitor)
public static int getNodeId(int linkageID,
int nodeType)
NdNodes.protected byte getByte(long offset)
offset - Location of the byte.protected static boolean getBit(int bitVector,
int offset)
bitVector - Bits.offset - The position of the desired bit.public void destruct()
NdNode. Subclasses should extend this method to perform any high-level node-specific cleanup.
This will be invoked prior to disposing the fields. Implementations must invoke their parent's destruct method
and should not destruct the fields.
If an external object wants to destroy a node, they should invoke delete() rather than this
method.
destruct in interface IDestructable