Examples of string()


Examples of org.eclipse.imp.pdb.facts.IValueFactory.string()

     
      if (query != null && query.length() > 0) {
        String[] params = query.split("&");
        for (String param : params) {
          String[] keyValue = param.split("=");
          res.put(vf.string(keyValue[0]), vf.string(keyValue[1]));
        }
      }
     
      IMap map = res.done();
      return makeResult(map.getType(), map, ctx);
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.string()

    default:
      throw new UndeclaredField(name, getTypeFactory().sourceLocationType(), ctx.getCurrentAST());
    }

    if (stringResult != null) {
      return makeResult(tf.stringType(), vf.string(stringResult), ctx);
    }
    if (intResult != null) {
      return makeResult(tf.integerType(), vf.integer(intResult), ctx);
    }
    if (tupleA != null && tupleB != null) {
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.string()

 
  public static IValue toRascalKey(KeyEvent e,IEvaluatorContext ctx){
    IValueFactory vf = ValueFactoryFactory.getValueFactory();
    if(e.keyCode >= ' ' && e.keyCode < '~'){
      String keySym = "" + (char)e.keyCode;
      return vf.constructor(KeySym_keyPrintable, vf.string(keySym));
    } else {
      Type cons = unPrintableKeyName(e);
      if(cons == KeySym_keyUnknown){
        return vf.constructor(KeySym_keyUnknown,vf.integer(e.keyCode));
      } else {
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.string()

 
  public static IValue toRascalKey(KeyEvent e,IEvaluatorContext ctx){
    IValueFactory vf = VF;
    if(e.keyCode >= ' ' && e.keyCode < '~'){
      String keySym = "" + (char)e.keyCode;
      return vf.constructor(KeySym_keyPrintable, vf.string(keySym));
    } else {
      Type cons = unPrintableKeyName(e);
      if(cons == KeySym_keyUnknown){
        return vf.constructor(KeySym_keyUnknown,vf.integer(e.keyCode));
      } else {
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.string()

        IValue v = result.getValue();
        if (!(v instanceof IString)) {
          // Ensure that values that are trees are yielding the appropriate string value
          StringBuilder sb = new StringBuilder(500);
          appendToString(v, sb);
          v = vf.string(sb.toString());
        }
        java.lang.String fill = __eval.getCurrentIndent();
        IString content = ((IString)v);
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < content.length(); i++) {
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.string()

          sb.appendCodePoint(ch);
          if (ch == '\n') {
            sb.append(fill);
          }
        }
        v = vf.string(sb.toString());
        target.appendString((IString) v);
        return result;
      }
     
      private void appendToString(IValue value, StringBuilder b) {
View Full Code Here

Examples of org.elasticsearch.common.text.StringText.string()

        @Override
        public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
            if (formatter != null && formatter != ValueFormatter.RAW) {
                Text keyTxt = new StringText(formatter.format(key));
                if (keyed) {
                    builder.startObject(keyTxt.string());
                } else {
                    builder.startObject();
                }
                builder.field(CommonFields.KEY_AS_STRING, keyTxt);
            } else {
View Full Code Here

Examples of org.elasticsearch.common.text.Text.string()

        @Override
        public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
            if (formatter != null && formatter != ValueFormatter.RAW) {
                Text keyTxt = new StringText(formatter.format(key));
                if (keyed) {
                    builder.startObject(keyTxt.string());
                } else {
                    builder.startObject();
                }
                builder.field(CommonFields.KEY_AS_STRING, keyTxt);
            } else {
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.string()

        expected.endObject();

    XContentBuilder actual = fixture.getContentBuilder(event);
   
    JsonParser parser = new JsonParser();
    assertEquals(parser.parse(expected.string()),parser.parse(actual.string()));
  }

  @Test
  public void shouldHandleInvalidJSONDuringComplexParsing() throws Exception {
    ElasticSearchLogStashEventSerializer fixture = new ElasticSearchLogStashEventSerializer();
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.string()

        expected.endObject();

    XContentBuilder actual = fixture.getContentBuilder(event);

    JsonParser parser = new JsonParser();
    assertEquals(parser.parse(expected.string()),parser.parse(actual.string()));
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.