Package ghidra.framework.plugintool
Class ServiceProviderDecorator
java.lang.Object
ghidra.framework.plugintool.ServiceProviderDecorator
- All Implemented Interfaces:
ServiceProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddServiceListener(ServiceListener listener) Adds a listener that will be called as services are added and removed from this ServiceProvider.static ServiceProviderDecoratorstatic ServiceProviderDecoratordecorate(ServiceProvider delegate) <T> TgetService(Class<T> serviceClass) Returns the Service object that implements the given service interface.<T> voidoverrideService(Class<T> serviceClass, Object service) Adds a service that will override any service contained in the delegateServiceProvider.voidremoveServiceListener(ServiceListener listener) Removes the given listener from this ServiceProvider.
-
Method Details
-
decorate
-
createEmptyDecorator
-
overrideService
Adds a service that will override any service contained in the delegateServiceProvider.Note: this will not notify any clients that services have been changed. This means that you should call this method before passing this service provider on to your clients.
- Parameters:
serviceClass- the service classservice- the service implementation
-
getService
Description copied from interface:ServiceProviderReturns the Service object that implements the given service interface.- Specified by:
getServicein interfaceServiceProvider- Parameters:
serviceClass- the interface class.
-
addServiceListener
Description copied from interface:ServiceProviderAdds a listener that will be called as services are added and removed from this ServiceProvider.- Specified by:
addServiceListenerin interfaceServiceProvider- Parameters:
listener- The listener to add.
-
removeServiceListener
Description copied from interface:ServiceProviderRemoves the given listener from this ServiceProvider. This method does nothing if the given listener is not contained by this ServiceProvider.- Specified by:
removeServiceListenerin interfaceServiceProvider- Parameters:
listener-
-