Skip to content

Commit

Permalink
Add missing method (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehutch committed Aug 16, 2021
1 parent 9d393db commit 2f872ff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/io/github/classgraph/ScanResult.java
Expand Up @@ -936,6 +936,17 @@ public ClassInfoList getSuperclasses(final String subclassName) {
return subclass == null ? ClassInfoList.EMPTY_LIST : subclass.getSuperclasses();
}

/**
* Get superclasses of the subclass.
*
* @param subclass
* The subclass.
* @return A list of superclasses of the named subclass, or the empty list if none.
*/
public ClassInfoList getSuperclasses(final Class<?> subclass) {
return getSuperclasses(subclass.getName());
}

/**
* Get classes that have a method with an annotation of the named type.
*
Expand Down

0 comments on commit 2f872ff

Please sign in to comment.