示例#1
0
 /**
  * Generates i-th String attribute inside a file description.
  *
  * @param buffer - where to place the description
  */
 private static void generateStringAttr(StringBuffer buffer, int i, int paddingSize) {
   addIndent(buffer, FOLDER_INDENT + 2);
   buffer.append("<attr name=\"key_");
   Utilities.appendNDigits(i, paddingSize, buffer);
   buffer.append("\" stringvalue=\"val_");
   Utilities.appendNDigits(i, paddingSize, buffer);
   buffer.append("\"/>");
   buffer.append('\n');
 }
示例#2
0
 /** new ResourceComposer */
 public ResourceComposer(String resName, String resExt, int foCount, int fileBase) {
   this.foCount = foCount;
   this.paddingSize = Utilities.expPaddingSize(foCount + fileBase - 1);
   this.fileBase = fileBase;
   this.resName = resName;
   this.resExt = resExt;
 }
示例#3
0
 /**
  * Assembly fileBase (e.g. 13) with name (e.g. JavaSrc) and ext (e.g. .java) into sbuffer. Do
  * not forget to take into account paddingSize. Result could be e.g. JavaSrc0675.java, with
  * paddingSize 4 and fileBase 675.
  */
 public void assemblyResourceString(StringBuffer sbuffer) {
   sbuffer.append(resName);
   Utilities.appendNDigits(getFileBase(), getPaddingSize(), sbuffer);
   sbuffer.append(resExt);
 }