class MixinInjector {

	public void inject() throws InjectionException
	{
		ClassPath classPath;

		try
		{
			classPath = ClassPath.from(this.getClass().getClassLoader());
		}
		catch (IOException ex)
		{
			throw new InjectionException(ex);
		}

		// key: mixin class
		// value: mixin targets
		Map<Class<?>, List<ClassFile>> mixinClasses = new HashMap<>();

		// Find mixins and populate mixinClasses
		for (ClassInfo classInfo : classPath.getTopLevelClasses(MIXIN_BASE))
		{
			Class<?> mixinClass = classInfo.load();
			List<ClassFile> mixinTargets = new ArrayList<>();

			for (Mixin mixin : mixinClass.getAnnotationsByType(Mixin.class))
			{
				Class<?> implementInto = mixin.value();

				ClassFile targetCf = inject.findVanillaForInterface(implementInto);

				if (targetCf == null)
				{
					throw new InjectionException("No class implements " + implementInto + " for mixin " + mixinClass);
				}

				mixinTargets.add(targetCf);
			}

			mixinClasses.put(mixinClass, mixinTargets);
		}

		inject(mixinClasses);
	}

	public  MixinInjector(Inject inject);

}