Class AbstractTypeFactory<T>

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.AbstractTypeFactory<T>
All Implemented Interfaces:
ITypeFactory<T>

public abstract class AbstractTypeFactory<T> extends Object implements ITypeFactory<T>
  • Constructor Details

    • AbstractTypeFactory

      public AbstractTypeFactory()
  • Method Details

    • destructFields

      public void destructFields(Nd dom, long address)
      Description copied from interface: ITypeFactory
      Invokes 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:
      destructFields in interface ITypeFactory<T>
    • destruct

      public void destruct(Nd dom, long address)
      Description copied from interface: ITypeFactory
      Invokes 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:
      destruct in interface ITypeFactory<T>
    • hasDestructor

      public boolean hasDestructor()
      Description copied from interface: ITypeFactory
      If this returns false, the delete and deleteFields methods both always do nothing.
      Specified by:
      hasDestructor in interface ITypeFactory<T>
    • isReadyForDeletion

      public boolean isReadyForDeletion(Nd dom, long address)
      Description copied from interface: ITypeFactory
      Returns 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:
      isReadyForDeletion in interface ITypeFactory<T>
    • getDeletionSemantics

      public StructDef.DeletionSemantics getDeletionSemantics()
      Description copied from interface: ITypeFactory
      Returns the deletion semantics used for this object.
      Specified by:
      getDeletionSemantics in interface ITypeFactory<T>