Class AbstractHyperlinkDetector

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Disposes this hyperlink detector.
      protected <T> T getAdapter​(java.lang.Class<T> adapterClass)
      Returns an object which is an instance of the given class and provides additional context for this hyperlink detector.
      void setContext​(IAdaptable context)
      Sets this hyperlink detector's context which is responsible to provide the adapters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractHyperlinkDetector

        public AbstractHyperlinkDetector()
    • Method Detail

      • setContext

        public final void setContext​(IAdaptable context)
                              throws java.lang.IllegalStateException,
                                     java.lang.IllegalArgumentException
        Sets this hyperlink detector's context which is responsible to provide the adapters.
        Parameters:
        context - the context for this hyperlink detector
        Throws:
        java.lang.IllegalArgumentException - if the context is null
        java.lang.IllegalStateException - if this method is called more than once
      • getAdapter

        protected final <T> T getAdapter​(java.lang.Class<T> adapterClass)
        Returns an object which is an instance of the given class and provides additional context for this hyperlink detector.
        Parameters:
        adapterClass - the adapter class to look up
        Returns:
        an instance that can be cast to the given class, or null if this object does not have an adapter for the given class