@Test public void testRegisterCollectionArgumentType() throws Exception { ArgumentTypeRegistry.registerCollectionArgumentType(List.class, MyCollectionArgumentType.class); ArgumentType<List<String>> argumentType = ArgumentTypeRegistry .getCollectionArgumentType(List.class, String.class); assertTrue(argumentType instanceof MyCollectionArgumentType); }
@SuppressWarnings("unchecked") public static void registerCollectionArgumentType( Class<? extends Collection> collectionClass, Class<? extends CollectionType> argumentTypeClass) { if (collectionClass == null) { throw new NullPointerException("collectionClass"); } if (argumentTypeClass == null) { throw new NullPointerException("argumentTypeClass"); } Constructor<? extends CollectionType> constructor = ReflectionUtil .getConstructor(argumentTypeClass, ArgumentType.class); collectionArgTypeMap.put(collectionClass, constructor); }
ArgumentTypeRegistry { @SuppressWarnings("unchecked") public static void registerCollectionArgumentType( Class<? extends Collection> collectionClass, Class<? extends CollectionType> argumentTypeClass) { if (collectionClass == null) { throw new NullPointerException("collectionClass"); } if (argumentTypeClass == null) { throw new NullPointerException("argumentTypeClass"); } Constructor<? extends CollectionType> constructor = ReflectionUtil .getConstructor(argumentTypeClass, ArgumentType.class); collectionArgTypeMap.put(collectionClass, constructor); } }
ArgumentTypeRegistry { @SuppressWarnings("unchecked") public static void registerCollectionArgumentType( Class<? extends Collection> collectionClass, Class<? extends CollectionType> argumentTypeClass) { if (collectionClass == null) { throw new NullPointerException("collectionClass"); } if (argumentTypeClass == null) { throw new NullPointerException("argumentTypeClass"); } Constructor<? extends CollectionType> constructor = ReflectionUtil .getConstructor(argumentTypeClass, ArgumentType.class); collectionArgTypeMap.put(collectionClass, constructor); }  }
ArgumentTypeRegistry { @SuppressWarnings("unchecked") public static void registerCollectionArgumentType( Class<? extends Collection> collectionClass, Class<? extends CollectionType> argumentTypeClass) { if (collectionClass == null) { throw new NullPointerException("collectionClass"); } if (argumentTypeClass == null) { throw new NullPointerException("argumentTypeClass"); } Constructor<? extends CollectionType> constructor = ReflectionUtil .getConstructor(argumentTypeClass, ArgumentType.class); collectionArgTypeMap.put(collectionClass, constructor); }  static ArgumentType<T> getArgumentType(PropertyDesc propertyDesc); static void registerArgumentType(Class<?> clazz,
            Class<? extends ArgumentType<?>> argumentTypeClass); static void deregisterArgumentType(Class<?> clazz); @SuppressWarnings("unchecked") static void registerCollectionArgumentType(
            Class<? extends Collection> collectionClass,
            Class<? extends CollectionType> argumentTypeClass); @SuppressWarnings("unchecked") static void deregisterCollectionArgumentType(
            Class<? extends Collection> collectionClass); }
ArgumentTypeRegistry { @SuppressWarnings("unchecked") public static void registerCollectionArgumentType( Class<? extends Collection> collectionClass, Class<? extends CollectionType> argumentTypeClass) { if (collectionClass == null) { throw new NullPointerException("collectionClass"); } if (argumentTypeClass == null) { throw new NullPointerException("argumentTypeClass"); } Constructor<? extends CollectionType> constructor = ReflectionUtil .getConstructor(argumentTypeClass, ArgumentType.class); collectionArgTypeMap.put(collectionClass, constructor); }  static ArgumentType<T> getArgumentType(PropertyDesc propertyDesc); static void registerArgumentType(Class<?> clazz,
            Class<? extends ArgumentType<?>> argumentTypeClass); static void deregisterArgumentType(Class<?> clazz); @SuppressWarnings("unchecked") static void registerCollectionArgumentType(
            Class<? extends Collection> collectionClass,
            Class<? extends CollectionType> argumentTypeClass); @SuppressWarnings("unchecked") static void deregisterCollectionArgumentType(
            Class<? extends Collection> collectionClass);  }