Java Code Examples for java.lang.StringBuilder

The following examples show how to use java.lang.StringBuilder. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: algorithms   Source File: Utilities.java    License: MIT License 6 votes vote down vote up
public static String toString(int[][] a) {
    if (a == null) return "[[]]";
    StringBuilder b = new StringBuilder();

    b.append("\n[\n");
    for (int i = 0; i < a.length; i ++) {
        b.append("\t[");
        for (int j = 0; j < a[i].length; j ++) {
            b.append(a[i][j]);
            if (j < a[i].length - 1) b.append(", ");
        }
        b.append("]\n");
    }
    b.append("]");

    return b.toString();
}
 
Example 2
Source Project: ecosys   Source File: generateDataset.java    License: Apache License 2.0 6 votes vote down vote up
public void batchPost(String target_host, String rest_endpoint, StringBuilder payload) {
  // String requestUrl = "http://" + host + ":9000/dumpfile?filename=/tmp/data.csv";
  String requestUrl = target_host + "/ddl?sep=,&tag=" + rest_endpoint + "&eol=%0A";
  String response = sendPostRequest(requestUrl, payload.toString());
  JSONObject res_json;
  try {
    res_json = new JSONObject(response);
    if (res_json.has("error") && res_json.optBoolean("error", true) == true) {
      logWarning("Response has error: " + response);
    } else {
      logInfo("Response: " + response);
    }
  } catch (JSONException e) {
     e.printStackTrace();
  }
  payload.setLength(0);
}
 
Example 3
Source Project: nalu   Source File: ControllerC07CreatorImpl.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void onFinishCreating(Object object) throws RoutingInterceptionException {
  ControllerC07 controller = (ControllerC07) object;
  StringBuilder sb01 = new StringBuilder();
  IComponent07 component = new Component07();
  sb01.setLength(0);
  sb01.append("component >>com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter04.Component07<< --> created using new");
  ClientLogger.get().logDetailed(sb01.toString(), 4);
  component.setController(controller);
  sb01.setLength(0);
  sb01.append("component >>").append(component.getClass().getCanonicalName()).append("<< --> created and controller instance injected");
  ClientLogger.get().logDetailed(sb01.toString(), 4);
  controller.setComponent(component);
  sb01.setLength(0);
  sb01.append("controller >>").append(controller.getClass().getCanonicalName()).append("<< --> instance of >>").append(component.getClass().getCanonicalName()).append("<< injected");
  ClientLogger.get().logDetailed(sb01.toString(), 4);
  component.render();
  sb01.setLength(0);
  sb01.append("component >>").append(component.getClass().getCanonicalName()).append("<< --> rendered");
  ClientLogger.get().logDetailed(sb01.toString(), 4);
  component.bind();
  sb01.setLength(0);
  sb01.append("component >>").append(component.getClass().getCanonicalName()).append("<< --> bound");
  ClientLogger.get().logDetailed(sb01.toString(), 4);
  ClientLogger.get().logSimple("controller >>com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter04.Component07<< created for route >>/mockShell/route01/*/*<<", 3);
}
 
Example 4
Source Project: cassandra-count   Source File: CqlCount.java    License: Apache License 2.0 6 votes vote down vote up
private PreparedStatement prepareStatement() {
List<ColumnMetadata> partkeys = cluster.getMetadata().getKeyspace(keyspaceName).getTable(tableName).getPartitionKey();
StringBuilder sb = new StringBuilder();
sb.append("SELECT COUNT(*) FROM ");
sb.append(keyspaceName).append(".").append(tableName);
sb.append(" WHERE Token(");
sb.append(partkeys.get(0).getName());
for (int i = 1; i < partkeys.size(); i++)
    sb.append(", ").append(partkeys.get(i).getName());
sb.append(") > ? AND Token(");
sb.append(partkeys.get(0).getName());
for (int i = 1; i < partkeys.size(); i++)
    sb.append(",").append(partkeys.get(i).getName());
sb.append(") <= ?");

debugPrint("Query: " + sb.toString(), true, 2);

return session.prepare(sb.toString()).setConsistencyLevel(consistencyLevel);
   }
 
Example 5
Source Project: android_9.0.0_r45   Source File: Plog.java    License: Apache License 2.0 5 votes vote down vote up
private String formatCurve(String name, float[] xs, float[] ys) {
    StringBuilder sb = new StringBuilder();
    sb.append("curve: " + name + ": [");
    int n = xs.length <= ys.length ? xs.length : ys.length;
    for (int i = 0; i < n; i++) {
        sb.append("(" + xs[i] + "," + ys[i] + "),");
    }
    sb.append("]");
    return sb.toString();
}
 
