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();
  }
Пример #3
0
 public String viewType() {
   return viewType.qName();
 }