- 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 Summary
Modifier and TypeMethodDescriptiondefault booleananalyseField(CodeConnector<?> connector, Field field) Analyse the given field, configuring the CodeConnector as required.default booleananalyseMethod(CodeConnector<?> connector, Method method) Analyse the given method, configuring the CodeConnector as required.default booleanisSupportedConnector(CodeConnector<?> connector) Check whether the provided CodeConnector is supported (eg. right type).
-
Method Details
-
analyseField
Analyse the given field, configuring the CodeConnector as required. This function should returntrueif the plugin has taken "ownership" of the provided field and no further processing should be done. Default implementation always returns false.- Parameters:
connector- code connectorfield- field to analyse- Returns:
- true if processing should stop
-
analyseMethod
Analyse the given method, configuring the CodeConnector as required. This function should returntrueif the plugin has taken "ownership" of the provided method and no further processing should be done. Default implementation always returns false.- Parameters:
connector- code connectormethod- method to analyse- Returns:
- true if processing should stop
-
isSupportedConnector
Check whether the provided CodeConnector is supported (eg. right type). If this method returnsfalsethen this plugin will not be used for processing any fields and methods by the connector. Default implementation always returnstrue.- Parameters:
connector- code connector to verify- Returns:
- true if connector is supported
-