public ViewBindingInfo build() { WrappedTypeElement viewType = extractViewType(); List<SimpleOneWayPropertyInfo> simpleOneWayPropertyInfoList = extractSimpleOneWayPropertyInfoList(viewType); return new ViewBindingInfo( typeElement.qName(), viewBindingObjectTypeName, viewType, simpleOneWayPropertyInfoList); }
private WrappedTypeElement extractViewType() { WrappedTypeElement customViewBinding = typeElement.findDirectSuperclassOf(CustomViewBinding.class); if (customViewBinding == null) { throw new RuntimeException( MessageFormat.format( "{0} has to be direct SubClass of {1}", typeElement.qName(), CustomViewBinding.class.getName())); } return customViewBinding.firstTypeArgument(); }
public String viewType() { return viewType.qName(); }