Class Reference

java.lang.Object
org.pipservices3.commons.refer.Reference

public class Reference extends Object
Contains a reference to a component and locator to find it. It is used by References to store registered component references.
  • Constructor Details

    • Reference

      public Reference(Object locator, Object reference) throws NullPointerException
      Create a new instance of the reference object and assigns its values.
      Parameters:
      locator - a locator to find the reference.
      reference - a reference to component.
      Throws:
      NullPointerException
  • Method Details

    • match

      public boolean match(Object locator)
      Matches locator to this reference locator.

      Descriptors are matched using equal method. All other locator types are matched using direct comparison.

      Parameters:
      locator - the locator to match.
      Returns:
      true if locators are matching and false it they don't.
      See Also:
    • getLocator

      public Object getLocator()
      Gets the stored component locator.
      Returns:
      the component's locator.
    • getComponent

      public Object getComponent()
      Gets the stored component reference.
      Returns:
      the component's references.