public static void printOption ( java . io . PrintStream stream , Configurable configObj , Property prop ) { if ( prop . getType ( ) != Property . Type . PROPERTY_FLAGS ) { stream . printf ( " %s; default= %s; type=%s;\n" , prop . getName ( ) , configObj . getPropertyAsString ( prop . getName ( ) ) , prop . getType ( ) ) ; } else { // it's a flag stream . printf ( " %s; default= %d; valid values=(" , prop . getName ( ) , configObj . getPropertyAsLong ( prop . getName ( ) ) ) ; int numSettings = prop . getNumFlagSettings ( ) ; long value = configObj . getPropertyAsLong ( prop . getName ( ) ) ; for ( int i = 0 ; i < numSettings ; i ++ ) { Property fprop = prop . getFlagConstant ( i ) ; long flagMask = fprop . getDefault ( ) ; boolean isSet = ( value & flagMask ) > 0 ; stream . printf ( "%s%s; " , isSet ? "+" : "-" , fprop . getName ( ) ) ; } stream . printf ( "); type=%s;\n" , prop . getType ( ) ) ; } stream . printf ( " help for %s: %s\n" , prop . getName ( ) , prop . getHelp ( ) == null ? "no help available" : prop . getHelp ( ) ) ; }
Print information about the property on the configurable object .