Examples of unwrap()


Examples of org.jclouds.cloudstack.CloudStackContext.unwrap()

         context =  ContextBuilder.newBuilder(new CloudStackApiMetadata())
               .endpoint(checkNotNull(endpoint, "endpoint").toASCIIString())
               .credentials(String.format("%s/%s", checkNotNull(domain, "domain"), checkNotNull(username, "username")), password)
               .overrides(overrides).build(CloudStackContext.class);

         CloudStackClient client = context.unwrap(CloudStackApiMetadata.CONTEXT_TOKEN).getApi();
         Set<Account> listOfAccounts = client.getAccountClient().listAccounts();

         domain = (domain.equals("") || domain.equals("/")) ? "ROOT" : domain;
         for (Account account : listOfAccounts) {
            for (User user : account.getUsers()) {
View Full Code Here

Examples of org.jclouds.compute.ComputeServiceContext.unwrap()

   @Test
   public void testUnwrapIsCorrectType() {
      ComputeServiceContext context = ContextBuilder.newBuilder("smartos-ssh")
               .modules(ImmutableSet.<Module> of(getSshModule())).build(ComputeServiceContext.class);

      assertEquals(context.unwrap().getClass(), ContextImpl.class);

      context.close();
   }

   protected Module getSshModule() {
View Full Code Here

Examples of org.jsoup.nodes.Element.unwrap()

    element.appendChild(topDiv);

    // wrap topDiv
    topDiv.wrap(html);
    // now unwrap topDiv - will remove it from the hierarchy
    topDiv.unwrap();
   
    return element;
  }
 
  /**
 
View Full Code Here

Examples of org.mozilla.javascript.NativeJavaObject.unwrap()

  public Object convert(final Object o)
  {
    if (o instanceof NativeJavaObject)
    {
      final NativeJavaObject object = (NativeJavaObject) o;
      return object.unwrap();
    }
    if (o instanceof NativeArray)
    {
      final NativeArray array = (NativeArray) o;
      final Object[] result = new Object[(int) array.getLength()];
View Full Code Here

Examples of org.mozilla.javascript.Wrapper.unwrap()

     */
    public Scriptable getElementWrapper(Object e) {
        WeakReference ref = (WeakReference) wrappercache.get(e);
        Wrapper wrapper = ref == null ? null : (Wrapper) ref.get();

        if (wrapper == null || wrapper.unwrap() != e) {
            // Gotta find out the prototype name to use for this object...
            String prototypeName = app.getPrototypeName(e);
            Scriptable op = getPrototype(prototypeName);

            if (op == null) {
View Full Code Here

Examples of org.olap4j.OlapConnection.unwrap()

        && ISaikuConnection.OLAP_DATASOURCE.equals(con.getDatasourceType())
        && con.getConnection() instanceof OlapConnection)
    {
      OlapConnection olapCon = (OlapConnection) con.getConnection();
      try {
        RolapConnection rCon = olapCon.unwrap(RolapConnection.class);
      } catch (SQLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      //rCon.setRole(myCustomRoleImplementation);
View Full Code Here

Examples of org.olap4j.OlapWrapper.unwrap()

  }   

  private OlapConnection unwrap(Connection conn) throws TranslatorException {
      try {
        OlapWrapper wrapper = conn.unwrap(OlapWrapper.class);
        OlapConnection olapConn = wrapper.unwrap(OlapConnection.class);
        return olapConn;
      } catch(SQLException e) {
        throw new TranslatorException(e);
      }   
  }
View Full Code Here

Examples of org.renjin.gcc.runtime.DoublePtr.unwrap()

    Method method = clazz.getMethod("testmax", DoublePtr.class);
   
    DoublePtr x = new DoublePtr(-1);
    method.invoke(null, x);

    assertThat(x.unwrap(), equalTo(0d));
   
    x = new DoublePtr(Double.NaN);
    method.invoke(null, x);
   
    System.out.println(x.unwrap());
View Full Code Here

Examples of org.renjin.gcc.runtime.IntPtr.unwrap()

    Method iftest = clazz.getMethod("iftest_", IntPtr.class, IntPtr.class);
    IntPtr x = new IntPtr(0);

    iftest.invoke(null, new IntPtr(12), x);

    assertThat(x.unwrap(), equalTo(1));

  }

  @Test
  public void chars() throws Exception {
View Full Code Here

Examples of org.zeromq.ZMsg.unwrap()

            ZMsg msg = null;
            if (backends[0].isReadable()) {
                msg = ZMsg.recvMsg(localbe);
                if (msg == null)
                    break;          //  Interrupted
                ZFrame address = msg.unwrap();
                workers.add(address);
                capacity++;

                //  If it's READY, don't route the message any further
                ZFrame frame = msg.getFirst();
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.