org.springframework.context.event

## 接口 SmartApplicationListener

- 所有超级接口:
    ApplicationListener<ApplicationEvent>, EventListener, org.springframework.core.Ordered
  所有已知实现类:
    GenericApplicationListenerAdapter, SourceFilteringListener

      public interface SmartApplicationListener
      extends ApplicationListener<ApplicationEvent>, org.springframework.core.Ordered

  Extended variant of the standard `ApplicationListener` interface, exposing further metadata such as the supported event and source type.

  For full introspection of generic event types, consider implementing the `GenericApplicationListener` interface instead.

  从以下版本开始:
    3.0
  作者:
    Juergen Hoeller
  另请参阅:
    `GenericApplicationListener`, `GenericApplicationListenerAdapter`

- - ### 字段概要

    - ### 从接口继承的字段 org.springframework.core.Ordered

      `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

  - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `supportsEventType(Class<? extends ApplicationEvent> eventType)` Determine whether this listener actually supports the given event type.
    `boolean` | `supportsSourceType(Class<?> sourceType)` Determine whether this listener actually supports the given source type.

    - ### 从接口继承的方法 org.springframework.context.ApplicationListener

      `onApplicationEvent`

    - ### 从接口继承的方法 org.springframework.core.Ordered

      `getOrder`

- - ### 方法详细资料

    - #### supportsEventType

          boolean supportsEventType(Class<? extends ApplicationEvent> eventType)

      Determine whether this listener actually supports the given event type.
      参数:
        `eventType` - the event type (never `null`)

    - #### supportsSourceType

          boolean supportsSourceType(@Nullable
                                     Class<?> sourceType)

      Determine whether this listener actually supports the given source type.
      参数:
        `sourceType` - the source type, or `null` if no source