Enum Class AttributeType

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

public enum AttributeType extends Enum<AttributeType>
Attribute types for the AttributeDefinition annotation.
See Also:
  • Enum Constant Details

    • STRING

      public static final AttributeType STRING
      The String type.

      Attributes of this type should be stored as String, List<String> or String[] objects, depending on the cardinality value.

    • LONG

      public static final AttributeType LONG
      The Long type.

      Attributes of this type should be stored as Long, List<Long> or long[] objects, depending on the AttributeDefinition#cardinality() cardinality value.

    • INTEGER

      public static final AttributeType INTEGER
      The Integer type.

      Attributes of this type should be stored as Integer, List<Integer> or int[] objects, depending on the AttributeDefinition#cardinality() cardinality value.

    • SHORT

      public static final AttributeType SHORT
      The Short type.

      Attributes of this type should be stored as Short, List<Short> or short[] objects, depending on the AttributeDefinition#cardinality() cardinality value.

    • CHARACTER

      public static final AttributeType CHARACTER
      The Character type.

      Attributes of this type should be stored as Character, List<Character> or char[] objects, depending on the AttributeDefinition#cardinality() cardinality value.

    • BYTE

      public static final AttributeType BYTE
      The Byte type.

      Attributes of this type should be stored as Byte, List<Byte> or byte[] objects, depending on the AttributeDefinition#cardinality() cardinality value.

    • DOUBLE

      public static final AttributeType DOUBLE
      The Double type.

      Attributes of this type should be stored as Double, List<Double> or double[] objects, depending on the AttributeDefinition#cardinality() cardinality value.

    • FLOAT

      public static final AttributeType FLOAT
      The Float type.

      Attributes of this type should be stored as Float, List<Float> or float[] objects, depending on the AttributeDefinition#cardinality() cardinality value.

    • BOOLEAN

      public static final AttributeType BOOLEAN
      The Boolean type.

      Attributes of this type should be stored as Boolean, List<Boolean> or boolean[] objects depending on AttributeDefinition#cardinality() cardinality.

    • PASSWORD

      public static final AttributeType PASSWORD
      The Password type.

      Attributes of this type must be stored as String, List<String> or String[] objects depending on cardinality.

      A Password must be treated as a String but the type can be used to disguise the information when displayed to a user to prevent it from being seen.

  • Method Details

    • values

      public static AttributeType[] 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 AttributeType 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<AttributeType>