Class ReflectionUtil


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean containsFieldsFlaggedWithRestart​(java.lang.Class<? extends com.yahoo.config.ConfigInstance> configClass)
      Determines if the config definition for the given config class contains key-values flagged with restart.
      static java.util.Set<com.yahoo.vespa.config.ConfigKey<?>> getAllConfigsProduced​(java.lang.Class<? extends ConfigProducer> producerClass, java.lang.String configId)  
      static java.util.List<java.lang.Class<?>> getAllSuperclasses​(java.lang.Class<?> cls)  
      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.
      static boolean hasRestartMethods​(java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getAllConfigsProduced

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

        public static boolean hasRestartMethods​(java.lang.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​(java.lang.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 java.util.List<java.lang.Class<?>> getAllSuperclasses​(java.lang.Class<?> cls)