@@ -0,0 +1,1550 @@
+package org.henrrich.jlocator;%0A%0Aimport org.henrrich.jlocator.annotations.FindAll;%0Aimport org.henrrich.jlocator.annotations.FindBy;%0Aimport org.henrrich.jlocator.annotations.FindBys;%0Aimport org.openqa.selenium.WebElement;%0Aimport org.openqa.selenium.support.pagefactory.DefaultFieldDecorator;%0Aimport org.openqa.selenium.support.pagefactory.ElementLocatorFactory;%0A%0Aimport java.lang.reflect.Field;%0Aimport java.lang.reflect.ParameterizedType;%0Aimport java.lang.reflect.Type;%0Aimport java.util.List;%0A%0A/**%0A * Created by henrrich on 11/05/2016.%0A */%0Apublic class JLocatorFieldDecorator extends DefaultFieldDecorator %7B%0A%0A    public JLocatorFieldDecorator(ElementLocatorFactory factory) %7B%0A        super(factory);%0A    %7D%0A%0A    @Override%0A    protected boolean isDecoratableList(Field field) %7B%0A        if (!List.class.isAssignableFrom(field.getType())) %7B%0A            return false;%0A        %7D%0A%0A        // Type erasure in Java isn't complete. Attempt to discover the generic%0A        // type of the list.%0A        Type genericType = field.getGenericType();%0A        if (!(genericType instanceof ParameterizedType)) %7B%0A            return false;%0A        %7D%0A%0A        Type listType = ((ParameterizedType) genericType).getActualTypeArguments()%5B0%5D;%0A%0A        if (!WebElement.class.equals(listType)) %7B%0A            return false;%0A        %7D%0A%0A        if (field.getAnnotation(FindBy.class) == null &&%0A                field.getAnnotation(FindBys.class) == null &&%0A                field.getAnnotation(FindAll.class) == null) %7B%0A            return false;%0A        %7D%0A%0A        return true;%0A    %7D%0A%7D%0A

add field decorator class