use of org.robobinding.ViewResolutionErrors in project RoboBinding by RoboBinding.
the class BindingViewInflaterTest method emptyViewResolutionResult.
private ViewResolutionResult emptyViewResolutionResult() {
ResolvedBindingAttributesForView viewBindingAttributes = mock(ResolvedBindingAttributesForView.class);
ViewResolutionErrors errors = mock(ViewResolutionErrors.class);
return new ViewResolutionResult(viewBindingAttributes, errors);
}
use of org.robobinding.ViewResolutionErrors in project RoboBinding by RoboBinding.
the class BindingAttributeResolver method resolve.
public ViewResolutionResult resolve(PendingAttributesForView pendingAttributesForView) {
List<ViewAttributeBinder> resolvedViewAttributes = Lists.newArrayList();
Iterable<ByBindingAttributeMappingsResolver> resolvers = byBindingAttributeMappingsResolverFinder.findCandidates(pendingAttributesForView.getView());
for (ByBindingAttributeMappingsResolver resolver : resolvers) {
Collection<ViewAttributeBinder> newResolvedViewAttributes = resolver.resolve(pendingAttributesForView);
resolvedViewAttributes.addAll(newResolvedViewAttributes);
if (pendingAttributesForView.isEmpty())
break;
}
ViewResolutionErrors errors = pendingAttributesForView.getResolutionErrors();
ResolvedBindingAttributesForView resolvedBindingAttributes = new ResolvedBindingAttributesForView(pendingAttributesForView.getView(), resolvedViewAttributes);
return new ViewResolutionResult(resolvedBindingAttributes, errors);
}
Aggregations