public final class StructDef<T>
extends java.lang.Object
There are three mechanisms for deleting a struct from the database:
Structs deleted by refcounting and owner pointers are not intended to inherit from one another, but anything may inherit from a struct that uses manual deletion and anything may inherit from a struct that uses the same deletion mechanism.
| Modifier and Type | Class and Description |
|---|---|
static class |
StructDef.DeletionSemantics |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hasUserDestructor |
| Modifier and Type | Method and Description |
|---|---|
void |
add(IField toAdd) |
<F> Field<F> |
add(ITypeFactory<F> factory1) |
FieldByte |
addByte() |
FieldChar |
addChar() |
void |
addDestructableField(IDestructableField field) |
FieldDouble |
addDouble() |
FieldFloat |
addFloat() |
FieldInt |
addInt() |
FieldLong |
addLong() |
void |
addOwnerField(IRefCountedField result) |
FieldPointer |
addPointer() |
void |
addRefCountedField(IRefCountedField result) |
FieldShort |
addShort() |
FieldString |
addString() |
boolean |
areOffsetsComputed() |
static <T> StructDef<T> |
create(java.lang.Class<T> clazz) |
static <T> StructDef<T> |
create(java.lang.Class<T> clazz,
StructDef<? super T> superClass) |
static <T> StructDef<T> |
createAbstract(java.lang.Class<T> clazz) |
static <T> StructDef<T> |
createAbstract(java.lang.Class<T> clazz,
StructDef<? super T> superClass) |
void |
done()
Call this once all the fields have been added to the struct definition and it is
ready to use.
|
StructDef.DeletionSemantics |
getDeletionSemantics() |
ITypeFactory<T> |
getFactory() |
java.lang.Class<T> |
getStructClass() |
protected boolean |
hasDestructableFields() |
protected boolean |
isReadyForDeletion(Nd dom,
long address) |
int |
size() |
java.lang.String |
toString() |
StructDef<T> |
useStandardRefCounting() |
public java.lang.Class<T> getStructClass()
public java.lang.String toString()
toString in class java.lang.Objectpublic static <T> StructDef<T> createAbstract(java.lang.Class<T> clazz)
public static <T> StructDef<T> createAbstract(java.lang.Class<T> clazz, StructDef<? super T> superClass)
public static <T> StructDef<T> create(java.lang.Class<T> clazz)
public static <T> StructDef<T> create(java.lang.Class<T> clazz, StructDef<? super T> superClass)
protected boolean isReadyForDeletion(Nd dom, long address)
protected boolean hasDestructableFields()
public StructDef.DeletionSemantics getDeletionSemantics()
public void done()
public void add(IField toAdd)
public void addDestructableField(IDestructableField field)
public void addRefCountedField(IRefCountedField result)
public void addOwnerField(IRefCountedField result)
public boolean areOffsetsComputed()
public int size()
public FieldPointer addPointer()
public FieldShort addShort()
public FieldInt addInt()
public FieldLong addLong()
public FieldString addString()
public FieldDouble addDouble()
public FieldFloat addFloat()
public FieldByte addByte()
public FieldChar addChar()
public <F> Field<F> add(ITypeFactory<F> factory1)
public ITypeFactory<T> getFactory()