public void handleLicenseAcceptance ( LicenseProvider licenseProvider , boolean acceptLicense ) { // // Display license requirement // SelfExtract . wordWrappedOut ( SelfExtract . format ( "licenseStatement" , new Object [ ] { licenseProvider . getProgramName ( ) , licenseProvider . getLicenseName ( ) } ) ) ; System . out . println ( ) ; if ( acceptLicense ) { // Indicate license acceptance via option SelfExtract . wordWrappedOut ( SelfExtract . format ( "licenseAccepted" , "--acceptLicense" ) ) ; System . out . println ( ) ; } else { // Check for license agreement: exit if not accepted. if ( ! obtainLicenseAgreement ( licenseProvider ) ) { System . exit ( 0 ) ; } } }
This method will print out information about the license and if necessary prompt the user to accept it .