Method resolveClass
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public Class<?> resolveClass(String clsnm) throws ClassNotFoundException {
if (clsnm.indexOf('.') < 0) {
if (_clses != null) {
final Class<?> cls = _clses.get(clsnm);
if (cls != null)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method addImportedClass
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public void addImportedClass(String clsptn)
throws ClassNotFoundException {
if (clsptn == null || (clsptn = clsptn.trim()).length() == 0)
throw new IllegalArgumentException("empty");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method addAll
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void addAll(ImportedClassResolver resolver) {
if (resolver._pkgs != null) {
if (_pkgs == null)
_pkgs = new LinkedList<String>();
for (String pkg: resolver._pkgs) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getImportedClasses
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public List<String> getImportedClasses() {
final List<String> lst = new LinkedList<String>();
if (_clses != null)
for (Class<?> cls: _clses.values())
lst.add(cls.getName());
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"