colesico.framework.resource.internal.ResourceIoclet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of colesico-resource Show documentation
Show all versions of colesico-resource Show documentation
Colesico framework resource services provides ability of resource rewriting and localization
// This is automatically generated file. Do not modify!
package colesico.framework.resource.internal;
import colesico.framework.assist.LazySingleton;
import colesico.framework.assist.codegen.Genstamp;
import colesico.framework.ioc.TypeKey;
import colesico.framework.ioc.ioclet.AdvancedIoc;
import colesico.framework.ioc.ioclet.Catalog;
import colesico.framework.ioc.ioclet.DefaultPolysupplier;
import colesico.framework.ioc.ioclet.DefaultProvider;
import colesico.framework.ioc.ioclet.Factory;
import colesico.framework.ioc.ioclet.Ioclet;
import colesico.framework.ioc.ioclet.SingletonFactory;
import colesico.framework.profile.Profile;
import colesico.framework.profile.ProfileConfigPrototype;
import colesico.framework.resource.ResourceKit;
import colesico.framework.resource.ResourceOptionsPrototype;
@Genstamp(
generator = "colesico.framework.ioc.codegen.generator.IocletGenerator",
timestamp = "2019-11-17T14:03:16.214Z",
hashId = "f5575a35-8d31-4421-a07b-6d74c970371b",
comments = "Producer: ClassElement{originElement=colesico.framework.resource.internal.ResourceProducer}"
)
public final class ResourceIoclet implements Ioclet {
private final LazySingleton producer = new LazySingleton() {
@Override
public final ResourceProducer create() {
return new ResourceProducer();
}
};
@Override
public final String getProducerId() {
return "colesico.framework.resource.internal.ResourceProducer";
}
@Override
public final String getRank() {
return "minor";
}
/**
* Factory to produce colesico.framework.resource.ResourceKit class instance
* Scope: SINGLETON; Custom: null
*/
public Factory getResourcesKitFactory0() {
return new SingletonFactory() {
private Factory implFac;
@Override
public final void setup(final AdvancedIoc ioc) {
// Initialize dependencies for: colesico.framework.resource.ResourceKit
this.implFac=ioc.factory(new TypeKey(ResourceKitImpl.class));
}
@Override
public final ResourceKit create(final Object message) {
// Perform instance producing
ResourceKit instance = producer.get().getResourcesKit(this.implFac.get(message));
return instance;
}
};
}
/**
* Factory to produce colesico.framework.resource.internal.ResourceKitImpl class instance
* Scope: SINGLETON; Custom: null
*/
public Factory getResourceKitImplFactory1() {
return new SingletonFactory() {
private Factory localizingToolFac;
private Factory rewritingToolFac;
private Factory evaluationToolFac;
private Factory configsFac;
@Override
public final void setup(final AdvancedIoc ioc) {
// Initialize dependencies for: colesico.framework.resource.internal.ResourceKitImpl
this.localizingToolFac=ioc.factory(new TypeKey(LocalizingTool.class));
this.rewritingToolFac=ioc.factory(new TypeKey(RewritingTool.class));
this.evaluationToolFac=ioc.factory(new TypeKey(EvaluationTool.class));
this.configsFac=ioc.factoryOrNull(new TypeKey(ResourceOptionsPrototype.class));
}
@Override
public final ResourceKitImpl create(final Object message) {
// Perform instance producing
ResourceKitImpl instance = new ResourceKitImpl(this.localizingToolFac.get(message),this.rewritingToolFac.get(message),this.evaluationToolFac.get(message),new DefaultPolysupplier(this.configsFac));
// Post construct listeners invocations:
return instance;
}
};
}
/**
* Factory to produce colesico.framework.resource.internal.LocalizingTool class instance
* Scope: SINGLETON; Custom: null
*/
public Factory getLocalizingToolFactory2() {
return new SingletonFactory() {
private Factory profileProvFac;
private Factory configFac;
@Override
public final void setup(final AdvancedIoc ioc) {
// Initialize dependencies for: colesico.framework.resource.internal.LocalizingTool
this.profileProvFac=ioc.factory(new TypeKey(Profile.class));
this.configFac=ioc.factory(new TypeKey(ProfileConfigPrototype.class));
}
@Override
public final LocalizingTool create(final Object message) {
// Perform instance producing
LocalizingTool instance = new LocalizingTool(new DefaultProvider(this.profileProvFac,message),this.configFac.get(message));
// Post construct listeners invocations:
return instance;
}
};
}
/**
* Factory to produce colesico.framework.resource.internal.RewritingTool class instance
* Scope: SINGLETON; Custom: null
*/
public Factory getRewritingToolFactory3() {
return new SingletonFactory() {
@Override
public final void setup(final AdvancedIoc ioc) {
// Initialize dependencies for: colesico.framework.resource.internal.RewritingTool
}
@Override
public final RewritingTool create(final Object message) {
// Perform instance producing
RewritingTool instance = new RewritingTool();
// Post construct listeners invocations:
return instance;
}
};
}
/**
* Factory to produce colesico.framework.resource.internal.EvaluationTool class instance
* Scope: SINGLETON; Custom: null
*/
public Factory getEvaluationToolFactory4() {
return new SingletonFactory() {
@Override
public final void setup(final AdvancedIoc ioc) {
// Initialize dependencies for: colesico.framework.resource.internal.EvaluationTool
}
@Override
public final EvaluationTool create(final Object message) {
// Perform instance producing
EvaluationTool instance = new EvaluationTool();
// Post construct listeners invocations:
return instance;
}
};
}
@Override
public final void addFactories(final Catalog catalog) {
if(catalog.accept(Catalog.Entry.of(new TypeKey("colesico.framework.resource.ResourceKit"),false))){
catalog.add(getResourcesKitFactory0());
}
if(catalog.accept(Catalog.Entry.of(new TypeKey("colesico.framework.resource.internal.ResourceKitImpl"),false))){
catalog.add(getResourceKitImplFactory1());
}
if(catalog.accept(Catalog.Entry.of(new TypeKey("colesico.framework.resource.internal.LocalizingTool"),false))){
catalog.add(getLocalizingToolFactory2());
}
if(catalog.accept(Catalog.Entry.of(new TypeKey("colesico.framework.resource.internal.RewritingTool"),false))){
catalog.add(getRewritingToolFactory3());
}
if(catalog.accept(Catalog.Entry.of(new TypeKey("colesico.framework.resource.internal.EvaluationTool"),false))){
catalog.add(getEvaluationToolFactory4());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy