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 2f872ff commit 3d50366
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/main/java/io/github/classgraph/ScanResult.java
Expand Up @@ -1063,8 +1063,8 @@ public ClassInfoList getAllInterfaces() {
}

/**
* Get all interfaces implemented by the named class or by one of its superclasses, if this is a standard class,
* or the superinterfaces extended by this interface, if this is an interface.
* Get all interfaces implemented by the named class or by one of its superclasses, if the named class is a
* standard class, or the superinterfaces extended by this interface, if it is an interface.
*
* @param className
* The class name.
Expand All @@ -1082,6 +1082,19 @@ public ClassInfoList getInterfaces(final String className) {
return classInfo == null ? ClassInfoList.EMPTY_LIST : classInfo.getInterfaces();
}

/**
* Get all interfaces implemented by the class or by one of its superclasses, if the given class is a standard
* class, or the superinterfaces extended by this interface, if it is an interface.
*
* @param classRef
* The class.
* @return A list of interfaces implemented by the given class (or superinterfaces extended by the given
* interface), or the empty list if none.
*/
public ClassInfoList getInterfaces(final Class<?> classRef) {
return getInterfaces(classRef.getName());
}

/**
* Get all classes that implement (or have superclasses that implement) the interface (or one of its
* subinterfaces).
Expand Down

0 comments on commit 3d50366

Please sign in to comment.