com.github.nill14.utils.moduledi.guice.GuicePropertyResolver Maven / Gradle / Ivy
package com.github.nill14.utils.moduledi.guice;
import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.stream.Collectors;
import com.github.nill14.utils.init.api.IParameterType;
import com.github.nill14.utils.init.impl.AbstractPropertyResolver;
import com.google.inject.Injector;
import com.google.inject.TypeLiteral;
public class GuicePropertyResolver extends AbstractPropertyResolver {
private final Injector injector;
public GuicePropertyResolver(Injector injector) {
this.injector = injector;
}
@Override
protected Object findByName(Object pojo, String name, Class> type) {
// TODO Auto-generated method stub
return null;
}
@Override
protected Object findByType(Object pojo, IParameterType type, Class> clazz) {
return injector.getInstance(clazz);
}
@Override
protected Collection> findAllByType(Object pojo, Class> type) {
TypeLiteral
© 2015 - 2025 Weber Informatics LLC | Privacy Policy