@Override public void setMoney(final double value) { if (Methods.hasMethod()) { try { final Method method = Methods.getMethod(); if (!method.hasAccount(this.getName())) { throw new Exception(); } final Method.MethodAccount account = Methods.getMethod().getAccount(this.getName()); account.set(value); } catch (Exception ex) { } } super.setMoney(value); }
@Override public double getMoney() { if (Methods.hasMethod()) { try { final Method method = Methods.getMethod(); if (!method.hasAccount(this.getName())) { throw new Exception(); } final Method.MethodAccount account = Methods.getMethod().getAccount(this.getName()); return account.balance(); } catch (Exception ex) { } } return super.getMoney(); }