public MatchingPageExpressions(final PageObject pageObject) {
buildMatchingExpressionsList(pageObject);
}
private void buildMatchingExpressionsList(final PageObject pageObject) {
At compatibleWithAnnotation = pageObject.getClass().getAnnotation(At.class);
if (compatibleWithAnnotation != null) {
if (valueIsDefinedFor(compatibleWithAnnotation)) {
worksWithUrlPattern(compatibleWithAnnotation.value());
} else {
worksWithUrlPatternList(compatibleWithAnnotation.urls());
}
}
}