Class AcceptableModuleCouplingOrError
java.lang.Object
org.ek9lang.compiler.phase5.AcceptableModuleCouplingOrError
- All Implemented Interfaces:
BiConsumer<String, List<ParsedModule>>
class AcceptableModuleCouplingOrError
extends Object
implements BiConsumer<String, List<ParsedModule>>
Validates module-level efferent coupling against threshold and emits E11016 error if exceeded.
Unlike AcceptableCouplingOrError (construct-level), this operates at the module level
after all files in a module have been processed.
Module coupling counts the number of distinct external modules that a module depends on. High module coupling indicates a module that depends on too many other modules, making it fragile and difficult to maintain.
Threshold: 10 external modules (based on software architecture best practices, Martin 2002 "Agile Software Development").
-
Constructor Summary
ConstructorsConstructorDescriptionAcceptableModuleCouplingOrError(ModuleCouplingTracker moduleCouplingTracker, ModuleErrorListenerLookup errorListenerLookup) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(String moduleName, List<ParsedModule> parsedModules) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
AcceptableModuleCouplingOrError
AcceptableModuleCouplingOrError(ModuleCouplingTracker moduleCouplingTracker, ModuleErrorListenerLookup errorListenerLookup)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceBiConsumer<String, List<ParsedModule>>
-