- All Superinterfaces:
Info,ReporterInfo
A module info holds the data required to process a module.
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescription<R, P> Raccept(ModuleInfoVisitor<R,P> visitor, P p)Accepts the specified module info visitor.Returns an optional containing the bean identified by the specified name if it exists in the module.getBeans()Returns the beans specified in the module.Returns the module element.Returns the modules required by the module.Returns the private beans specified in the module.Returns the public beans specified in the module.Returns a module qualified name.Returns the socket beans specified in the module.intReturns the module's version.booleanisFaulty()Determines whether the module info is faulty.Methods inherited from interface io.inverno.core.compiler.spi.ReporterInfo
error, hasError, hasWarning, warning
-
Method Details
-
getElement
ModuleElement getElement()Returns the module element.
- Returns:
- A module element
-
getQualifiedName
ModuleQualifiedName getQualifiedName()Returns a module qualified name.
- Specified by:
getQualifiedNamein interfaceInfo- 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 required by 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
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
Accepts the specified module info visitor.
- Type Parameters:
R- the type of the visitor resultP- the type of the visitor parameter- Parameters:
visitor- the visitor to invokep- 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
-