Class FieldOneToOne<T extends INdStruct>
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.field.FieldOneToOne<T>
- All Implemented Interfaces:
IDestructableField,IField,IRefCountedField
public class FieldOneToOne<T extends INdStruct>
extends Object
implements IDestructableField, IRefCountedField
Represents a 1-to-0..1 relationship in a Nd database.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends INdStruct, B extends INdStruct>
FieldOneToOne<T>create(StructDef<B> builder, StructDef<T> nodeType, FieldOneToOne<B> forwardPointer)static <T extends INdStruct, B extends INdStruct>
FieldOneToOne<T>createOwner(StructDef<B> builder, StructDef<T> nodeType, FieldOneToOne<B> forwardPointer)voidReturns the name of the field.intReturns the field offset, in bytes from the start of the struct.intReturns the size of the field, in bytes.booleanhasReferences(Nd nd, long address)Returns true if this field knows of any remaining incoming references to this object.voidprotected voidsetFieldName(String fieldName)voidsetOffset(int offset)Sets the field offset (bytes from the start of the struct).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aspectj.org.eclipse.jdt.internal.core.nd.field.IField
getAlignment
-
Field Details
-
nodeType
-
offset
protected int offset
-
-
Method Details
-
create
public static <T extends INdStruct, B extends INdStruct> FieldOneToOne<T> create(StructDef<B> builder, StructDef<T> nodeType, FieldOneToOne<B> forwardPointer) -
createOwner
public static <T extends INdStruct, B extends INdStruct> FieldOneToOne<T> createOwner(StructDef<B> builder, StructDef<T> nodeType, FieldOneToOne<B> forwardPointer) -
get
-
put
-
destruct
- Specified by:
destructin interfaceIDestructableField
-
getRecordSize
public int getRecordSize()Description copied from interface:IFieldReturns the size of the field, in bytes.- Specified by:
getRecordSizein interfaceIField
-
hasReferences
Description copied from interface:IRefCountedFieldReturns true if this field knows of any remaining incoming references to this object. This is used by the implementation ofFieldManyToOneto 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.
- Specified by:
hasReferencesin interfaceIRefCountedField
-
setFieldName
-
setOffset
public final void setOffset(int offset)Description copied from interface:IFieldSets the field offset (bytes from the start of the struct). This is invoked some time after field construction, after the sizes of all preceeding fields are known. -
getOffset
public final int getOffset()Description copied from interface:IFieldReturns the field offset, in bytes from the start of the struct. -
getFieldName
Description copied from interface:IFieldReturns the name of the field. This is mainly used for error messages, debug output, and diagnostic tools. Meant to be programmer-readable but not user-readable.- Specified by:
getFieldNamein interfaceIField
-