use of org.talend.sdk.component.api.input.PartitionMapper in project component-runtime by Talend.
the class ModelVisitorTest method visit.
private List<String> visit(final Class<?> type) {
final ModelVisitor visitor = new ModelVisitor();
final List<String> tracker = new ArrayList<>();
Stream.of(type.getClasses()).sorted(Comparator.comparing(Class::getName)).forEach(nested -> visitor.visit(nested, new ModelListener() {
@Override
public void onPartitionMapper(final Class<?> type, final PartitionMapper partitionMapper) {
tracker.add("@PartitionMapper(" + type.getName() + ")");
}
@Override
public void onEmitter(final Class<?> type, final Emitter emitter) {
tracker.add("@Emitter(" + type.getName() + ")");
}
@Override
public void onProcessor(final Class<?> type, final Processor processor) {
tracker.add("@Processor(" + type.getName() + ")");
}
}, true));
return tracker;
}
Aggregations