Class MdObjectResource

java.lang.Object
com._1c.g5.v8.dt.internal.md.compare.MdObjectResource
All Implemented Interfaces:
IResource

public class MdObjectResource extends Object implements IResource
A resource providing access to a MD object, as well as to its child MD objects (by their symbolic links).
  • Constructor Details

    • MdObjectResource

      public MdObjectResource(MdObject mdObject, ComparisonSide side)
      Constructs a resource with the specified MD object.
      Parameters:
      mdObject - the main (top) MD object of the resource, not null
      side - The comparison side for the resource, not null
  • Method Details

    • getObject

      public MdObject getObject(ComparisonContext comparisonContext)
      Description copied from interface: IResource
      Returns the contained object.
      Specified by:
      getObject in interface IResource
      Parameters:
      comparisonContext - The context of the current comparison operation. Can't null
      Returns:
      the contained object, may be null
    • getChild

      public MdObject getChild(ComparisonContext comparisonContext, Object key)
      Description copied from interface: IResource
      Returns a child object by its key.
      Specified by:
      getChild in interface IResource
      Parameters:
      comparisonContext - The context of the current comparison operation. Can't null
      key - the child key, not null
      Returns:
      the child object or null if not available
    • addChild

      public void addChild(String key, MdObject child)
      Adds a child to the resource.
      Parameters:
      key - the child key
      child - the child