retrofit2.RetrofitUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ergo-appkit_2.11 Show documentation
Show all versions of ergo-appkit_2.11 Show documentation
A Library for Polyglot Development of Ergo Applications
The newest version!
package retrofit2;
import javax.annotation.Nullable;
import java.lang.reflect.Method;
/**
* This class provides access to package-private {@link Retrofit#loadServiceMethod(Method)}
* which is required to bypass usual proxy generation which doesn't work under Graal native-image.
*
* @see "ErgoNodeFacade in lib-impl"
*/
public class RetrofitUtil {
static private final Object[] emptyArgs = new Object[0];
@Nullable
static public Call invokeServiceMethod(Retrofit r, Method m, Object[] args) {
return (Call)r.loadServiceMethod(m).invoke(args != null ? args : emptyArgs);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy