Class NdNode
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.NdStruct
org.aspectj.org.eclipse.jdt.internal.core.nd.NdNode
- All Implemented Interfaces:
IDestructable
,INdStruct
- Direct Known Subclasses:
NdBinding
,NdConstant
,NdMethodAnnotationData
,NdResourceFile
,NdTypeArgument
,NdTypeInterface
,NdTypeSignature
,NdWorkspaceLocation
This is a basic polymorphic node in the network database. Pointers to NdNode or any of their
subclasses will be resolved to the correct subclass of NdNode such that the correct version of an
overloaded method will be invoked.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Invokes the destructor on this node and frees up its memoryvoid
destruct()
Dispose thisNdNode
.boolean
long
Returns the database address at which the struct begins.long
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.static int
getNodeId(int linkageID, int nodeType)
Return an value to globally identify the given node within the given linkage.short
Return a value to uniquely identify the node within the factory that is responsible for loading instances of this node from theNd
.int
hashCode()
static NdNode
Load a node from the specified address in the given database.static <T extends INdStruct>
T
-
Field Details
-
NODE_TYPE
-
type
-
-
Constructor Details
-
NdNode
-
NdNode
-
-
Method Details
-
load
Load a node from the specified address in the given database. Return null if a node cannot be loaded. -
load
-
delete
public final void delete()Invokes the destructor on this node and frees up its memory -
getNodeType
public short getNodeType()Return a value to uniquely identify the node within the factory that is responsible for loading instances of this node from theNd
. -
getAddress
public final long getAddress()Description copied from interface:INdStruct
Returns the database address at which the struct begins.- Specified by:
getAddress
in interfaceINdStruct
- Overrides:
getAddress
in classNdStruct
-
getBindingID
public final long getBindingID() -
equals
-
hashCode
public final int hashCode() -
getNodeId
public static int getNodeId(int linkageID, int nodeType)Return an value to globally identify the given node within the given linkage. This value can be used for comparison with otherNdNode
s. -
getByte
protected byte getByte(long offset)Convenience method for fetching a byte from the database.- Parameters:
offset
- Location of the byte.- Returns:
- a byte from the database.
-
getBit
protected static boolean getBit(int bitVector, int offset)Returns the bit at the specified offset in a bit vector.- Parameters:
bitVector
- Bits.offset
- The position of the desired bit.- Returns:
- the bit at the specified offset.
-
destruct
public void destruct()Dispose thisNdNode
. 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.- Specified by:
destruct
in interfaceIDestructable
-