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

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

package io.vertx.codetrans.expression;

import io.vertx.codetrans.CodeBuilder;

/**
 * @author Julien Viet
 */
public class SystemModel extends ClassModel {

  public SystemModel(CodeBuilder builder) {
    super(builder);
  }

  @Override
  public ExpressionModel onField(String identifier) {
    if (identifier.equals("out")) {
      return new ConsoleModel(builder, true);
    }
    if (identifier.equals("err")) {
      return new ConsoleModel(builder, false);
    }
    throw new UnsupportedOperationException("Cannot select " + identifier + " on java.lang.System");
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy