Enum AttributeType
- java.lang.Object
-
- java.lang.Enum<AttributeType>
-
- org.osgi.service.metatype.annotations.AttributeType
-
- All Implemented Interfaces:
Serializable
,Comparable<AttributeType>
public enum AttributeType extends Enum<AttributeType>
Attribute types for theAttributeDefinition
annotation.- See Also:
AttributeDefinition.type()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEAN
TheBoolean
type.BYTE
TheByte
type.CHARACTER
TheCharacter
type.DOUBLE
TheDouble
type.FLOAT
TheFloat
type.INTEGER
TheInteger
type.LONG
TheLong
type.PASSWORD
ThePassword
type.SHORT
TheShort
type.STRING
TheString
type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
static AttributeType
valueOf(String name)
Returns the enum constant of this type with the specified name.static AttributeType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRING
public static final AttributeType STRING
TheString
type.Attributes of this type should be stored as
String
,List<String>
orString[]
objects, depending on thecardinality
value.
-
LONG
public static final AttributeType LONG
TheLong
type.Attributes of this type should be stored as
Long
,List<Long>
orlong[]
objects, depending on theAttributeDefinition#cardinality() cardinality
value.
-
INTEGER
public static final AttributeType INTEGER
TheInteger
type.Attributes of this type should be stored as
Integer
,List<Integer>
orint[]
objects, depending on theAttributeDefinition#cardinality() cardinality
value.
-
SHORT
public static final AttributeType SHORT
TheShort
type.Attributes of this type should be stored as
Short
,List<Short>
orshort[]
objects, depending on theAttributeDefinition#cardinality() cardinality
value.
-
CHARACTER
public static final AttributeType CHARACTER
TheCharacter
type.Attributes of this type should be stored as
Character
,List<Character>
orchar[]
objects, depending on theAttributeDefinition#cardinality() cardinality
value.
-
BYTE
public static final AttributeType BYTE
TheByte
type.Attributes of this type should be stored as
Byte
,List<Byte>
orbyte[]
objects, depending on theAttributeDefinition#cardinality() cardinality
value.
-
DOUBLE
public static final AttributeType DOUBLE
TheDouble
type.Attributes of this type should be stored as
Double
,List<Double>
ordouble[]
objects, depending on theAttributeDefinition#cardinality() cardinality
value.
-
FLOAT
public static final AttributeType FLOAT
TheFloat
type.Attributes of this type should be stored as
Float
,List<Float>
orfloat[]
objects, depending on theAttributeDefinition#cardinality() cardinality
value.
-
BOOLEAN
public static final AttributeType BOOLEAN
TheBoolean
type.Attributes of this type should be stored as
Boolean
,List<Boolean>
orboolean[]
objects depending onAttributeDefinition#cardinality() cardinality
.
-
PASSWORD
public static final AttributeType PASSWORD
ThePassword
type.Attributes of this type must be stored as
String
,List<String>
orString[]
objects depending oncardinality
.A
Password
must be treated as aString
but the type can be used to disguise the information when displayed to a user to prevent it from being seen.
-
-
Method Detail
-
values
public static AttributeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AttributeType c : AttributeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AttributeType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
public String toString()
- Overrides:
toString
in classEnum<AttributeType>
-
-