com.github.ruediste.salta.standard.DefaultJITBindingKeyRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of salta-core Show documentation
Show all versions of salta-core Show documentation
Core of the Salta Framework. Provides most of the infrastructure, but no API
package com.github.ruediste.salta.standard;
import java.lang.annotation.Annotation;
import com.github.ruediste.salta.core.CoreDependencyKey;
import com.github.ruediste.salta.core.JITBindingKey;
import com.github.ruediste.salta.core.JITBindingKeyRule;
import com.github.ruediste.salta.core.attachedProperties.AttachedProperty;
import com.github.ruediste.salta.standard.config.StandardInjectorConfiguration;
import com.google.common.reflect.TypeToken;
public final class DefaultJITBindingKeyRule implements JITBindingKeyRule {
private StandardInjectorConfiguration config;
public static final AttachedProperty jitBindingKeyRequiredQualifiers = new AttachedProperty<>(
"required qualifiers");
public static final AttachedProperty> jitBindingKeyType = new AttachedProperty<>(
"type");
public DefaultJITBindingKeyRule(StandardInjectorConfiguration config) {
this.config = config;
}
@Override
public void apply(CoreDependencyKey> dependency, JITBindingKey key) {
DefaultJITBindingKeyRule.jitBindingKeyType.set(key, dependency.getType());
DefaultJITBindingKeyRule.jitBindingKeyRequiredQualifiers.set(key, config.getRequiredQualifier(dependency));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy