public static String toCommandLine ( MOAObject obj ) { String result = obj . getClass ( ) . getName ( ) ; if ( obj instanceof AbstractOptionHandler ) result += " " + ( ( AbstractOptionHandler ) obj ) . getOptions ( ) . getAsCLIString ( ) ; return result . trim ( ) ; }
Returs the commandline for the given object . If the object is not derived from AbstractOptionHandler then only the classname . Otherwise the classname and the options are returned .