@Test(expected = IllegalArgumentException.class) public void testInvalidAliasClass() throws ActionFactoryException { ActionFactory.registerActionClass("0123", Object.class); }
public static void registerActionClass(String name, Class<?> clazz) { if (!BaseSpellAction.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException("Must extend SpellAction"); } ActionConstructor constructor = InternalActionResolver .createConstructor(clazz); if (constructor == null) { throw new IllegalArgumentException( "Class does not have a valid no-args constructor"); } InternalActionResolver.actionClasses.put(name, constructor); }
ActionFactory { public static void registerActionClass(String name, Class<?> clazz) { if (!BaseSpellAction.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException("Must extend SpellAction"); } ActionConstructor constructor = InternalActionResolver .createConstructor(clazz); if (constructor == null) { throw new IllegalArgumentException( "Class does not have a valid no-args constructor"); } InternalActionResolver.actionClasses.put(name, constructor); } }
ActionFactory { public static void registerActionClass(String name, Class<?> clazz) { if (!BaseSpellAction.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException("Must extend SpellAction"); } ActionConstructor constructor = InternalActionResolver .createConstructor(clazz); if (constructor == null) { throw new IllegalArgumentException( "Class does not have a valid no-args constructor"); } InternalActionResolver.actionClasses.put(name, constructor); } private  ActionFactory(); }
ActionFactory { public static void registerActionClass(String name, Class<?> clazz) { if (!BaseSpellAction.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException("Must extend SpellAction"); } ActionConstructor constructor = InternalActionResolver .createConstructor(clazz); if (constructor == null) { throw new IllegalArgumentException( "Class does not have a valid no-args constructor"); } InternalActionResolver.actionClasses.put(name, constructor); } private  ActionFactory(); static List<ActionResolver> getActionResolvers(); static void registerResolver(ActionResolver actionResolver); static void registerResolver(ActionResolver actionResolver,
            boolean highPriority); static void removeResolver(ActionResolver actionResolver); static void registerActionClass(String name, Class<?> clazz); static BaseSpellAction construct(String actionClassName); }
ActionFactory { public static void registerActionClass(String name, Class<?> clazz) { if (!BaseSpellAction.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException("Must extend SpellAction"); } ActionConstructor constructor = InternalActionResolver .createConstructor(clazz); if (constructor == null) { throw new IllegalArgumentException( "Class does not have a valid no-args constructor"); } InternalActionResolver.actionClasses.put(name, constructor); } private  ActionFactory(); static List<ActionResolver> getActionResolvers(); static void registerResolver(ActionResolver actionResolver); static void registerResolver(ActionResolver actionResolver,
            boolean highPriority); static void removeResolver(ActionResolver actionResolver); static void registerActionClass(String name, Class<?> clazz); static BaseSpellAction construct(String actionClassName);  }