stalkr.html.parser.FieldParser Maven / Gradle / Ivy
package stalkr.html.parser;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.val;
@RequiredArgsConstructor( staticName = "of" )
public class FieldParser {
final Class annotation;
final SetterConstructor constructor;
public void parse( final List list, final Field field ) {
val textAnnotation = field.getAnnotation( annotation );
if ( textAnnotation != null )
list.add( constructor.construct( field, textAnnotation ) );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy