Enum AttributeType
- java.lang.Object
-
- java.lang.Enum<AttributeType>
-
- org.osgi.service.metatype.annotations.AttributeType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AttributeType>
public enum AttributeType extends java.lang.Enum<AttributeType>
Attribute types for theAttributeDefinitionannotation.- See Also:
AttributeDefinition.type()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEANTheBooleantype.BYTETheBytetype.CHARACTERTheCharactertype.DOUBLETheDoubletype.FLOATTheFloattype.INTEGERTheIntegertype.LONGTheLongtype.PASSWORDThePasswordtype.SHORTTheShorttype.STRINGTheStringtype.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()static AttributeTypevalueOf(java.lang.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
TheStringtype.Attributes of this type should be stored as
String,List<String>orString[]objects, depending on thecardinalityvalue.
-
LONG
public static final AttributeType LONG
TheLongtype.Attributes of this type should be stored as
Long,List<Long>orlong[]objects, depending on theAttributeDefinition#cardinality() cardinalityvalue.
-
INTEGER
public static final AttributeType INTEGER
TheIntegertype.Attributes of this type should be stored as
Integer,List<Integer>orint[]objects, depending on theAttributeDefinition#cardinality() cardinalityvalue.
-
SHORT
public static final AttributeType SHORT
TheShorttype.Attributes of this type should be stored as
Short,List<Short>orshort[]objects, depending on theAttributeDefinition#cardinality() cardinalityvalue.
-
CHARACTER
public static final AttributeType CHARACTER
TheCharactertype.Attributes of this type should be stored as
Character,List<Character>orchar[]objects, depending on theAttributeDefinition#cardinality() cardinalityvalue.
-
BYTE
public static final AttributeType BYTE
TheBytetype.Attributes of this type should be stored as
Byte,List<Byte>orbyte[]objects, depending on theAttributeDefinition#cardinality() cardinalityvalue.
-
DOUBLE
public static final AttributeType DOUBLE
TheDoubletype.Attributes of this type should be stored as
Double,List<Double>ordouble[]objects, depending on theAttributeDefinition#cardinality() cardinalityvalue.
-
FLOAT
public static final AttributeType FLOAT
TheFloattype.Attributes of this type should be stored as
Float,List<Float>orfloat[]objects, depending on theAttributeDefinition#cardinality() cardinalityvalue.
-
BOOLEAN
public static final AttributeType BOOLEAN
TheBooleantype.Attributes of this type should be stored as
Boolean,List<Boolean>orboolean[]objects depending onAttributeDefinition#cardinality() cardinality.
-
PASSWORD
public static final AttributeType PASSWORD
ThePasswordtype.Attributes of this type must be stored as
String,List<String>orString[]objects depending oncardinality.A
Passwordmust be treated as aStringbut 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(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<AttributeType>
-
-