Class ReflectionUtil


  • public final class ReflectionUtil
    extends Object
    Utility class containing static methods for retrieving information about the config producer tree.
    Author:
    Ulf Lilleengen, bjorncs, gjoranv
    • Method Detail

      • getAllConfigsProduced

        public static Set<com.yahoo.vespa.config.ConfigKey<?>> getAllConfigsProduced​(Class<? extends ConfigProducer> producerClass,
                                                                                     String configId)
      • hasRestartMethods

        public static boolean hasRestartMethods​(Class<? extends com.yahoo.config.ConfigInstance> configClass)
        Determines if the config class contains the methods required for detecting config value changes between two config instances.
      • containsFieldsFlaggedWithRestart

        public static boolean containsFieldsFlaggedWithRestart​(Class<? extends com.yahoo.config.ConfigInstance> configClass)
        Determines if the config definition for the given config class contains key-values flagged with restart.
      • getChangesRequiringRestart

        public static com.yahoo.config.ChangesRequiringRestart getChangesRequiringRestart​(com.yahoo.config.ConfigInstance from,
                                                                                          com.yahoo.config.ConfigInstance to)
        Compares the config instances and lists any differences that will require service restart.
        Parameters:
        from - The previous config.
        to - The new config.
        Returns:
        An object describing the difference.
      • getAllSuperclasses

        public static List<Class<?>> getAllSuperclasses​(Class<?> cls)