Package it.unive.lisa

Class LiSAFactory


  • public final class LiSAFactory
    extends java.lang.Object
    An utility class for instantiating analysis components, that is, modular pieces of the analysis that have several implementations. A specific instance can be retrieved through getInstance(Class, Object...). Moreover, configurableComponents() yields a list of each modular LiSA component.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  LiSAFactory.ConfigurableComponent
      An analysis component that can be configured, that is, it has more than one implementation that can be modularly integrated into the analysis.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Collection<LiSAFactory.ConfigurableComponent> configurableComponents()
      Yields the collection of LiSAFactory.ConfigurableComponents that can be used to customize the analysis.

      Note that all information present in the returned instances reflect the information known to LiSA when this component is created, that is, what is present inside the classpath and already loaded by the JVM.
      static <T> T getInstance​(java.lang.Class<T> component, java.lang.Object... params)
      Creates an instance of the given component.
      • Methods inherited from class java.lang.Object

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

      • getInstance

        public static <T> T getInstance​(java.lang.Class<T> component,
                                        java.lang.Object... params)
                                 throws it.unive.lisa.AnalysisSetupException
        Creates an instance of the given component. If params are provided, a suitable (and not ambiguous) constructor must exist in component's class. Otherwise, the nullary constructor of component is invoked.
        Type Parameters:
        T - the type of the component
        Parameters:
        component - the component to instantiate
        params - the parameters for the creation
        Returns:
        an instance of the given component
        Throws:
        it.unive.lisa.AnalysisSetupException - if the component cannot be created
      • configurableComponents

        public static java.util.Collection<LiSAFactory.ConfigurableComponent> configurableComponents()
        Yields the collection of LiSAFactory.ConfigurableComponents that can be used to customize the analysis.

        Note that all information present in the returned instances reflect the information known to LiSA when this component is created, that is, what is present inside the classpath and already loaded by the JVM.
        Returns:
        the components that can be configured