private static void getAllMethods(Type type, List<RestMethod> methods) {
// Don't walk up beyond our classes.
if (type != null && type.qualifiedTypeName().startsWith("org.candlepin")) {
ClassDoc classDoc = type.asClassDoc();
getAllMethods(classDoc.superclassType(), methods);
for (MethodDoc methodDoc : classDoc.methods()) {
if (methodDoc.isPublic()) {
methods.add(new RestMethod(methodDoc));
}
}