org.simpleflatmapper.reflect.meta.CountNumberOfMatchedProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-reflect Show documentation
Show all versions of sfm-reflect Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
The newest version!
package org.simpleflatmapper.reflect.meta;
public class CountNumberOfMatchedProperties implements PropertyFinder.FoundProperty {
public int nbFound = 0;
public final PropertyFinder.FoundProperty delegate;
public CountNumberOfMatchedProperties(PropertyFinder.FoundProperty delegate) {
this.delegate = delegate;
}
@Override
public > void found(P propertyMeta, Runnable selectionCallback, PropertyMatchingScore score, PropertyFinder.TypeAffinityScorer typeAffinityScorer) {
if (!propertyMeta.isNonMapped()) {
nbFound++;
}
delegate.found(propertyMeta, selectionCallback, score, typeAffinityScorer);
}
}