Why Some Classes are Not Importable

Even all classes I have ever seen in SDK says public some classes are not importable like RemoteHistorianSettingsRecord (inductiveautomation.com)

Why? or How to import Those?

See my comment on the other thread.

1 Like

Thanks @pturmel, Nice info. I’ve been trying reflection and interfaces with no luck. I’m in a death stop in this.

1 Like

IgnitionGateway => ModuleManager => (lookup module, returns GatewayHook) => get hook’s classloader => ask that classloader to look up desired class => use reflection on class to use static methods and/or constuctors.

Have fun!

{ I shouldn’t have to say it, but breakage is easy, and there’s no support. Nada. Don’t experiment with any of this on a production system. }

1 Like

hmmm, the class loader should be done with Configure Serializer and xlm serializer?
Is lang.reflect the correct class one for reflection?

Yes, hehe this is just a dev environment.

Spend some time studying java.lang.Class.

1 Like

You can skip some of those steps; if you have a GatewayContext, you can ask it for the ModuleManager then ask the module manager to resolve your class by name.

2 Likes

oooo! Never noticed that method.

just amazing