All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.codetrans.expression.StringLiteralModel Maven / Gradle / Ivy

There is a newer version: 4.1.0.Beta1
Show newest version
package io.vertx.codetrans.expression;

import io.vertx.codetrans.CodeBuilder;
import io.vertx.codetrans.CodeWriter;

import java.util.List;

/**
 * @author Julien Viet
 */
public class StringLiteralModel extends ExpressionModel {

  final java.lang.String value;

  public StringLiteralModel(CodeBuilder builder, java.lang.String value) {
    super(builder);
    this.value = value;
  }

  @Override
  public boolean isStringDecl() {
    return true;
  }

  @Override
  void collectParts(List parts) {
    parts.add(value);
  }

  public java.lang.String getValue() {
    return value;
  }

  @Override
  public void render(CodeWriter writer) {
    writer.renderStringLiteral(value);
  }
}