Package com.yahoo.config.subscription
Class ConfigInstanceUtil
- java.lang.Object
-
- com.yahoo.config.subscription.ConfigInstanceUtil
-
public class ConfigInstanceUtil extends java.lang.Object
- Author:
- gjoranv
-
-
Constructor Summary
Constructors Constructor Description ConfigInstanceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object
getField(com.yahoo.config.ConfigBuilder builder, java.lang.String fieldName)
Gets the value of a private field on a Builder.static <T extends com.yahoo.config.ConfigInstance>
TgetNewInstance(java.lang.Class<T> type, java.lang.String configId, com.yahoo.vespa.config.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.
-
-
-
Method Detail
-
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(java.lang.Class<T> type, java.lang.String configId, com.yahoo.vespa.config.ConfigPayload payload)
-
getField
public static java.lang.Object getField(com.yahoo.config.ConfigBuilder builder, java.lang.String fieldName)
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
-
-