public class FieldOneToOne<T extends INdStruct> extends java.lang.Object implements IDestructableField, IRefCountedField
| Modifier and Type | Field and Description |
|---|---|
StructDef<T> |
nodeType |
protected int |
offset |
| Modifier and Type | Method and Description |
|---|---|
static <T extends INdStruct,B extends INdStruct> |
create(StructDef<B> builder,
StructDef<T> nodeType,
FieldOneToOne<B> forwardPointer) |
static <T extends INdStruct,B extends INdStruct> |
createOwner(StructDef<B> builder,
StructDef<T> nodeType,
FieldOneToOne<B> forwardPointer) |
void |
destruct(Nd nd,
long address) |
T |
get(Nd nd,
long address) |
java.lang.String |
getFieldName()
Returns the name of the field.
|
int |
getOffset()
Returns the field offset, in bytes from the start of the struct.
|
int |
getRecordSize()
Returns the size of the field, in bytes.
|
boolean |
hasReferences(Nd nd,
long address)
Returns true if this field knows of any remaining incoming references to this object.
|
void |
put(Nd nd,
long address,
T target) |
protected void |
setFieldName(java.lang.String fieldName) |
void |
setOffset(int offset)
Sets the field offset (bytes from the start of the struct).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlignmentpublic static <T extends INdStruct,B extends INdStruct> FieldOneToOne<T> create(StructDef<B> builder, StructDef<T> nodeType, FieldOneToOne<B> forwardPointer)
public static <T extends INdStruct,B extends INdStruct> FieldOneToOne<T> createOwner(StructDef<B> builder, StructDef<T> nodeType, FieldOneToOne<B> forwardPointer)
public void destruct(Nd nd, long address)
destruct in interface IDestructableFieldpublic int getRecordSize()
IFieldgetRecordSize in interface IFieldpublic boolean hasReferences(Nd nd, long address)
IRefCountedFieldFieldManyToOne to determine whether or not
a refcounted object should be deleted after a reference is removed.
Implementations should return false if the refcount is 0 or true if the refcount is nonzero.
hasReferences in interface IRefCountedFieldprotected final void setFieldName(java.lang.String fieldName)
public final void setOffset(int offset)
IFieldpublic final int getOffset()
IFieldpublic final java.lang.String getFieldName()
IFieldgetFieldName in interface IField