getMethods abstract method

List<MethodDeclaration> getMethods()

Returns all methods declared in this class, excluding inherited methods.

Methods include instance and static methods, as well as getters and setters. Each method can be inspected via MethodDeclaration for return type, parameters, and invocation.

Example

for (final method in clazz.getMethods()) {
  print('${method.getName()} returns ${method.getReturnType().getName()}');
}

Returns an empty list if the class has no declared methods.

Implementation

List<MethodDeclaration> getMethods();