public static PermissionDialogFragment getInstance(PermBean bean, int requestCode) {
        if (bean == null) throw new NullPointerException("Permission Beans cannot be null !");
        Bundle extras = new Bundle(3);

        // convert map to two arrays.
        HashMap<Permission, String> map = (HashMap<Permission, String>) bean.getPermissions();

        // put arrays in extras.
        extras.putSerializable(PERMISSION, map);
        extras.putInt(REQUEST, requestCode);

        // set extras in fragment and return.
        PermissionDialogFragment fragment = new PermissionDialogFragment();
        fragment.setArguments(extras);
        return fragment;
    }
public static PermissionDialogFragment getInstance(PermBean bean, int requestCode) {
        if (bean == null) throw new NullPointerException("Permission Beans cannot be null !");
        Bundle extras = new Bundle(3);

        
        HashMap<Permission, String> map = (HashMap<Permission, String>) bean.getPermissions();

        
        extras.putSerializable(PERMISSION, map);
        extras.putInt(REQUEST, requestCode);

        
        PermissionDialogFragment fragment = new PermissionDialogFragment();
        fragment.setArguments(extras);
        return fragment;
    }
public static PermissionDialogFragment getInstance ( PermBean bean , int requestCode ) { if ( bean == null ) throw new NullPointerException ( "Permission Beans cannot be null !" ) ; Bundle extras = new Bundle ( 3 ) ; // convert map to two arrays. HashMap < Permission , String > map = ( HashMap < Permission , String > ) bean . getPermissions ( ) ; // put arrays in extras. extras . putSerializable ( PERMISSION , map ) ; extras . putInt ( REQUEST , requestCode ) ; // set extras in fragment and return. PermissionDialogFragment fragment = new PermissionDialogFragment ( ) ; fragment . setArguments ( extras ) ; return fragment ; }
A static dialog fragment instance creator method.

@param bean        {@link PermBean}
@param requestCode any 16 bit {@link Integer} value.
@return new prepared instance of PermissionDialogFragment.
A static dialog fragment instance creator method .