com.cookingfox.chefling.impl.command.ValidateContainerCommandImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chefling-di-java Show documentation
Show all versions of chefling-di-java Show documentation
Chefling is a very minimal dependency injection container written in pure Java.
The newest version!
package com.cookingfox.chefling.impl.command;
import com.cookingfox.chefling.api.command.ValidateContainerCommand;
import com.cookingfox.chefling.impl.helper.CommandContainerVisitor;
/**
* @see ValidateContainerCommand
*/
public class ValidateContainerCommandImpl extends AbstractCommand implements ValidateContainerCommand {
public ValidateContainerCommandImpl(CommandContainer container) {
super(container);
}
@Override
public synchronized void validateContainer() {
// recursively loop through all containers
visitAll(_container, new CommandContainerVisitor() {
@Override
public void visit(CommandContainer container) {
// resolve all mappings in container
for (Class mapping : container.mappings.keySet()) {
container.getInstance(mapping);
}
}
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy