Code example for InflateException

0
     */ 
    protected void _initialize(Menu menu,MenuItemData data,MenuItemParameters params){
        if(menu==null){
            throw new InflateException("This Menu parameter MUST not be <code>null</code>.");
        }else if(data==null){
            throw new InflateException("This MenuItemData parameter MUST not be <code>null</code>.");
        } 
         
        this._menu=menu;  //This is the only time the _menu object should be modified.
        this._menu_item_data=data;
        if(params!=null){
            this.setParameters(params);
        } 
         
        if(params.getTitle()==null){
            this.setText(MenuItem.NO_TITLE);
        }else{ 
            this.setText(params.getTitle());
        } 
    } 
    /*End Initializer Methods*/