public static Optional<MethodUsage> getFunctionalMethod(ResolvedType type) {
        if (type.isReferenceType() && type.asReferenceType().getTypeDeclaration().isInterface()) {
            return getFunctionalMethod(type.asReferenceType().getTypeDeclaration());
        } else {
            return Optional.empty();
        }
    }
public static Optional<MethodUsage> getFunctionalMethod(ResolvedType type) {
        if (type.isReferenceType() && type.asReferenceType().getTypeDeclaration().isInterface()) {
            return getFunctionalMethod(type.asReferenceType().getTypeDeclaration());
        } else {
            return Optional.empty();
        }
    }
public static Optional < MethodUsage > getFunctionalMethod ( ResolvedType type ) { if ( type . isReferenceType ( ) && type . asReferenceType ( ) . getTypeDeclaration ( ) . isInterface ( ) ) { return getFunctionalMethod ( type . asReferenceType ( ) . getTypeDeclaration ( ) ) ; } else { return Optional . empty ( ) ; } }
Get the functional method defined by the type, if any.
Get the functional method defined by the type if any .