Examples of body()


Examples of com.sun.codemodel.internal.JForEach.body()

            block.assign($var,JExpr._new(cm.ref(ArrayList.class).narrow(itemType().boxify())));
            JVar $col = block.decl(core.getRawType(), "col" + hashCode());
            acc.toRawValue(block,$col);
            JForEach loop = block.forEach(elementType, "v" + hashCode()/*unique string handling*/, $col);

            JConditional cond = loop.body()._if(loop.var().eq(JExpr._null()));
            cond._then().invoke($var,"add").arg(JExpr._null());
            cond._else().invoke($var,"add").arg(loop.var().invoke("getValue"));
        }

        public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
View Full Code Here

Examples of com.sun.codemodel.internal.JForLoop.body()

        JForLoop _for = $setAll.body()._for();
        JVar $i = _for.init( codeModel.INT, "i", JExpr.lit(0) );
        _for.test( JOp.lt($i,$len) );
        _for.update( $i.incr() );
        _for.body().assign(acc.ref(true).component($i), castToImplType(acc.box($value.component($i))));

        writer.javadoc().addParam($value)
            .append("allowed objects are\n")
            .append(returnTypes);
View Full Code Here

Examples of com.sun.codemodel.internal.JMethod.body()

                impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc);

                JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation");
                JVar $newLoc = setter.param(Locator.class, "newLocator");
                setter.body().assign($loc, $newLoc);
            }
        }

        return true;
    }
View Full Code Here

Examples of com.sun.codemodel.internal.JTryBlock.body()

        JBlock staticBlock = cls.init();
        JVar urlVar = staticBlock.decl(cm.ref(URL.class), "url", JExpr._null());
        JVar exVar = staticBlock.decl(cm.ref(WebServiceException.class), "e", JExpr._null());

        JTryBlock tryBlock = staticBlock._try();
        tryBlock.body().assign(urlVar, JExpr._new(cm.ref(URL.class)).arg(wsdlLocation));
        JCatchBlock catchBlock = tryBlock._catch(cm.ref(MalformedURLException.class));
        catchBlock.param("ex");
        catchBlock.body().assign(exVar, JExpr._new(cm.ref(WebServiceException.class)).arg(JExpr.ref("ex")));

        staticBlock.assign(urlField, urlVar);
View Full Code Here

Examples of com.sun.tools.doclets.formats.html.HtmlDocletWriter.body()

    writer.html();
    writer.head();
    writer.link("rel='stylesheet' type='text/css' href='jsdoc.css'");
    writer.headEnd();
    writer.body("white", true);

    writer.h1("Exported JavaScript-API: Index of Classes");
    writer.ul();
   
    ClassDoc[] classes = rootDoc.classes();
View Full Code Here

Examples of com.zanox.rabbiteasy.Message.body()

                .routingKey(publisherConfiguration.routingKey);
        if (publisherConfiguration.persistent) {
            message.persistent();
        }
        if (event instanceof ContainsData) {
            message.body(((ContainsData) event).getData());
        } else if (event instanceof ContainsContent) {
            message.body(((ContainsContent) event).getContent());
        } else if (event instanceof ContainsId) {
            message.body(((ContainsId) event).getId());
        }
View Full Code Here

Examples of de.taimos.httputils.HTTPRequest.body()

      final String due = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
      final String bodyString = "{\"version\":{\"name\":\"%s\",\"status\":\"closed\",\"due_date\":\"%s\"}}";
      body = String.format(bodyString, version.getName(), due);
      final HTTPRequest req = this.createRequest("/versions/" + version.getId() + ".json");
      req.header(WSConstants.HEADER_CONTENT_TYPE, Redmine.APPLICATION_JSON);
      final HttpResponse put = req.body(body).put();
      if (!WS.isStatusOK(put)) {
        this.log.error(WS.getResponseAsString(put));
        throw new RedmineException(Redmine.STATUS_CHANGE_FAILED);
      }
    } catch (final Exception e) {
View Full Code Here

Examples of feign.RequestTemplate.body()

  @Test public void testEncodesStrings() throws Exception {
    String content = "This is my content";
    RequestTemplate template = new RequestTemplate();
    encoder.encode(content, template);
    assertEquals(template.body(), content.getBytes(UTF_8));
  }

  @Test public void testEncodesByteArray() throws Exception {
    byte[] content = {12, 34, 56};
    RequestTemplate template = new RequestTemplate();
View Full Code Here

Examples of net.sf.gluent.doc.distillery.simplexmlbuilder.SimpleXml.RootWithAutomaticEnd.body()

  }

  @Test
  public void testOneElementWithAutomaticEnd() {
    RootWithAutomaticEnd xml = SimpleXml.withAutomaticEnd().to(outWriter);
    ElementsWithAutomaticEnd elements = xml.body();
    elements.e("a").end();
    assertOut("<a/>");
  }

  @Test
View Full Code Here

Examples of net.sf.gluent.doc.distillery.simplexmlbuilder.SimpleXml.RootWithManualEnd.body()

  // the tests

  @Test
  public void testOneElementWithManualEnd() {
    RootWithManualEnd xml = SimpleXml.withManualEnd().to(outWriter);
    ElementsWithManualEnd elements = xml.body();
    elements.e("a").end();
    assertOut("<a/>");
  }

  @Test
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.