Source:
<code>public <T extends DataManipulator<T, I>, I extends ImmutableDataManipulator<I, T>> void registerContextDataProcessorAndImpl( Class<T> manipulatorClass, Class<? extends T> implClass, Class<I> immutableDataManipulator, Class<? extends I> implImClass, ContextDataProcessor<T, I> processor) { checkState(allowRegistrations, "Registrations are no longer allowed!"); checkArgument(!Modifier.isAbstract(implClass.getModifiers()), "The Implemented DataManipulator class cannot be abstract!"); checkArgument(!Modifier.isInterface(implClass.getModifiers()), "The Implemented DataManipulator class cannot be an interface!"); checkArgument(!Modifier.isAbstract(implImClass.getModifiers()), "The implemented ImmutableDataManipulator class cannot be an interface!"); checkArgument(!Modifier.isInterface(implImClass.getModifiers()), "The implemented ImmutableDataManipulator class cannot be an interface!"); checkArgument(!(processor instanceof ContextDataProcessorDelegate), "Cannot register ContextDataProcessorDelegates!"); <START> if (!this.contextInterfaceToImplDataManipulatorClasses.containsKey(manipulatorClass)) { END> this.contextInterfaceToImplDataManipulatorClasses.put(manipulatorClass, implClass); } List<ContextDataProcessor<?, ?>> processorList = this.contextProcessorMap.get(manipulatorClass); if (processorList == null) { processorList = new CopyOnWriteArrayList<>(); this.contextProcessorMap.put(manipulatorClass, processorList); this.contextProcessorMap.put(implClass, processorList); } checkArgument(!processorList.contains(processor), "Duplicate ContextDataProcessor Registration!"); processorList.add(processor); List<ContextDataProcessor<?, ?>> immutableProcessorList = this.immutableContextProcessorMap.get(immutableDataManipulator); if (immutableProcessorList == null) { immutableProcessorList = new CopyOnWriteArrayList<>(); this.immutableContextProcessorMap.put(immutableDataManipulator, immutableProcessorList); this.immutableContextProcessorMap.put(implImClass, immutableProcessorList); } checkArgument(!immutableProcessorList.contains(processor), "Duplicate ContextDataProcessor Registration!"); immutableProcessorList.add(processor); }</code><technical_language>simply check normal interface implementation class is registered already</technical_language>

Target:
public <T extends DataManipulator<T, I>, I extends ImmutableDataManipulator<I, T>> void registerContextDataProcessorAndImpl( Class<T> manipulatorClass, Class<? extends T> implClass, Class<I> immutableDataManipulator, Class<? extends I> implImClass, ContextDataProcessor<T, I> processor) { checkState(allowRegistrations, "Registrations are no longer allowed!"); checkArgument(!Modifier.isAbstract(implClass.getModifiers()), "The Implemented DataManipulator class cannot be abstract!"); checkArgument(!Modifier.isInterface(implClass.getModifiers()), "The Implemented DataManipulator class cannot be an interface!"); checkArgument(!Modifier.isAbstract(implImClass.getModifiers()), "The implemented ImmutableDataManipulator class cannot be an interface!"); checkArgument(!Modifier.isInterface(implImClass.getModifiers()), "The implemented ImmutableDataManipulator class cannot be an interface!"); checkArgument(!(processor instanceof ContextDataProcessorDelegate), "Cannot register ContextDataProcessorDelegates!"); if (!this.interfaceToImplDataManipulatorClasses.containsKey(manipulatorClass)) { this.interfaceToImplDataManipulatorClasses.put(manipulatorClass, implClass); } List<ContextDataProcessor<?, ?>> processorList = this.contextProcessorMap.get(manipulatorClass); if (processorList == null) { processorList = new CopyOnWriteArrayList<>(); this.contextProcessorMap.put(manipulatorClass, processorList); this.contextProcessorMap.put(implClass, processorList); } checkArgument(!processorList.contains(processor), "Duplicate ContextDataProcessor Registration!"); processorList.add(processor); List<ContextDataProcessor<?, ?>> immutableProcessorList = this.immutableContextProcessorMap.get(immutableDataManipulator); if (immutableProcessorList == null) { immutableProcessorList = new CopyOnWriteArrayList<>(); this.immutableContextProcessorMap.put(immutableDataManipulator, immutableProcessorList); this.immutableContextProcessorMap.put(implImClass, immutableProcessorList); } checkArgument(!immutableProcessorList.contains(processor), "Duplicate ContextDataProcessor Registration!"); immutableProcessorList.add(processor); }