org.apache.felix.ipojo.architecture

## Class PropertyDescription

- java.lang.Object
- - org.apache.felix.ipojo.architecture.PropertyDescription

    public class PropertyDescription
    extends java.lang.Object

Property Information.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`PropertyDescription(Property prop)` Constructor.
`PropertyDescription(java.lang.String name, java.lang.String type, java.lang.String value)` Constructor.
`PropertyDescription(java.lang.String name, java.lang.String type, java.lang.String value, boolean immutable)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.Object` `getCurrentValue()` Gets the current value of the property as object.
`java.lang.String` `getName()` Gets the current property name.
`java.lang.Object` `getObjectValue(org.osgi.framework.BundleContext context)` Gets the object value of the current immutable property.
`java.lang.String` `getType()` Gets the current property type.
`java.lang.String` `getValue()` Gets the current property value.
`boolean` `isImmutable()` Is the property immutable.
`boolean` `isMandatory()` Is the property mandatory.
`void` `setMandatory()` Sets the property as mandatory.
`void` `setValue(java.lang.Object value)` Sets the property value.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PropertyDescription

    public PropertyDescription(java.lang.String name,
                               java.lang.String type,
                               java.lang.String value)

Constructor.

Parameters:
  `name` - the name of the property
  `type` - the type of the property
  `value` - the default value of the property, can be `null`

#### PropertyDescription

    public PropertyDescription(Property prop)

Constructor.

Parameters:
  `prop` - the attache Property object.

#### PropertyDescription

    public PropertyDescription(java.lang.String name,
                               java.lang.String type,
                               java.lang.String value,
                               boolean immutable)

Constructor.

Parameters:
  `name` - the name of the property
  `type` - the type of the property
  `value` - the default value (String form) of the property, can be `null`
  `immutable` - the property is immutable.

### Method Detail

#### getName

    public java.lang.String getName()

Gets the current property name.

Returns:
  the property name.

#### getType

    public java.lang.String getType()

Gets the current property type.

Returns:
  the property type.

#### getValue

    public java.lang.String getValue()

Gets the current property value.

Returns:
  the default value for the property, `null` if the property hasn't a value..

#### setValue

    public void setValue(java.lang.Object value)

Sets the property value. This method can only be called on 'living' property (properties with a `Property` object).

Parameters:
  `value` - the new value.

#### isImmutable

    public boolean isImmutable()

Is the property immutable.

Returns:
  `true` if the property is immutable.

#### setMandatory

    public void setMandatory()

Sets the property as mandatory.

#### isMandatory

    public boolean isMandatory()

Is the property mandatory.

Returns:
  `true` if the property is mandatory, `false` otherwise.

#### getObjectValue

    public java.lang.Object getObjectValue(org.osgi.framework.BundleContext context)

Gets the object value of the current immutable property.

Parameters:
  `context` - the bundle context to use to load classes.
Returns:
  the object value of the current property or `null` if the current value is `null`.

#### getCurrentValue

    public java.lang.Object getCurrentValue()

Gets the current value of the property as object.

Returns:
  the current value
Since:
  1.11.1