Skip to content

Commit 98ec565

Browse files
committed
docs: add extract documentation
1 parent 3fc33df commit 98ec565

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

operator-framework-quarkus-extension/deployment/src/main/java/io/javaoperatorsdk/quarkus/extension/deployment/QuarkusExtensionProcessor.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,20 @@ private static class ValueExtractor {
194194
this.extContConfig = extContConfig;
195195
}
196196

197+
/**
198+
* Extracts the appropriate configuration value for the controller checking first any annotation
199+
* configuration, then potentially overriding it by a properties-provided value or returning a
200+
* default value if neither is provided.
201+
*
202+
* @param extractor a Function extracting the optional value we're interested in from the
203+
* external configuration
204+
* @param annotationField the name of the {@link Controller} annotation we're want to retrieve
205+
* if present
206+
* @param converter a Function converting the annotation value to the type we're expecting
207+
* @param defaultValue a Supplier that computes/retrieve a default value when needed
208+
* @param <T> the expected type of the configuration value we're trying to extract
209+
* @return the extracted configuration value
210+
*/
197211
<T> T extract(
198212
Function<ExternalControllerConfiguration, Optional<T>> extractor,
199213
String annotationField,

0 commit comments

Comments
 (0)