Class PropertyMetadata
- java.lang.Object
-
- org.apache.felix.scr.impl.metadata.PropertyMetadata
-
public class PropertyMetadata extends java.lang.Object
A property descriptor that contains the information for properties defined in the descriptor
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
m_name
private java.lang.String
m_type
private boolean
m_validated
private java.lang.Object
m_value
-
Constructor Summary
Constructors Constructor Description PropertyMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Get the name of the propertyjava.lang.String
getType()
Get the type of the propertyjava.lang.Object
getValue()
Get the value of the propertyvoid
setName(java.lang.String name)
Set the namevoid
setType(java.lang.String type)
Set the typevoid
setValue(java.lang.String value)
Set the valuevoid
setValues(java.lang.String values)
Set multiple values as an array, where the values are contained in the string as one value per line.private java.lang.Object
toType(java.lang.String value)
private java.lang.Object
toTypeArray(java.lang.String[] valueList)
void
validate(ComponentMetadata componentMetadata)
Method used to verify if the semantics of this metadata are correct
-
-
-
Method Detail
-
setName
public void setName(java.lang.String name)
Set the name- Parameters:
name
-
-
setType
public void setType(java.lang.String type)
Set the type- Parameters:
type
-
-
setValue
public void setValue(java.lang.String value)
Set the value- Parameters:
value
-
-
setValues
public void setValues(java.lang.String values)
Set multiple values as an array, where the values are contained in the string as one value per line.- Parameters:
values
-
-
getName
public java.lang.String getName()
Get the name of the property- Returns:
- the name of the property
-
getType
public java.lang.String getType()
Get the type of the property- Returns:
- the type of the property
-
getValue
public java.lang.Object getValue()
Get the value of the property- Returns:
- the value of the property as an Object
-
validate
public void validate(ComponentMetadata componentMetadata)
Method used to verify if the semantics of this metadata are correct
-
toType
private java.lang.Object toType(java.lang.String value)
- Throws:
java.lang.IllegalArgumentException
- if the property type is not valid according to the specjava.lang.NumberFormatException
- if the string value cannot be converted to the numeric type indicated by the property type
-
toTypeArray
private java.lang.Object toTypeArray(java.lang.String[] valueList)
- Throws:
java.lang.IllegalArgumentException
- if the property type is not valid according to the specjava.lang.NumberFormatException
- if the string value cannot be converted to the numeric type indicated by the property type
-
-