예제 #1
0
    public String getReturnTypeName() {
      if ("stop".equals(node.getType())) {
        return null;
      }
      if (node.isFlowPart()) {
        return getCachedClassName(
            getFactoryName() + "." + StringUtil.getSimpleName(getClassName()));
      }

      String type = getMethodName();
      String className = getCachedClassName(getFactoryName() + "." + StringUtil.toFirstUpper(type));

      String nodeType = node.getType();
      if ("restructure".equals(nodeType)
          || "extend".equals(nodeType)
          || "project".equals(nodeType)
          || "checkpoint".equals(nodeType)) {
        OpePort port = node.getOutputPort();
        String modelClass = getCachedClassName(getModelClassName(port));
        return className + "<" + modelClass + ">";
      }
      if ("empty".equals(nodeType) || "confluent".equals(nodeType)) {
        String modelClass = findModelClass(node);
        modelClass = getCachedClassName(modelClass);
        return className + "<" + modelClass + ">";
      }

      return className;
    }
예제 #2
0
 public String getMethodName() {
   if (node.isCoreOperator()) {
     return node.getType();
   }
   if (node.isFlowPart()) {
     return "create";
   }
   return node.getMethodName();
 }
예제 #3
0
 @Override
 public String createVariableName() {
   String name;
   if (node.isFlowPart()) {
     name = StringUtil.getSimpleName(getFactoryName());
     name = StringUtil.removeEnds(name, "Factory");
   } else {
     name = node.getMethodName();
   }
   return StringUtil.toFirstLower(name);
 }
예제 #4
0
 public boolean isFlowPart() {
   return node.isFlowPart();
 }