Skip to content

Commit a5c65f0

Browse files
committed
Javadoc improvement to emphasize that ResolvedType.getImplementedInterfaces() only returns directly implemented ones, not transitive.
1 parent dca5708 commit a5c65f0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/java/com/fasterxml/classmate/ResolvedType.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ public final boolean canCreateSubtype(Class<?> subtype) {
9090

9191
/**
9292
* Returns ordered list of interfaces (in declaration order) that this type
93-
* implements.
93+
* <b>directly</b> implements.
94+
* NOTE: returned list does NOT include transitively implemented types (that is,
95+
* interfaces implemented by parent classes or interfaces).
9496
*
95-
* @return List of interfaces this type implements, if any; empty list if none
97+
* @return List of interfaces this type implements, if any; empty list if none (never
98+
* {@code null}).
9699
*/
97100
public abstract List<ResolvedType> getImplementedInterfaces();
98101

src/test/java/com/fasterxml/classmate/types/ResolvedInterfaceTypeTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
import org.junit.Test;
66

7-
import static junit.framework.Assert.*;
7+
import static org.junit.Assert.*;
88

99
/**
1010
* @author blangel
1111
*/
12-
@SuppressWarnings("deprecation")
1312
public class ResolvedInterfaceTypeTest {
1413

1514
private static interface Parent { }

0 commit comments

Comments
 (0)