Package it.unive.lisa
Class LiSAFactory
- java.lang.Object
-
- it.unive.lisa.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 throughgetInstance(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 ofLiSAFactory.ConfigurableComponent
s 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 givencomponent
.
-
-
-
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 givencomponent
. Ifparams
are provided, a suitable (and not ambiguous) constructor must exist incomponent
's class. Otherwise, the nullary constructor ofcomponent
is invoked.- Type Parameters:
T
- the type of the component- Parameters:
component
- the component to instantiateparams
- 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 ofLiSAFactory.ConfigurableComponent
s 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
-
-