com.github.ruediste.salta.standard.StandardJitBinding 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.util.function.Supplier;
import com.github.ruediste.salta.core.JITBinding;
import com.github.ruediste.salta.core.RecipeCreationContext;
import com.github.ruediste.salta.core.Scope;
import com.github.ruediste.salta.core.compile.SupplierRecipe;
import com.google.common.reflect.TypeToken;
/**
* Statically defined Binding.
*/
public class StandardJitBinding extends JITBinding {
public CreationRecipeFactory recipeFactory;
public Supplier scopeSupplier;
private TypeToken> type;
public StandardJitBinding(TypeToken> type) {
this.type = type;
}
@Override
public SupplierRecipe createRecipe(RecipeCreationContext ctx) {
return recipeFactory.createRecipe(ctx);
}
@Override
public String toString() {
return "StandardJitBinding(" + type + ")";
}
@Override
protected Scope getScopeImpl() {
return scopeSupplier.get();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy