Author: clement
Date: Fri Nov 29 13:52:03 2013
New Revision: 1546561
URL: http://svn.apache.org/r1546561
Log:
Fix FELIX-4335 (https://issues.apache.org/jira/browse/FELIX-4335)
Add a method to retrieve the current value of a property as object.
Modified:
felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/architecture/PropertyDescription.java
Modified:
felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/architecture/PropertyDescription.java
URL:
http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/architecture/PropertyDescription.java?rev=1546561&r1=1546560&r2=1546561&view=diff
==============================================================================
---
felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/architecture/PropertyDescription.java
(original)
+++
felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/architecture/PropertyDescription.java
Fri Nov 29 13:52:03 2013
@@ -189,7 +189,7 @@ public class PropertyDescription {
if (m_value == null) {
return null;
}
-
+
Class type = null;
try {
type = Property.computeType(m_type, context);
@@ -199,4 +199,17 @@ public class PropertyDescription {
}
}
+ /**
+ * Gets the current value of the property as object.
+ * @return the current value
+ * @since 1.11.1
+ */
+ public Object getCurrentValue() {
+ if (m_property == null) {
+ return m_value;
+ } else {
+ return m_property.getValue();
+ }
+ }
+
}