Skip to content

Commit

Permalink
Added Javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
sarpsahinalp committed Aug 5, 2024
1 parent afa652e commit b206405
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public CustomClassResolver() {
*/
public Optional<JavaClass> tryResolve(String typeName) {
try {
// Try to resolve the class by the given type name.
return Optional.ofNullable(allClasses.get(typeName));
} catch (IllegalArgumentException e) {
return Optional.empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ private Set<JavaAccess<?>> getDirectAccessTargetsOutsideOfAnalyzedClasses(JavaAc
Set<JavaClass> subclasses = resolvedTarget.getSubclasses().stream().map(this::resolveTargetOwner).collect(toSet());
subclasses.add(resolvedTarget);

/**
* If the number of subclasses is more than 20, return an empty set.
* These classes are always generic interfaces or abstract classes
* TODO: Check if this is also the case for foreign packages
*/
if (subclasses.size() > 20) {
return Collections.emptySet();
}
Expand Down

0 comments on commit b206405

Please sign in to comment.