aledsage commented on a change in pull request #1046: allow the types of
parameters to be extended programmatically
URL: https://github.com/apache/brooklyn-server/pull/1046#discussion_r258416994
##########
File path:
core/src/main/java/org/apache/brooklyn/core/objs/BasicSpecParameter.java
##########
@@ -197,6 +199,15 @@ public String toString() {
return type;
}
+ /** Allows extensions to define additional types that are supported for
parameters in YAML.
+ * Rules should return a TypeToken if the given name is known, null if not
handled, or
+ * throw if the name is decisively problematic. Handlers will throw if no
rules match.
+ */
+ @Beta
+ public static void addCustomTypeNameInference(String ruleName,
BiFunction<String,BrooklynClassLoadingContext,TypeToken<?>> rule) {
Review comment:
I don't see anything calling this method - do we need to add unit test(s)?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services