Interface IAdaptable

All Known Subinterfaces:
IAttachment, IAttachmentBase, IBaseline, IBaselineCollection, IBuild, IBuildArtifact, ICategory, IComment, ICommentBase<T>, IDocumentWorkflowSignature, IGroupEntity, IGroupUniqueObject, IModule, IModuleAttachment, IModuleComment, IPlan, IPObject, IProject, IProjectGroup, IPrototype, IRevision, IRichPage, IRichPageAttachment, IRichPageComment, ITestRun, ITestRunAttachment, ITestRunComment, ITestRunWorkflowSignature, ITimePoint, ITrackerBuild, ITrackerProject, ITrackerRevision, ITrackerUser, IUniqueObject, IUser, IUserGroup, IWatchList, IWikiPage, IWikiPageAttachment, IWithLinkedOslcResources, IWorkflowObject, IWorkflowSignature, IWorkItem, IWorkItemWorkflowSignature, IWorkRecord
All Known Implementing Classes:
PObject, Revision

public interface IAdaptable
An interface for an adaptable object. This allows to contribute the code extensions so the model.

Adaptable objects can be dynamically extended to provide different interfaces (or "adapters"). Adapters are created by adapter factories, which are in turn managed by type by adapter managers.

For example,
       IAdaptable a = [some adaptable];
       IFoo x = (IFoo)a.adapt(IFoo.class);
       if (x != null)
           [do IFoo things with x]
 

Implementation of this typically calls IAdapterFactory to do the job.

Author:
dobisekm
  • Method Summary

    Modifier and Type
    Method
    Description
    adapt(Class targetClass)
     
  • Method Details

    • adapt

      Object adapt(Class targetClass)
      Parameters:
      targetClass -
      Returns:
      The incance of targetClass representing this object or null if adaptation is not possible.