From f7347f37690f235835b5807c4e1fafd4cf291d3b Mon Sep 17 00:00:00 2001 From: Simon Urli Date: Wed, 25 Oct 2017 17:56:53 +0200 Subject: [PATCH] doc: Clarify CtType#getAllMethods documentation (#1644) --- src/main/java/spoon/reflect/declaration/CtType.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/spoon/reflect/declaration/CtType.java b/src/main/java/spoon/reflect/declaration/CtType.java index 5be285baf2a..dcc266295b1 100644 --- a/src/main/java/spoon/reflect/declaration/CtType.java +++ b/src/main/java/spoon/reflect/declaration/CtType.java @@ -206,11 +206,12 @@ public interface CtType extends CtNamedElement, CtTypeInformation, CtTypeMemb * Return all the accessible methods (concrete and abstract) for this type. * It recursively collects all methods from super-classes and super-interfaces. * - * As of 5.3: Really all methods (incl. those of library super-classes - * and Object are returned, thanks to runtime reflection) - * - * Up to 5.2: The recursion stops when the super-type/super-interface is not in the model, - * which means that no method of library super-classes, or of Object are present. + * It includes the methods of types whose source code is in the Spoon model, + * the methods of types from the JDK and from libraries present in the classpath, + * the methods of java.lang.Object (for all CtClass objects). + * However, in noclasspath mode, it does not include methods from unknown types. + * If methods are overridden somewhere in the type hierarchy, it returns only top methods (ie method definitions). + * Each method signature is returned only once */ @DerivedProperty Set> getAllMethods();