Examples of Body


Examples of org.rendersnake.tag.Tag.Body

public class HtmlCanvas {
   
    public static void main(String[] args) {
        HtmlCanvas c = new HtmlCanvas();
        new Body(c)
            .table()
                .tr()
                    .td()
                        .write("42");
    }
View Full Code Here

Examples of org.simpleframework.http.message.Body

   public void ready(Collector collector) throws IOException {
      Entity entity = collector;
      Channel channel = entity.getChannel();
      Cursor cursor = channel.getCursor();
      Header header = entity.getHeader();
      Body body = entity.getBody();
      List<Part> list = body.getParts();
     
      assertEquals(header.getTarget(), "/index.html");
      assertEquals(header.getMethod(), "POST");
      assertEquals(header.getMajor(), 1);
      assertEquals(header.getMinor(), 0);
View Full Code Here

Examples of org.w3._2003._05.soap_envelope.Body

        return dataFormat;
    }

    @Override
    public Object doMarshal(Exchange exchange, Object inputObject, OutputStream stream, String soapAction) throws IOException {
        Body body = new Body();
        Header header = new Header();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }

        final List<JAXBElement<?>> bodyContent;
        List<JAXBElement<?>> headerContent = new ArrayList<JAXBElement<?>>();
        if (exception != null) {
            bodyContent = new ArrayList<JAXBElement<?>>();
            bodyContent.add(createFaultFromException(exception));
        } else {
            bodyContent = getDataFormat().createContentFromObject(inputObject, soapAction, headerContent);
        }

        for (JAXBElement<?> elem : bodyContent) {
            body.getAny().add(elem);
        }
        for (JAXBElement<?> elem : headerContent) {
            header.getAny().add(elem);
        }
        Envelope envelope = new Envelope();
View Full Code Here

Examples of org.xmlsoap.schemas.soap.envelope.Body

      //get envelope
      XmlObject xmlObject = XmlObject.Factory.parse( incomingMsg );
      assertTrue( "The returned message was not a SOAP Envelope.", xmlObject instanceof EnvelopeDocument );
      EnvelopeDocument envelope = (EnvelopeDocument) xmlObject;
      Body             body = envelope.getEnvelope(  ).getBody(  );

      XmlObject        event = null;
      if ( isWrapped ) //wrapped
      {
         //get notify
View Full Code Here

Examples of railo.transformer.bytecode.Body

  /**
   * @see railo.transformer.cfml.evaluator.EvaluatorSupport#evaluate(org.w3c.dom.Element, railo.transformer.library.tag.TagLibTag)
   */
  public void evaluate(Tag tag,TagLibTag libTag) throws EvaluatorException {
    super.evaluate(tag,libTag);
    Body body = tag.getBody();
    List statments = body.getStatements();
    Statement stat;
    Iterator it = statments.iterator();
    Tag t;
    while(it.hasNext()) {
      stat=(Statement) it.next();
View Full Code Here

Examples of rocks.xmpp.extensions.httpbind.model.Body

    @Test
    public void unmarshalHostGone() throws XMLStreamException, JAXBException {
        String xml = "<body type='terminate'\n" +
                "      condition='host-gone'\n" +
                "      xmlns='http://jabber.org/protocol/httpbind'/>";
        Body body = unmarshal(xml, Body.class);
        Assert.assertEquals(body.getType(), Body.Type.TERMINATE);
        Assert.assertEquals(body.getCondition(), Body.Condition.HOST_GONE);
    }
View Full Code Here

Examples of soot.Body

      SootMethod container = guard.container;
      Stmt insertionPoint = guard.stmt;
      if(!container.hasActiveBody()) {
        G.v().out.println("WARNING: Tried to insert guard into "+container+" but couldn't because method has no body.");
      } else {
        Body body = container.getActiveBody();
       
        //exc = new Error
        RefType runtimeExceptionType = RefType.v("java.lang.Error");
        NewExpr newExpr = Jimple.v().newNewExpr(runtimeExceptionType);
        LocalGenerator lg = new LocalGenerator(body);
        Local exceptionLocal = lg.generateLocal(runtimeExceptionType);
        AssignStmt assignStmt = Jimple.v().newAssignStmt(exceptionLocal, newExpr);
        body.getUnits().insertBefore(assignStmt, insertionPoint);
       
        //exc.<init>(message)
        SootMethodRef cref = runtimeExceptionType.getSootClass().getMethod("<init>", Collections.singletonList(RefType.v("java.lang.String"))).makeRef();
        SpecialInvokeExpr constructorInvokeExpr = Jimple.v().newSpecialInvokeExpr(exceptionLocal, cref, StringConstant.v(guard.message));
        InvokeStmt initStmt = Jimple.v().newInvokeStmt(constructorInvokeExpr);
        body.getUnits().insertAfter(initStmt, assignStmt);
       
        if(options.guards().equals("print")) {
          //exc.printStackTrace();
          VirtualInvokeExpr printStackTraceExpr = Jimple.v().newVirtualInvokeExpr(exceptionLocal, Scene.v().getSootClass("java.lang.Throwable").getMethod("printStackTrace", Collections.emptyList()).makeRef());
          InvokeStmt printStackTraceStmt = Jimple.v().newInvokeStmt(printStackTraceExpr);
          body.getUnits().insertAfter(printStackTraceStmt, initStmt);
        } else if(options.guards().equals("throw")) {
          body.getUnits().insertAfter(Jimple.v().newThrowStmt(exceptionLocal), initStmt);
        } else {
          throw new RuntimeException("Invalid value for phase option (guarding): "+options.guards());
        }
      }
    }
View Full Code Here

Examples of soot.Body

    }
    private void processNewMethod( SootMethod m ) {
        if( m.isNative() || m.isPhantom() ) {
            return;
        }
        Body b = m.retrieveActiveBody();
        getImplicitTargets( m );
        findReceivers(m, b);
    }
View Full Code Here

Examples of soot.Body

        final SootClass scl = source.getDeclaringClass();
        if( source.isNative() || source.isPhantom() ) return;
        if( source.getSubSignature().indexOf( "<init>" ) >= 0 ) {
            handleInit(source, scl);
        }
        Body b = source.retrieveActiveBody();
        for( Iterator sIt = b.getUnits().iterator(); sIt.hasNext(); ) {
            final Stmt s = (Stmt) sIt.next();
            if( s.containsInvokeExpr() ) {
                InvokeExpr ie = s.getInvokeExpr();
                if( ie.getMethodRef().getSignature().equals( "<java.lang.reflect.Method: java.lang.Object invoke(java.lang.Object,java.lang.Object[])>" ) ) {
                  reflectionModel.methodInvoke(source,s);
View Full Code Here

Examples of soot.Body

      for (SootMethod sootMethod : methodsWithRightName) {
        if(coversLineNumber(lineNumber, sootMethod)) {
          return Collections.singleton(sootMethod);
        }
        if(sootMethod.hasActiveBody()) {
          Body body = sootMethod.getActiveBody();
          if(coversLineNumber(lineNumber, body)) {
            return Collections.singleton(sootMethod);
          }
          for (Unit u : body.getUnits()) {
            if(coversLineNumber(lineNumber, u)) {
              return Collections.singleton(sootMethod);
            }
          }
        }
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.