Example 6
Source Project: nalu   Source File: ControllerWithComposite01CreatorImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public ControllerInstance create() {
  StringBuilder sb01 = new StringBuilder();
  ControllerInstance controllerInstance = new ControllerInstance();
  controllerInstance.setControllerClassName("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite01.ControllerWithComposite01");
  AbstractComponentController<?, ?, ?> storedController = ControllerFactory.get().getControllerFormStore("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite01.ControllerWithComposite01");
  if (storedController == null) {
    sb01.append("controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite01.ControllerWithComposite01<< --> will be created");
    ClientLogger.get().logSimple(sb01.toString(), 3);
    ControllerWithComposite01 controller = new ControllerWithComposite01();
    controllerInstance.setController(controller);
    controllerInstance.setCached(false);
    controller.setContext(context);
    controller.setEventBus(eventBus);
    controller.setRouter(router);
    controller.setCached(false);
    controller.setRelatedRoute("/mockShell/route01/*");
    controller.setRelatedSelector("selector01");
    sb01.setLength(0);
    sb01.append("controller >>").append(controller.getClass().getCanonicalName()).append("<< --> created and data injected");
    ClientLogger.get().logDetailed(sb01.toString(), 4);
  } else {
    sb01.append("controller >>").append(storedController.getClass().getCanonicalName()).append("<< --> found in cache -> REUSE!");
    ClientLogger.get().logDetailed(sb01.toString(), 4);
    controllerInstance.setController(storedController);
    controllerInstance.setCached(true);
    controllerInstance.getController().setCached(true);
  }
  return controllerInstance;
}
 
Example 7
Source Project: android_9.0.0_r45   Source File: VrManagerService.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String toLogString(SimpleDateFormat dateFormat) {
    String tab = "  ";
    String newLine = "\n";
    StringBuilder sb = new StringBuilder(dateFormat.format(new Date(timestamp)));
    sb.append(tab);
    sb.append("State changed to:");
    sb.append(tab);
    sb.append((enabled) ? "ENABLED" : "DISABLED");
    sb.append(newLine);
    if (enabled) {
        sb.append(tab);
        sb.append("User=");
        sb.append(userId);
        sb.append(newLine);
        sb.append(tab);
        sb.append("Current VR Activity=");
        sb.append((callingPackage == null) ? "None" : callingPackage.flattenToString());
        sb.append(newLine);
        sb.append(tab);
        sb.append("Bound VrListenerService=");
        sb.append((targetPackageName == null) ? "None"
                : targetPackageName.flattenToString());
        sb.append(newLine);
        if (defaultPermissionsGranted) {
            sb.append(tab);
            sb.append("Default permissions granted to the bound VrListenerService.");
            sb.append(newLine);
        }
    }
    return sb.toString();
}
 
