So with some feedback from IA, I’ve spun up a new version, and I consider this one to be a release candidate.
Two changes were made:
-
The classes/interfaces to be checked within the adapter itself were adjusted to include the VisionComponent interface. I left the DynamicPropertyProvider interface in the checklist in case there are third-party modules supplying components without the VisionComponent interface.
-
The static block in my module hook was changed to first check if
Py.java2py()
yields a properly wrapped generic component. Like so:
static {
PyObject pyo = Py.java2py(new PMILabel());
if (!PyComponentWrapper.class.isInstance(pyo))
Py.getAdapter().addPostClass(new PyComponentAdapter());
}
This is to avoid doubling up the adapter when IA adds this functionality to the base install.
( A doubled adapter wouldn’t really hurt anything, but for an itty-bitty conversion delay. )