You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say I got this aspect @Timed in module A (with a target of TimedAspect.class), and I try to use @Timed on a method in module B. The generated proxy class in module b is:
@Proxy
@Generated("io.avaje.inject.generator")
public final class ServiceClass$Proxy extends ServiceClass {
private Method callDownStream0;
private MethodInterceptor callDownStream0Timed;
public ServiceClass$Proxy(AspectProvider<Timed> timed, ApiClient api) {
super(api);
try {
callDownStream0 = ServiceClass.class.getDeclaredMethod("callDownStream");
callDownStream0Timed = timed.interceptor(callDownStream0, callDownStream0.getAnnotation(Timed.class));
} catch (Exception e) {
throw new IllegalStateException(e);
}
}
@Override
public byte[] callDownStream() {
var call = new Invocation.Call<>(() -> super.callDownStream())
.with(this, callDownStream0);
try {
callDownStream0Timed.invoke(call);
return call.finalResult();
} catch (InvocationException e) {
throw e;
} catch (Throwable e) {
throw new InvocationException(e);
}
}
}
Currently, module b fails to compile with
No dependency provided for io.avaje.inject.aop.AspectProvider<com.jojo.javalin.api.aspect.Timed> on
com.jojo.javalin.shade.service.ServiceClass$Proxy
Currently the only way to get an annotation from module A to work with module B, is to add an explicit @InjectModules(provides=TimedAspect.class) to module A.
One would expect that auto provide aspects would eliminate the need for explicit @InjectModules provides.
The text was updated successfully, but these errors were encountered:
Say I got this aspect
@Timed
in module A (with a target ofTimedAspect.class
), and I try to use@Timed
on a method in module B. The generated proxy class in module b is:Currently, module b fails to compile with
Currently the only way to get an annotation from module A to work with module B, is to add an explicit
@InjectModules(provides=TimedAspect.class)
to module A.One would expect that auto provide aspects would eliminate the need for explicit @InjectModules provides.
The text was updated successfully, but these errors were encountered: