Class AbstractTypeFactory<T>
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.AbstractTypeFactory<T>
- All Implemented Interfaces:
ITypeFactory<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvokes any cleanup code for this object.voiddestructFields(Nd dom, long address)Invokes the delete method on all the fields of the object, and calls deleteFields on the superclass' type (if any).Returns the deletion semantics used for this object.booleanIf this returns false, the delete and deleteFields methods both always do nothing.booleanisReadyForDeletion(Nd dom, long address)Returns true if this object is orphaned.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.ITypeFactory
create, getElementClass, getRecordSize
-
Constructor Details
-
AbstractTypeFactory
public AbstractTypeFactory()
-
-
Method Details
-
destructFields
Description copied from interface:ITypeFactoryInvokes the delete method on all the fields of the object, and calls deleteFields on the superclass' type (if any). Does not perform any higher-level cleanup operations. This is only intended to be called from the deleteFields methods of a subtype or the delete method of this class.When destructing a type with a superclass, the correct destruction behavior is:
- External code invokes the delete method on ITypeFactory
- The ITypeFactory.delete method calls an instance method on the class (typically called T#delete()), which performs high-level deletion operations (if any).
- T.delete also calls T.super.delete() (if any)
- ITypeFactory.delete calls ITypeFactory.deleteFields, which performs low-level deletion operations on the fields, then calls ITypeFactory.deleteFields on the base type.
- Specified by:
destructFieldsin interfaceITypeFactory<T>
-
destruct
Description copied from interface:ITypeFactoryInvokes any cleanup code for this object. In particular, it deallocates any memory allocated by the type's fields. Does not free the memory at address, though. This is used for both objects which were allocated their own memory block and objects which are embedded as fields within a larger object. If the object was given its own memory block, it is the caller's responsibility to invoke free after calling this method.- Specified by:
destructin interfaceITypeFactory<T>
-
hasDestructor
public boolean hasDestructor()Description copied from interface:ITypeFactoryIf this returns false, the delete and deleteFields methods both always do nothing.- Specified by:
hasDestructorin interfaceITypeFactory<T>
-
isReadyForDeletion
Description copied from interface:ITypeFactoryReturns true if this object is orphaned. If the object is refcounted, this means the refcount is 0. If the object is deleted via an owner pointer, this means the owner pointer is null.- Specified by:
isReadyForDeletionin interfaceITypeFactory<T>
-
getDeletionSemantics
Description copied from interface:ITypeFactoryReturns the deletion semantics used for this object.- Specified by:
getDeletionSemanticsin interfaceITypeFactory<T>
-