Examples of Context


Examples of com.daveayan.transformers.Context

  }
 
  public String toJson(Object object) {
    log.info("Converting to json " + object);
    StringBufferPrinter json_buffer = new StringBufferPrinter();
    Context context = Context.newInstance().put("rjson", this).and("json_buffer", json_buffer).and("cycle_set", new SoftReference<Set<?>>(new HashSet<Object>()));
    object_to_json_transformer.transform(object, String.class, context);
    log.info("json before formatting is : " + json_buffer.toString());
//    return json_buffer.toString();
    String json = json_buffer.toString();
    if(formatJson()) {
View Full Code Here

Examples of com.dianping.cat.message.spi.codec.PlainTextMessageCodec.Context

public class PlainTextMessageCodecTest {
  private void check(Message message, String expected) {
    PlainTextMessageCodec codec = new PlainTextMessageCodec();
    ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
    Context ctx = new Context().setBuffer(buf);

    codec.setBufferWriter(new EscapingBufferWriter());
    codec.encodeMessage(message, buf);

    String actual = buf.toString(Charset.forName("utf-8"));
View Full Code Here

Examples of com.dotcms.repackage.org.mozilla.javascript.Context

     */
    public Object call(Object object, String method, Object[] args)
        throws BSFException {

        Object retval = null;
        Context cx;

        try {
            cx = Context.enter();

            // REMIND: convert arg list Vectors here?

            Object fun = global.get(method, global);
            // NOTE: Source and line arguments are nonsense in a call().
            //       Any way to make these arguments *sensible?
            if (fun == Scriptable.NOT_FOUND)
                throw new EvaluatorException("function " + method +
                                             " not found.", "none", 0);

            cx.setOptimizationLevel(-1);
            cx.setGeneratingDebug(false);
            cx.setGeneratingSource(false);
            cx.setOptimizationLevel(0);
            cx.setDebugger(null, null);
           
            retval =
                ((Function) fun).call(cx, global, global, args);
           
//                ScriptRuntime.call(cx, fun, global, args, global);
View Full Code Here

Examples of com.dyuproject.ioc.Context

    References _refs;
    Map<String,Object> _map;
   
    public References()
    {
        Context context = Context.getCurrent();
        if(context!=null)
            context.getAppContext().addRefs(this);
    }
View Full Code Here

Examples of com.eclecticlogic.pedal.Context

        TransactionStatus status = null;
        try {
            status = getPlatformTransactionManager().getTransaction(getTransactionDefinition());
            logger.trace("start: new = {}", status.isNewTransaction() ? "yes" : "no");

            Context context = new ContextImpl();

            R retval = runner.apply(context);

            if (status.isRollbackOnly()) {
                getPlatformTransactionManager().rollback(status);
View Full Code Here

Examples of com.eclipsesource.restfuse.annotation.Context

  }

  public void tryInjectResponse( Response response ) {
    Field[] fields = target.getClass().getDeclaredFields();
    for( Field field : fields ) {
      Context contextAnnotation = field.getAnnotation( Context.class );
      if( contextAnnotation != null && field.getType() == Response.class ) {
        injectResponse( field, response );
      }
    }
  }
View Full Code Here

Examples of com.envoisolutions.sxc.Context

    public XPathEvaluator compile() {
        for (Map.Entry<String, XPathEventHandler> e : eventHandlers.entrySet()) {
            compileEventHandler(e.getKey(), e.getValue());
        }
       
        Context context = builder.compile();
        context.putAll(vars);
       
        return new XPathEvaluatorImpl(context);
    }
View Full Code Here

Examples of com.esotericsoftware.kryo.Context

    if (object == null) throw new IllegalArgumentException("object cannot be null.");
    SocketAddress address = udpRemoteAddress;
    if (address == null && udp != null) address = udp.connectedAddress;
    if (address == null && isConnected) throw new IllegalStateException("Connection is not connected via UDP.");

    Context context = Kryo.getContext();
    context.put("connection", this);
    context.put("connectionID", id);
    try {
      if (address == null) throw new SocketException("Connection is closed.");

      int length = udp.send(this, object, address);
      if (length == 0) {
View Full Code Here

Examples of com.esri.ontology.service.catalog.Context

    URL categoriesFileUrl = Thread.currentThread().getContextClassLoader().
      getResource(categoriesFilePath);
    URL gemetFileUrl = Thread.currentThread().getContextClassLoader().
      getResource(gemetFilePath);

    Context context = new Context();
    context.update(getServletContext());

    ContextInitializer contextInitializer =
      new ContextInitializer(context, categoriesFileUrl.toString(),
      gemetFileUrl.toString());
View Full Code Here

Examples of com.github.dandelion.core.Context

  @Before
  public void setup() {
    MockServletContext mockServletContext = new MockServletContext();
    MockPageContext mockPageContext = new MockPageContext(mockServletContext);
    request = (HttpServletRequest) mockPageContext.getRequest();
    request.setAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE, new Context(new MockFilterConfig()));
    confToBeApplied = new HashMap<ConfigToken<?>, Object>();
    tableConfiguration = new TableConfiguration(confToBeApplied, null, request);
    columnConfiguration = new ColumnConfiguration();
  }
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.