/**Find all methods in given type and its supertypes, which are not implemented. * Will not return default methods implemented directly in interfaces in impl type closure. * * @param type to inspect * @return list of all unimplemented methods * * @since 0.20 * @since 2.15 does not return default methods */ public List<? extends ExecutableElement> findUnimplementedMethods(TypeElement impl) { return findUnimplementedMethods(impl, impl, false); }
/** * Finds all unimplemented methods in the given type and supertypes, but possibly include * also interface default methods. * <p/> * If the platform configured for the type is older than JDK8, the method is equivalent * to {@link #findUnimplementedMethods(javax.lang.model.element.TypeElement)}. If `includeDefaults' * is {@code true}, returns also default methods as if the methods were required to be * reimplemented by the final class. * * @param impl the implementation type * @param includeDefaults if true, will also return interface default methods, which * are not overriden in supertypes * @return unimplemented (and/or default) methods. * @since 2.15 */ public List<? extends ExecutableElement> findUnimplementedMethods(TypeElement impl, boolean includeDefaults) { return findUnimplementedMethods(impl, impl, includeDefaults); }
/** * Creates implementations of the all abstract methods within a class. * * @param clazz the class to create the implementations within * @return the abstract method implementations * @since 0.20 */ public List<? extends MethodTree> createAllAbstractMethodImplementations(TypeElement clazz) { return createAbstractMethodImplementations(clazz, copy.getElementUtilities().findUnimplementedMethods(clazz)); }
for (ExecutableElement ee : findUnimplementedMethods(impl, (TypeElement) ((DeclaredType) t).asElement(), includeDefaults)) {
DeclaredType clsType = (DeclaredType) te.asType(); if (te.getKind().isClass() || te.getKind().isInterface() && SourceVersion.RELEASE_8.compareTo(controller.getSourceVersion()) <= 0) { for (ExecutableElement ee : eu.findUnimplementedMethods(te)) { if (startsWith(env, ee.getSimpleName().toString())) { TypeMirror tm = asMemberOf(ee, clsType, types);