/** * Creates a default state representation for this actor */ @SuppressWarnings({ "PMD.LooseCoupling", "unchecked" }) protected void createDefaultState() { Class<?> c = getStateClass(); try { Object newState = (T) c.newInstance(); this.state = (T) newState; } catch (Exception e) { throw new UncheckedException(e); } }