Is it possible to inject a local variable in java for a static method, like
@Inject
public void someMethod()
{
@MyInjectQualifier MyObjectClass myobject;
// use myobject here
}
Is it possible to inject a local variable in java for a static method, like
@Inject
public void someMethod()
{
@MyInjectQualifier MyObjectClass myobject;
// use myobject here
}
No, you cannot inject a value into a local variable through annotation processing at runtime.
© 2022 - 2024 — McMap. All rights reserved.
static
anywhere... – Haematogenesis