Package it.unive.lisa

Class LiSAFactory.ConfigurableComponent<T>

  • Type Parameters:
    T - the type of the component
    Enclosing class:
    LiSAFactory

    public static final class LiSAFactory.ConfigurableComponent<T>
    extends java.lang.Object
    An analysis component that can be configured, that is, it has more than one implementation that can be modularly integrated into the analysis. getComponent() yields the component itself, i.e. the interface or abstract class that defines the analysis components. getDefaultInstance() yields the default implementation of the component that will be used if no specific implementation is requested. getAlternatives() yields all the concrete implementations of the components.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.util.Collection<java.lang.Class<? extends T>> getAlternatives()
      Yields the alternatives for this component, that is, the concrete classes that implements it.
      java.lang.Class<T> getComponent()
      Yields the component represented by this LiSAFactory.ConfigurableComponent.
      java.lang.Class<? extends T> getDefaultInstance()
      Yields the default implementation for this component, that is, the concrete class that implements it and that will be used if the component is requested but the user did not specify which implementation to use (among the ones offered by getAlternatives().
      java.lang.Class<?>[] getDefaultParameters()
      Yields the classes of the parameters passed by-default to the constructor of the default implementation for this component.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getDefaultInstance

        public java.lang.Class<? extends T> getDefaultInstance()
        Yields the default implementation for this component, that is, the concrete class that implements it and that will be used if the component is requested but the user did not specify which implementation to use (among the ones offered by getAlternatives(). Might be null if no default is set.
        Returns:
        the default implementation for this component
      • getDefaultParameters

        public java.lang.Class<?>[] getDefaultParameters()
        Yields the classes of the parameters passed by-default to the constructor of the default implementation for this component. Might be null if no default is set, or might be an empty array if the default implementation does not require parameters.
        Returns:
        the classes of the parameters for the construction of the default implementation for this component
      • getAlternatives

        public java.util.Collection<java.lang.Class<? extends T>> getAlternatives()
        Yields the alternatives for this component, that is, the concrete classes that implements it.
        Returns:
        the alternatives for this component
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object