Unfortunately, it's not possible to send arguments to annotation (reference)
One possible solution would be to create a Page Object class for link and pass a WebElement based on its li node.
Class Footer {
@FindBy(css = "footer")
WebElement baseElement;
List<WebElement> links;
Footer() {
this.links = this.createLinks();
}
private List<Links> createLinks() {
List<WebElement> links = baseElement.findElements("li");
return links.stream().map(link -> new FooterLink(link)).collect(Collectors.toList());
}
}
class Link {
WebElement baseElement;
Link(WebElement baseElement) {
this.baseElement = baseElement;
}
//Now you can make any search for the specific
//Link using the baseElement attribute to narrow it properly
}