Package ghidra.framework.plugintool.util

# Class AutoServiceListener<R>

java.lang.Object
ghidra.framework.plugintool.util.AutoServiceListener<R>

All Implemented Interfaces:
  `ServiceListener`

public class AutoServiceListener<R> extends Object implements ServiceListener

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected static class`
  `AutoServiceListener.FieldServiceSetter<R,S>`
  `protected static class`
  `AutoServiceListener.MethodServiceSetter<R,S>`
  `protected static class`
  `AutoServiceListener.ReceiverProfile<R>`
  `protected static interface`
  `AutoServiceListener.ServiceSetter<R,S>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final AutoServiceListener.ReceiverProfile<R>`
  `profile`
  `protected static final Map<Class<?>,AutoServiceListener.ReceiverProfile<?>>`
  `PROFILES_BY_RECEIVER_CLASS`
  `protected final R`
  `receiver`
  `protected static final Map<Class<?>,Set<AutoServiceListener.ServiceSetter<?,?>>>`
  `SETTERS_BY_RECEIVER_CLASS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AutoServiceListener(R receiver)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected static <R> Set<AutoServiceListener.ServiceSetter<R,?>>`
  `collectSettersByReceiver(Class<R> cls)`
  `void`
  `notifyCurrentServices(PluginTool tool)`
  `void`
  `serviceAdded(Class<?> iface, Object service)`
  Notifies the listener that a service has been added to the tool.
  `void`
  `serviceRemoved(Class<?> iface, Object service)`
  Notifies the listener that a service has been removed from the tool.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### SETTERS_BY_RECEIVER_CLASS

    protected static final Map<Class<?>,Set<AutoServiceListener.ServiceSetter<?,?>>> SETTERS_BY_RECEIVER_CLASS

  - ### PROFILES_BY_RECEIVER_CLASS

    protected static final Map<Class<?>,AutoServiceListener.ReceiverProfile<?>> PROFILES_BY_RECEIVER_CLASS

  - ### receiver

    protected final R receiver

  - ### profile

    protected final AutoServiceListener.ReceiverProfile<R> profile

- ## Constructor Details

  - ### AutoServiceListener

    public AutoServiceListener(R receiver)

- ## Method Details

  - ### collectSettersByReceiver

    protected static <R> Set<AutoServiceListener.ServiceSetter<R,?>> collectSettersByReceiver(Class<R> cls)

  - ### serviceAdded

    public void serviceAdded(Class<?> iface, Object service)
    Description copied from interface: `ServiceListener`
    Notifies the listener that a service has been added to the tool.
    Specified by:
      `serviceAdded` in interface `ServiceListener`
    Parameters:
      `iface` - the interface class that the given service implements.
      `service` - the implementation of the service.

  - ### serviceRemoved

    public void serviceRemoved(Class<?> iface, Object service)
    Description copied from interface: `ServiceListener`
    Notifies the listener that a service has been removed from the tool.
    Specified by:
      `serviceRemoved` in interface `ServiceListener`
    Parameters:
      `iface` - the interface class that the given service implements.
      `service` - the implementation of the service.

  - ### notifyCurrentServices

    public void notifyCurrentServices(PluginTool tool)