Interface ModuleInfo

All Superinterfaces:
Info, ReporterInfo

public interface ModuleInfo extends Info

A module info holds the data required to process a module.

Author:
Jeremy Kuhn
  • Method Details

    • getElement

      ModuleElement getElement()

      Returns the module element.

      Returns:
      A module element
    • getQualifiedName

      ModuleQualifiedName getQualifiedName()

      Returns a module qualified name.

      Specified by:
      getQualifiedName in interface Info
      Returns:
      a module qualified name
    • getVersion

      int getVersion()

      Returns the module's version.

      In case of a binary module, it must correspond to the version of the compiler that were used to generate the module.

      In case of a compiled module, it must correspond to the version of the current compiler.

      Returns:
      A version
    • getModules

      ModuleInfo[] getModules()

      Returns the modules composed in the module.

      Returns:
      an array of module info
    • getSockets

      SocketBeanInfo[] getSockets()

      Returns the socket beans specified in the module.

      A socket bean defines an entry point for dependency injection on the module.

      Returns:
      an array of socket beans
    • getBean

      Optional<ModuleBeanInfo> getBean(String name)

      Returns an optional containing the bean identified by the specified name if it exists in the module.

      Parameters:
      name - the name of the bean in the module to return
      Returns:
      an optional
    • getBeans

      ModuleBeanInfo[] getBeans()

      Returns the beans specified in the module.

      Returns:
      an array of beans
    • getPrivateBeans

      ModuleBeanInfo[] getPrivateBeans()

      Returns the private beans specified in the module.

      Returns:
      an array of beans
    • getPublicBeans

      ModuleBeanInfo[] getPublicBeans()

      Returns the public beans specified in the module.

      Returns:
      an array of beans
    • accept

      <R, P> R accept(ModuleInfoVisitor<R,P> visitor, P p)

      Accepts the specified module info visitor.

      Type Parameters:
      R - the type of the visitor result
      P - the type of the visitor parameter
      Parameters:
      visitor - the visitor to invoke
      p - the parameter
      Returns:
      the visitor result
    • isFaulty

      boolean isFaulty()

      Determines whether the module info is faulty.

      A module can be faulty for several reasons: name conflicts, cycles detected in the dependency graph, unresolved dependencies...

      Returns:
      true if the module is faulty, false otherwise
    • isEmpty

      boolean isEmpty()

      Determines whether the module is empty.

      An module is empty when it does not define any bean, nor component module. No module class should be generated for an empty module.

      Returns:
      true if the module is empty, false otherwise