public static String getStringProperty ( final ServiceReference < ? > serviceReference , final String key ) { NullArgumentException . validateNotNull ( serviceReference , "Service reference" ) ; NullArgumentException . validateNotEmpty ( key , true , "Property key" ) ; Object value = serviceReference . getProperty ( key ) ; if ( value != null && ! ( value instanceof String ) ) { LOG . error ( "Property [" + key + "] value must be a String" ) ; return null ; } return ( String ) value ; }
Returns a property as String .