colesico.framework.weblet.t9n.WebletMessagesT9nIoclet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of colesico-weblet Show documentation
Show all versions of colesico-weblet Show documentation
Colesico framework http requests handling service
// This is automatically generated file. Do not modify!
package colesico.framework.weblet.t9n;
import colesico.framework.assist.LazySingleton;
import colesico.framework.assist.codegen.Genstamp;
import colesico.framework.ioc.ioclet.AdvancedIoc;
import colesico.framework.ioc.ioclet.Catalog;
import colesico.framework.ioc.ioclet.Factory;
import colesico.framework.ioc.ioclet.Ioclet;
import colesico.framework.ioc.ioclet.SingletonFactory;
import colesico.framework.ioc.key.TypeKey;
import colesico.framework.ioc.production.InstanceProducingException;
import colesico.framework.translation.TranslationKit;
@Genstamp(
generator = "colesico.framework.ioc.codegen.generator.IocletGenerator",
timestamp = "2020-04-23T17:31:26.288Z",
hashId = "f9181c16-4ca9-4a92-9551-a5c780e27849",
comments = "Producer: ClassElement{originElement=colesico.framework.weblet.t9n.WebletMessagesT9nProducer}"
)
public final class WebletMessagesT9nIoclet implements Ioclet {
private final LazySingleton producer = new LazySingleton() {
@Override
public final WebletMessagesT9nProducer create() {
return new WebletMessagesT9nProducer();
}
};
@Override
public final String getId() {
return "colesico.framework.weblet.t9n.WebletMessagesT9nProducer";
}
/**
* Factory to produce colesico.framework.weblet.t9n.WebletMessages class instance
* Scope: UNSCOPED; Custom: null
*/
public Factory getWebletMessages0Factory0() {
return new Factory() {
private Factory implFac;
@Override
public final void setup(final AdvancedIoc ioc) {
// Initialize dependencies for: colesico.framework.weblet.t9n.WebletMessages
this.implFac = ioc.factory(new TypeKey(WebletMessagesImpl.class));
}
@Override
public final WebletMessages get(final Object message) {
try {
// Perform instance producing
WebletMessages instance = producer.get().getWebletMessages0(this.implFac.get(message));
return instance;
} catch (InstanceProducingException ipe) {
throw ipe;
} catch (Throwable t) {
throw new InstanceProducingException(t, WebletMessages.class);
}
}
};
}
/**
* Factory to produce colesico.framework.weblet.t9n.WebletMessagesImpl class instance
* Scope: SINGLETON; Custom: null
*/
public Factory getWebletMessagesImplFactory1() {
return new SingletonFactory() {
private Factory translationKitFac;
@Override
public final void setup(final AdvancedIoc ioc) {
// Initialize dependencies for: colesico.framework.weblet.t9n.WebletMessagesImpl
this.translationKitFac = ioc.factory(new TypeKey(TranslationKit.class));
}
@Override
public final WebletMessagesImpl create(final Object message) {
try {
// Perform instance producing
WebletMessagesImpl instance = new WebletMessagesImpl(this.translationKitFac.get(message));
// Post construct listeners invocations:
return instance;
} catch (InstanceProducingException ipe) {
throw ipe;
} catch (Throwable t) {
throw new InstanceProducingException(t, WebletMessagesImpl.class);
}
}
};
}
@Override
public final void addFactories(final Catalog catalog) {
if(catalog.accept(new TypeKey("colesico.framework.weblet.t9n.WebletMessages"), null, null, false)){
catalog.add(getWebletMessages0Factory0());
}
if(catalog.accept(new TypeKey("colesico.framework.weblet.t9n.WebletMessagesImpl"), null, null, false)){
catalog.add(getWebletMessagesImplFactory1());
}
}
}