if (declaredInterface.isInterface())
return declaredInterface;
// Not an interface ... a class. Synthesize an interface from the class itself.
InterfaceSynthesizer is = (InterfaceSynthesizer) getModule().getService(
HiveMind.INTERFACE_SYNTHESIZER_SERVICE,
InterfaceSynthesizer.class);
return is.synthesizeInterface(declaredInterface);
}