@Override public Set<Class<? extends Annotation>> serviceAnnotations() { return CollectionUtils.annotationClassSet(Service.class); } }
public final T get() { T localInstance = instance; if (localInstance == null) { synchronized (this) { localInstance = instance; if (localInstance == null) { instance = localInstance = create(); } } } return localInstance; }
public void addProxyMethod(final ProxyMethodElement proxyMethod) { proxyMethods.add(proxyMethod); proxyMethod.parentService = this; }
@Override public final ProfileWriterConfig create(final Object message) { return producer.get().getProfileWriterConfig(); } };
public static <S> ServiceLocator<S> of(Class<?> caller, Class<S> service, ClassLoader classLoader) { return new ServiceLocator<>(caller, service, classLoader, null); }
public ServiceElement(ClassElement originClass, ClassType customScopeType) { this.originClass = originClass; this.customScopeType = customScopeType; this.interfaces = new Elements<>(); this.proxyMethods = new Elements<>(); this.fields = new Elements<>(); this.customMethods = new Elements<>(); this.constructorExtraCode = new Elements<>(); this.teleFacades = new Elements<>(); this.properties = new HashMap(); }
/** * Builds the array with arguments as its elements * @param objs * @return */ public static Object[] toArray(Object... objs) { List result = toList(objs); return result.toArray(); }
@Override public final DataSource get(final Object message) { return producer.get().hikariDataSourceFactory((HikariConfiguration)message); } };
@Override public Set<Class<? extends Annotation>> serviceAnnotations() { return CollectionUtils.annotationClassSet(Restlet.class); } }
public void addConstuctorExtraCode(CodeBlock cb) { constructorExtraCode.add(cb); }
public static <S> ServiceLocator<S> of(Class<?> caller, Class<S> service, ClassLoader classLoader, Predicate<Class<? extends S>> classFilter) { return new ServiceLocator<>(caller, service, classLoader, classFilter); }
@Override public final PrincipalWriterConfig create(final Object message) { return producer.get().getPrincipalWriterConfig(); } };
@Override public Set<Class<? extends Annotation>> serviceAnnotations() { return CollectionUtils.annotationClassSet(Weblet.class); }
public static <S> ServiceLocator<S> of(Class<?> caller, Class<S> service) { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return new ServiceLocator<>(caller, service, classLoader, null); }
@Override public final WebletTeleReader create(final Object message) { return producer.get().getFloatReader(this.implFac.get(message)); } };
public static <S> ServiceLocator<S> of(Class<?> caller, Class<S> service, Predicate<Class<? extends S>> classFilter) { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return new ServiceLocator<>(caller, service, classLoader, classFilter); }
@Override public final WebletTeleReader create(final Object message) { return producer.get().getHttpFileReader(this.implFac.get(message)); } };
@Override public final ResourceConfig create(final Object message) { return producer.get().getResourceConf(this.configFac.get(message)); } };
@Override public final TranslationKit create(final Object message) { return producer.get().getTranslationKit(this.implFac.get(message)); } };