Class ArrayContentProvider

  • All Implemented Interfaces:
    IContentProvider, IStructuredContentProvider

    public class ArrayContentProvider
    extends Object
    implements IStructuredContentProvider
    This implementation of IStructuredContentProvider handles the case where the viewer input is an unchanging array or collection of elements.

    This class is not intended to be subclassed outside the viewer framework.

    Since:
    2.1
    Restriction:
    This class is not intended to be subclassed by clients.
    • Constructor Detail

      • ArrayContentProvider

        public ArrayContentProvider()
    • Method Detail

      • getInstance

        public static ArrayContentProvider getInstance()
        Returns an instance of ArrayContentProvider. Since instances of this class do not maintain any state, they can be shared between multiple clients.
        Returns:
        an instance of ArrayContentProvider
        Since:
        3.5
      • getElements

        public Object[] getElements​(Object inputElement)
        Returns the elements in the input, which must be either an array or a Collection.
        Specified by:
        getElements in interface IStructuredContentProvider
        Parameters:
        inputElement - the input element
        Returns:
        the array of elements to display in the viewer