@Override
 public String toConstructionString(String spacing) {
   final boolean first = true;
   final StringBuilder sb = new StringBuilder();
   sb.append('\n').append(spacing).append("new HDLInterfaceDeclaration()");
   if (annotations != null) {
     if (annotations.size() > 0) {
       sb.append('\n').append(spacing);
       for (final HDLAnnotation o : annotations) {
         sb.append(".addAnnotations(").append(o.toConstructionString(spacing + "\t\t"));
         sb.append('\n').append(spacing).append(")");
       }
     }
   }
   if (hIf != null) {
     sb.append(".setHIf(").append(hIf.toConstructionString(spacing + "\t")).append(")");
   }
   return sb.toString();
 }
Ejemplo n.º 2
0
 @Override
 public String toConstructionString(String spacing) {
   final boolean first = true;
   final StringBuilder sb = new StringBuilder();
   sb.append('\n').append(spacing).append("new HDLInlineFunction()");
   if (annotations != null) {
     if (annotations.size() > 0) {
       sb.append('\n').append(spacing);
       for (final HDLAnnotation o : annotations) {
         sb.append(".addAnnotations(").append(o.toConstructionString(spacing + "\t\t"));
         sb.append('\n').append(spacing).append(")");
       }
     }
   }
   if (name != null) {
     sb.append(".setName(").append('"' + name + '"').append(")");
   }
   if (args != null) {
     if (args.size() > 0) {
       sb.append('\n').append(spacing);
       for (final HDLFunctionParameter o : args) {
         sb.append(".addArgs(").append(o.toConstructionString(spacing + "\t\t"));
         sb.append('\n').append(spacing).append(")");
       }
     }
   }
   if (returnType != null) {
     sb.append(".setReturnType(")
         .append(returnType.toConstructionString(spacing + "\t"))
         .append(")");
   }
   if (expr != null) {
     sb.append(".setExpr(").append(expr.toConstructionString(spacing + "\t")).append(")");
   }
   return sb.toString();
 }