Begin on platform abstraction interface

This commit is contained in:
Kneelawk 2024-04-17 17:22:12 -07:00 committed by Jozufozu
parent dbd8106b4a
commit f227c44ec8
3 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,22 @@
package com.jozufozu.flywheel.platform;
import java.lang.reflect.InvocationTargetException;
public abstract class ClientPlatform {
private static final ClientPlatform INSTANCE;
static {
try {
INSTANCE =
(ClientPlatform) Class.forName("com.jozufozu.flywheel.platform.ClientPlatformImpl").getConstructor()
.newInstance();
} catch (ClassNotFoundException | InvocationTargetException | InstantiationException | IllegalAccessException |
NoSuchMethodException e) {
throw new RuntimeException(e);
}
}
public static ClientPlatform getInstance() {
return INSTANCE;
}
}

View file

@ -0,0 +1,4 @@
package com.jozufozu.flywheel.platform;
public class ClientPlatformImpl extends ClientPlatform {
}

View file

@ -0,0 +1,4 @@
package com.jozufozu.flywheel.platform;
public class ClientPlatformImpl extends ClientPlatform {
}