Class YObjectLoader<T>


  • public class YObjectLoader<T>
    extends Object
    • Constructor Detail

      • YObjectLoader

        public YObjectLoader()
    • Method Detail

      • loadObject

        public static <T> T loadObject​(String className,
                                       Object... args)
                                throws ConfigurationException
        Loads classes defined in the yamcs server or client configuration properties
        Parameters:
        className -
        args -
        Returns:
        an object of the given class instantiated with the given parameters
        Throws:
        ConfigurationException
      • loadObject

        public static <T> T loadObject​(Map<String,​Object> conf)
                                throws ConfigurationException,
                                       IOException
        loads an object defined like this: class: org.yamcs.... args: key1: value1 key2: value2 "args" can also be called "config" or can be missing. The value of args can also be a list or a scalar type. args can also be called config or spec. If args is present, then a constructor with the given type is invoked otherwise the constructor without any argument is invoked.
        Parameters:
        conf -
        Returns:
        a new object
        Throws:
        IOException
        ConfigurationException