コード例 #1
0
 public ViewBindingInfo build() {
   WrappedTypeElement viewType = extractViewType();
   List<SimpleOneWayPropertyInfo> simpleOneWayPropertyInfoList =
       extractSimpleOneWayPropertyInfoList(viewType);
   return new ViewBindingInfo(
       typeElement.qName(), viewBindingObjectTypeName, viewType, simpleOneWayPropertyInfoList);
 }
コード例 #2
0
  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();
 }