예제 #1
0
  protected String createTypeDeclaration(Package pkg, Class clss) {
    TextBuilder buf = new TextBuilder(LINE_SEP, this.context.getIndentationToken());

    String javadoc = createTypeDeclarationJavadoc(pkg, clss);
    buf.append(javadoc);
    SDOInterfaceNameResolver interfaceResolver = new SDOInterfaceNameResolver();

    buf.append(LINE_SEP);
    buf.append("public interface ");
    buf.append(interfaceResolver.getName(clss));
    buf.append(" extends ");
    if (clss.getSuperClasses() != null && clss.getSuperClasses().size() > 0) {
      int i = 0;
      for (ClassRef ref : clss.getSuperClasses()) {
        if (i > 0) buf.append(", ");
        buf.append(ref.getName());
        i++;
      }
    } else {
      // always extends DO so we can cast from its impl to any generated interface
      buf.append(PlasmaDataObject.class.getSimpleName());
    }

    return buf.toString();
  }
예제 #2
0
 @Override
 public String getQualifiedName(ClassRef clssRef) {
   return getQualifiedName(clssRef.getUri(), clssRef.getName());
 }