Example 8
Source Project: nalu   Source File: ApplicationWithComposite08Impl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void loadRoutes() {
  StringBuilder sb01 = new StringBuilder();
  sb01.append("load routes");
  ClientLogger.get().logDetailed(sb01.toString(), 2);
  super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route05/*", Arrays.asList(new String[]{"parameter05"}), "selector05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05"));
  sb01.setLength(0);
  sb01.append("register route >>/mockShell/route05/*<< with parameter >>parameter05<< for selector >>selector05<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05<<");
  ClientLogger.get().logDetailed(sb01.toString(), 3);
  super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route06/*", Arrays.asList(new String[]{"parameter06"}), "selector06", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06"));
  sb01.setLength(0);
  sb01.append("register route >>/mockShell/route06/*<< with parameter >>parameter06<< for selector >>selector06<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06<<");
  ClientLogger.get().logDetailed(sb01.toString(), 3);
}
 
Example 9
@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  if (viewBoxWidth != null) builder.append(", viewBoxWidth=").append(viewBoxWidth);
  if (viewBoxHeight != null) builder.append(", viewBoxHeight=").append(viewBoxHeight);
  if (fps != null) builder.append(", fps=").append(fps);
  if (frames != null) builder.append(", frames=").append(frames);
  return builder.replace(0, 2, "MovieParams{").append('}').toString();
}
 
Example 10
Source Project: SVGAPlayer-Android   Source File: SpriteEntity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  if (imageKey != null) builder.append(", imageKey=").append(imageKey);
  if (!frames.isEmpty()) builder.append(", frames=").append(frames);
  if (matteKey != null) builder.append(", matteKey=").append(matteKey);
  return builder.replace(0, 2, "SpriteEntity{").append('}').toString();
}
 
Example 11
@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  if (x != null) builder.append(", x=").append(x);
  if (y != null) builder.append(", y=").append(y);
  if (width != null) builder.append(", width=").append(width);
  if (height != null) builder.append(", height=").append(height);
  if (cornerRadius != null) builder.append(", cornerRadius=").append(cornerRadius);
  return builder.replace(0, 2, "RectArgs{").append('}').toString();
}
 
Example 12
@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  if (x != null) builder.append(", x=").append(x);
  if (y != null) builder.append(", y=").append(y);
  if (radiusX != null) builder.append(", radiusX=").append(radiusX);
  if (radiusY != null) builder.append(", radiusY=").append(radiusY);
  return builder.replace(0, 2, "EllipseArgs{").append('}').toString();
}
 
Example 13
@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  if (fill != null) builder.append(", fill=").append(fill);
  if (stroke != null) builder.append(", stroke=").append(stroke);
  if (strokeWidth != null) builder.append(", strokeWidth=").append(strokeWidth);
  if (lineCap != null) builder.append(", lineCap=").append(lineCap);
  if (lineJoin != null) builder.append(", lineJoin=").append(lineJoin);
  if (miterLimit != null) builder.append(", miterLimit=").append(miterLimit);
  if (lineDashI != null) builder.append(", lineDashI=").append(lineDashI);
  if (lineDashII != null) builder.append(", lineDashII=").append(lineDashII);
  if (lineDashIII != null) builder.append(", lineDashIII=").append(lineDashIII);
  return builder.replace(0, 2, "ShapeStyle{").append('}').toString();
}
 
Example 14
@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  if (r != null) builder.append(", r=").append(r);
  if (g != null) builder.append(", g=").append(g);
  if (b != null) builder.append(", b=").append(b);
  if (a != null) builder.append(", a=").append(a);
  return builder.replace(0, 2, "RGBAColor{").append('}').toString();
}
 
Example 15
@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  if (a != null) builder.append(", a=").append(a);
  if (b != null) builder.append(", b=").append(b);
  if (c != null) builder.append(", c=").append(c);
  if (d != null) builder.append(", d=").append(d);
  if (tx != null) builder.append(", tx=").append(tx);
  if (ty != null) builder.append(", ty=").append(ty);
  return builder.replace(0, 2, "Transform{").append('}').toString();
}
 
Example 16
Source Project: nalu   Source File: ApplicationWithComposite03Impl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void loadDefaultRoutes() {
  StringBuilder sb01 = new StringBuilder();
  this.startRoute = "/mockShell/route03";
  sb01.append("found startRoute >>/mockShell/route03<<");
  ClientLogger.get().logDetailed(sb01.toString(), 2);
  sb01.setLength(0);
  ClientLogger.get().logDetailed(sb01.toString(), 2);
}
 
Example 17
Source Project: nalu   Source File: ApplicationWithComposite05Impl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void loadCompositeReferences() {
  StringBuilder sb01 = new StringBuilder();
  sb01.append("load composite references");
  ClientLogger.get().logDetailed(sb01.toString(), 2);
  this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05", "testComposite01", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController03", "selector", false));
  sb01.setLength(0);
  sb01.append("register composite >>testComposite01<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05<< in selector >>selector<<");
  ClientLogger.get().logDetailed(sb01.toString(), 3);
  this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05", "testComposite02", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController04", "selector", false));
  sb01.setLength(0);
  sb01.append("register composite >>testComposite02<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05<< in selector >>selector<<");
  ClientLogger.get().logDetailed(sb01.toString(), 3);
}
 
Example 18
Source Project: nalu   Source File: ApplicationWithComposite02Impl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void loadCompositeReferences() {
  StringBuilder sb01 = new StringBuilder();
  sb01.append("load composite references");
  ClientLogger.get().logDetailed(sb01.toString(), 2);
  this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02", "testComposite", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.composite.CompositeController02", "selector", false));
  sb01.setLength(0);
  sb01.append("register composite >>testComposite<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02<< in selector >>selector<<");
  ClientLogger.get().logDetailed(sb01.toString(), 3);
}
 
Example 19
Source Project: algorithms   Source File: Utilities.java    License: MIT License 5 votes vote down vote up
public static String toString(int[] a) {
    if (a == null) return "[]";
    StringBuilder b = new StringBuilder();

    b.append("[");
    for (int i = 0; i < a.length; i ++) {
        b.append(a[i]);
        if (i < a.length - 1) b.append(", ");
    }
    b.append("]");

    return b.toString();
}
 
Example 20
public static void test(String expected, String actual) {
   // Fingers crossed: String concat should work.
   if (!expected.equals(actual)) {
       StringBuilder sb = new StringBuilder();
       sb.append("Expected = ");
       sb.append(expected);
       sb.append(", actual = ");
       sb.append(actual);
       throw new IllegalStateException(sb.toString());
   }
}
 
Example 21
Source Project: nalu   Source File: ControllerC02CreatorImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void setParameter(Object object, String... params) throws RoutingInterceptionException {
  ControllerC02 controller = (ControllerC02) object;
  StringBuilder sb01 = new StringBuilder();
  if (params != null) {
    if (params.length >= 1) {
      sb01.setLength(0);
      sb01.append("controller >>").append(controller.getClass().getCanonicalName()).append("<< --> using method >>setParameter01<< to set value >>").append(params[0]).append("<<");
      ClientLogger.get().logDetailed(sb01.toString(), 4);
      controller.setParameter01(params[0]);
    }
  }
}
 
Example 22
Source Project: nalu   Source File: ControllerWithComposite02CreatorImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public ControllerInstance create() {
  StringBuilder sb01 = new StringBuilder();
  ControllerInstance controllerInstance = new ControllerInstance();
  controllerInstance.setControllerClassName("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02");
  AbstractComponentController<?, ?, ?> storedController = ControllerFactory.get().getControllerFormStore("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02");
  if (storedController == null) {
    sb01.append("controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02<< --> will be created");
    ClientLogger.get().logSimple(sb01.toString(), 3);
    ControllerWithComposite02 controller = new ControllerWithComposite02();
    controllerInstance.setController(controller);
    controllerInstance.setCached(false);
    controller.setContext(context);
    controller.setEventBus(eventBus);
    controller.setRouter(router);
    controller.setCached(false);
    controller.setRelatedRoute("/mockShell/route02/*");
    controller.setRelatedSelector("selector02");
    sb01.setLength(0);
    sb01.append("controller >>").append(controller.getClass().getCanonicalName()).append("<< --> created and data injected");
    ClientLogger.get().logDetailed(sb01.toString(), 4);
  } else {
    sb01.append("controller >>").append(storedController.getClass().getCanonicalName()).append("<< --> found in cache -> REUSE!");
    ClientLogger.get().logDetailed(sb01.toString(), 4);
    controllerInstance.setController(storedController);
    controllerInstance.setCached(true);
    controllerInstance.getController().setCached(true);
  }
  return controllerInstance;
}
 
Example 23
Source Project: codeu_project_2017   Source File: Uuid.java    License: Apache License 2.0 5 votes vote down vote up
private static void buildString(Uuid current, StringBuilder build) {
  final long mask = (1L << 32) - 1;  // removes sign extension
  if (current != null) {
    buildString(current.root(), build);
    build.append(".").append(current.id() & mask);
  }
}
 
Example 24
Source Project: nalu   Source File: ControllerC06CreatorImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public ControllerInstance create() {
  StringBuilder sb01 = new StringBuilder();
  ControllerInstance controllerInstance = new ControllerInstance();
  controllerInstance.setControllerClassName("com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter03.ControllerC06");
  AbstractComponentController<?, ?, ?> storedController = ControllerFactory.get().getControllerFormStore("com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter03.ControllerC06");
  if (storedController == null) {
    sb01.append("controller >>com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter03.ControllerC06<< --> will be created");
    ClientLogger.get().logSimple(sb01.toString(), 3);
    ControllerC06 controller = new ControllerC06();
    controllerInstance.setController(controller);
    controllerInstance.setCached(false);
    controller.setContext(context);
    controller.setEventBus(eventBus);
    controller.setRouter(router);
    controller.setCached(false);
    controller.setRelatedRoute("/mockShell/route01/*/*");
    controller.setRelatedSelector("selector01");
    sb01.setLength(0);
    sb01.append("controller >>").append(controller.getClass().getCanonicalName()).append("<< --> created and data injected");
    ClientLogger.get().logDetailed(sb01.toString(), 4);
  } else {
    sb01.append("controller >>").append(storedController.getClass().getCanonicalName()).append("<< --> found in cache -> REUSE!");
    ClientLogger.get().logDetailed(sb01.toString(), 4);
    controllerInstance.setController(storedController);
    controllerInstance.setCached(true);
    controllerInstance.getController().setCached(true);
  }
  return controllerInstance;
}
 
