Class StructDef<T>
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.field.StructDef<T>
Defines a data structure that will appear in the database.
There are three mechanisms for deleting a struct from the database:
- Explicit deletion. This happens synchronously via manual calls to Nd.delete. Structs intended for manual deletion have refCounted=false and an empty ownerFields.
- Owner pointers. Such structs have one or more outbound pointers to an "owner" object. They are deleted asynchronously when the last owner pointer is deleted. The structs have refCounted=false and a nonempty ownerFields.
- Refcounting. Such structs are deleted asynchronously when all elements are removed from all of their ManyToOne relationships which are not marked as incoming owner pointers. Owner relationships need to be excluded from refcounting since they would always create cycles. These structs have refCounted=true.
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid<F> Field<F>add(ITypeFactory<F> factory1)addByte()addChar()voidaddDependency(StructDef<?> newDependency)voidaddFloat()addInt()addLong()voidaddOwnerField(IRefCountedField result)voidaddRefCountedField(IRefCountedField result)addShort()booleanstatic <T> StructDef<T>static <T> StructDef<T>static <T> StructDef<T>createAbstract(Class<T> clazz)static <T> StructDef<T>createAbstract(Class<T> clazz, StructDef<? super T> superClass)voiddone()Call this once all the fields have been added to the struct definition and it is ready to use.intprotected booleanbooleanisNdNode()protected booleanisReadyForDeletion(Nd dom, long address)intsize()toString()
-
Field Details
-
hasUserDestructor
protected boolean hasUserDestructor
-
-
Method Details
-
addDependency
-
getStructClass
-
toString
-
createAbstract
-
createAbstract
-
create
-
create
-
isReadyForDeletion
-
hasDestructableFields
protected boolean hasDestructableFields() -
getDeletionSemantics
-
done
public void done()Call this once all the fields have been added to the struct definition and it is ready to use. -
add
-
addDestructableField
-
useStandardRefCounting
-
addRefCountedField
-
addOwnerField
-
areOffsetsComputed
public boolean areOffsetsComputed() -
size
public int size() -
addPointer
-
addShort
-
addInt
-
addLong
-
addString
-
addDouble
-
addFloat
-
getStructName
-
addByte
-
addChar
-
add
-
getFactory
-
isNdNode
public boolean isNdNode() -
getNumFields
public int getNumFields()
-