Package com.yahoo.config.subscription
Class ConfigInstanceUtil
java.lang.Object
com.yahoo.config.subscription.ConfigInstanceUtil
- Author:
- gjoranv
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Gets the value of a private field on a Builder.static <T extends com.yahoo.config.ConfigInstance>
TgetNewInstance
(Class<T> type, String configId, ConfigPayload payload) static <BUILDER extends com.yahoo.config.ConfigBuilder>
voidsetValues
(BUILDER destination, BUILDER source) Copies all values that have been explicitly set on the source to the destination.
-
Constructor Details
-
ConfigInstanceUtil
public ConfigInstanceUtil()
-
-
Method Details
-
setValues
public static <BUILDER extends com.yahoo.config.ConfigBuilder> void setValues(BUILDER destination, BUILDER source) Copies all values that have been explicitly set on the source to the destination. Values that have not been explicitly set in the source builder, will be left unchanged in the destination.- Type Parameters:
BUILDER
- the builder class- Parameters:
destination
- the builder to copy values intosource
- the builder to copy values from. Unset values are not copied
-
getNewInstance
public static <T extends com.yahoo.config.ConfigInstance> T getNewInstance(Class<T> type, String configId, ConfigPayload payload) -
getField
Gets the value of a private field on a Builder.- Parameters:
builder
- aConfigBuilder
fieldName
- a config field name- Returns:
- the value of the private field
-