Example 25
Source Project: nalu   Source File: ApplicationWithComposite05Impl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void loadRoutes() {
  StringBuilder sb01 = new StringBuilder();
  sb01.append("load routes");
  ClientLogger.get().logDetailed(sb01.toString(), 2);
  super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route05/*", Arrays.asList(new String[]{"parameter05"}), "selector05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05"));
  sb01.setLength(0);
  sb01.append("register route >>/mockShell/route05/*<< with parameter >>parameter05<< for selector >>selector05<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05<<");
  ClientLogger.get().logDetailed(sb01.toString(), 3);
}
 
Example 26
Source Project: nalu   Source File: ApplicationWithTrackerImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void logProcessorVersion() {
  ClientLogger.get().logDetailed("", 0);
  ClientLogger.get().logDetailed("=================================================================================", 0);
  StringBuilder sb01 = new StringBuilder();
  sb01.append("Nalu processor version  >>2.0.1<< used to generate this source");
  ClientLogger.get().logDetailed(sb01.toString(), 0);
  ClientLogger.get().logDetailed("=================================================================================", 0);
  ClientLogger.get().logDetailed("", 0);
}
 
Example 27
Source Project: nalu   Source File: ControllerC07CreatorImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public ControllerInstance create() {
  StringBuilder sb01 = new StringBuilder();
  ControllerInstance controllerInstance = new ControllerInstance();
  controllerInstance.setControllerClassName("com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter04.ControllerC07");
  AbstractComponentController<?, ?, ?> storedController = ControllerFactory.get().getControllerFormStore("com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter04.ControllerC07");
  if (storedController == null) {
    sb01.append("controller >>com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter04.ControllerC07<< --> will be created");
    ClientLogger.get().logSimple(sb01.toString(), 3);
    ControllerC07 controller = new ControllerC07();
    controllerInstance.setController(controller);
    controllerInstance.setCached(false);
    controller.setContext(context);
    controller.setEventBus(eventBus);
    controller.setRouter(router);
    controller.setCached(false);
    controller.setRelatedRoute("/mockShell/route01/*/*");
    controller.setRelatedSelector("selector01");
    sb01.setLength(0);
    sb01.append("controller >>").append(controller.getClass().getCanonicalName()).append("<< --> created and data injected");
    ClientLogger.get().logDetailed(sb01.toString(), 4);
  } else {
    sb01.append("controller >>").append(storedController.getClass().getCanonicalName()).append("<< --> found in cache -> REUSE!");
    ClientLogger.get().logDetailed(sb01.toString(), 4);
    controllerInstance.setController(storedController);
    controllerInstance.setCached(true);
    controllerInstance.getController().setCached(true);
  }
  return controllerInstance;
}
 
