public static Provider<String> bindDefault(Binder binder, String propertyName, String defaultValue) {
        Key<String> propertyKey = getPropertyKey(propertyName);
        OptionalBinder<String> optionalBinder = OptionalBinder.
                newOptionalBinder(binder, propertyKey);
        optionalBinder.setDefault().toInstance(defaultValue);
        return binder.getProvider(propertyKey);
    }
public static Provider < String > bindDefault ( Binder binder , String propertyName , String defaultValue ) { Key < String > propertyKey = getPropertyKey ( propertyName ) ; OptionalBinder < String > optionalBinder = OptionalBinder . newOptionalBinder ( binder , propertyKey ) ; optionalBinder . setDefault ( ) . toInstance ( defaultValue ) ; return binder . getProvider ( propertyKey ) ; }
Binds default value to specified property

@param binder       Guice's Binder
@param propertyName Name of property
@param defaultValue Default value
@return Provider to new bound value