public static int from ( String state ) { switch ( state . toUpperCase ( ) ) { case ACTIVE : return Bundle . ACTIVE ; case INSTALLED : return Bundle . INSTALLED ; case RESOLVED : return Bundle . RESOLVED ; case STARTING : return Bundle . STARTING ; case STOPPING : return Bundle . STOPPING ; case UNINSTALLED : return Bundle . UNINSTALLED ; default : return - 1 ; // Unknown. } }
Gets the OSGi state from the string form .