Example 28
Source Project: nalu   Source File: GenerateWithIsComponentCreatorImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void logProcessorVersion() {
  ClientLogger.get().logDetailed("", 0);
  ClientLogger.get().logDetailed("=================================================================================", 0);
  StringBuilder sb01 = new StringBuilder();
  sb01.append("Nalu processor version  >>2.0.1<< used to generate this source");
  ClientLogger.get().logDetailed(sb01.toString(), 0);
  ClientLogger.get().logDetailed("=================================================================================", 0);
  ClientLogger.get().logDetailed("", 0);
}
 
Example 29
Source Project: nalu   Source File: ErrorPopUpAnnotationOkImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void loadDefaultRoutes() {
  StringBuilder sb01 = new StringBuilder();
  this.startRoute = "/mockShell/route01";
  sb01.append("found startRoute >>/mockShell/route01<<");
  ClientLogger.get().logDetailed(sb01.toString(), 2);
  sb01.setLength(0);
  ClientLogger.get().logDetailed(sb01.toString(), 2);
}
 
Example 30
Source Project: nalu   Source File: ControllerWithComposite01CreatorImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void setParameter(Object object, String... params) throws RoutingInterceptionException {
  ControllerWithComposite01 controller = (ControllerWithComposite01) object;
  StringBuilder sb01 = new StringBuilder();
  if (params != null) {
    if (params.length >= 1) {
      sb01.setLength(0);
      sb01.append("controller >>").append(controller.getClass().getCanonicalName()).append("<< --> using method >>setParameter01<< to set value >>").append(params[0]).append("<<");
      ClientLogger.get().logDetailed(sb01.toString(), 4);
      controller.setParameter01(params[0]);
    }
  }
}