Interface CodeConnector.Plugin

  • Enclosing class:
    CodeConnector<D extends CodeDelegate>

    public static interface CodeConnector.Plugin
    Plugin implementations should be registered via service loader mechanism to extend behaviour of CodeConnectors.
    • Method Detail

      • analyseField

        default boolean analyseField​(CodeConnector<?> connector,
                                     Field field)
        Analyse the given field, configuring the CodeConnector as required. This function should return true if the plugin has taken "ownership" of the provided field and no further processing should be done. Default implementation always returns false.
        Parameters:
        connector - code connector
        field - field to analyse
        Returns:
        true if processing should stop
      • analyseMethod

        default boolean analyseMethod​(CodeConnector<?> connector,
                                      Method method)
        Analyse the given method, configuring the CodeConnector as required. This function should return true if the plugin has taken "ownership" of the provided method and no further processing should be done. Default implementation always returns false.
        Parameters:
        connector - code connector
        method - method to analyse
        Returns:
        true if processing should stop
      • isSupportedConnector

        default boolean isSupportedConnector​(CodeConnector<?> connector)
        Check whether the provided CodeConnector is supported (eg. right type). If this method returns false then this plugin will not be used for processing any fields and methods by the connector. Default implementation always returns true.
        Parameters:
        connector - code connector to verify
        Returns:
        true if connector is supported