Enum Class CollectionType

java.lang.Object
java.lang.Enum<CollectionType>
org.osgi.service.component.annotations.CollectionType
All Implemented Interfaces:
Serializable, Comparable<CollectionType>, Constable

public enum CollectionType extends Enum<CollectionType>
Collection types for the Reference annotation.
Since:
1.4
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The properties collection type is used to indicate the collection holds unmodifiable Maps containing the service properties of the bound services.
    The reference collection type is used to indicate the collection holds Service References for the bound services.
    The service collection type is used to indicate the collection holds the bound service objects.
    The serviceobjects collection type is used to indicate the collection holds Component Service Objects for the bound services.
    The tuple collection type is used to indicate the collection holds unmodifiable Map.Entries whose key is an unmodifiable Map containing the service properties of the bound service, as specified in PROPERTIES, and whose value is the bound service object.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SERVICE

      public static final CollectionType SERVICE
      The service collection type is used to indicate the collection holds the bound service objects.

      This is the default collection type.

    • REFERENCE

      public static final CollectionType REFERENCE
      The reference collection type is used to indicate the collection holds Service References for the bound services.
    • SERVICEOBJECTS

      public static final CollectionType SERVICEOBJECTS
      The serviceobjects collection type is used to indicate the collection holds Component Service Objects for the bound services.
    • PROPERTIES

      public static final CollectionType PROPERTIES
      The properties collection type is used to indicate the collection holds unmodifiable Maps containing the service properties of the bound services.

      The Maps must implement Comparable with the compareTo method comparing service property maps using an ordering which is the same as the natural ordering of ServiceReferences as specified in ServiceReference.compareTo.

    • TUPLE

      public static final CollectionType TUPLE
      The tuple collection type is used to indicate the collection holds unmodifiable Map.Entries whose key is an unmodifiable Map containing the service properties of the bound service, as specified in PROPERTIES, and whose value is the bound service object.

      The Map.Entries must implement Comparable with the compareTo method comparing service property maps using an ordering which is the same as the natural ordering of ServiceReferences as specified in ServiceReference.compareTo.

  • Method Details

    • values

      public static CollectionType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CollectionType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<CollectionType>