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