Examples of unwrap()


Examples of com.alibaba.druid.mock.MockResultSetMetaData.unwrap()

    public void test_resultSet_metadata() throws Exception {
        MockResultSetMetaData meta = new MockResultSetMetaData();
        Assert.assertTrue(meta.isWrapperFor(MockResultSetMetaData.class));
        Assert.assertFalse(meta.isWrapperFor(BigDecimal.class));
        Assert.assertTrue(meta.unwrap(MockResultSetMetaData.class) instanceof MockResultSetMetaData);
        Assert.assertTrue(meta.unwrap(ResultSetMetaDataBase.class) instanceof MockResultSetMetaData);
        Assert.assertTrue(meta.unwrap(ResultSetMetaData.class) instanceof MockResultSetMetaData);
        Assert.assertTrue(meta.unwrap(null) == null);
        Assert.assertTrue(meta.unwrap(java.sql.ResultSetMetaData.class) != null);
        Assert.assertTrue(meta.unwrap(Object.class) != null);
View Full Code Here

Examples of com.alibaba.druid.pool.DruidDataSourceC3P0Adapter.unwrap()

        Assert.assertTrue(dataSource.isWrapperFor(DruidDataSourceC3P0Adapter.class));
        Assert.assertTrue(dataSource.isWrapperFor(DruidDataSource.class));
        Assert.assertTrue(dataSource.isWrapperFor(DataSource.class));
        Assert.assertFalse(dataSource.isWrapperFor(null));

        Assert.assertNotNull(dataSource.unwrap(DruidDataSourceC3P0Adapter.class));
        Assert.assertNotNull(dataSource.unwrap(DruidDataSource.class));
        Assert.assertNotNull(dataSource.unwrap(DataSource.class));
        Assert.assertNull(dataSource.unwrap(null));

        dataSource.setProperties(dataSource.getProperties());
View Full Code Here

Examples of com.alibaba.druid.pool.DruidPooledConnection.unwrap()

    @Override
    public XAConnection getXAConnection() throws SQLException {
        DruidPooledConnection conn = this.getConnection();

        Connection physicalConn = conn.unwrap(Connection.class);

        XAConnection rawXAConnection = createPhysicalXAConnection(physicalConn);

        return new DruidPooledXAConnection(conn, rawXAConnection);
    }
View Full Code Here

Examples of com.alibaba.druid.pool.PoolableWrapper.unwrap()

    }

    public void test_unwrap() throws Exception {
        PoolableWrapper wrapper = new PoolableWrapper(new MockConnection());

        Assert.assertEquals(null, wrapper.unwrap(null));
        Assert.assertEquals(true, wrapper.unwrap(PoolableWrapper.class) != null);
        Assert.assertEquals(true, wrapper.unwrap(MockConnection.class) != null);
    }
}
View Full Code Here

Examples of com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.unwrap()

        Assert.assertEquals(9, dataSource.getRawDriverMinorVersion());

        Assert.assertFalse(connection.isWrapperFor(com.mysql.jdbc.Connection.class));
        Assert.assertTrue(connection.isWrapperFor(ConnectionProxyImpl.class));
        Assert.assertTrue(connection.isWrapperFor(org.apache.derby.impl.jdbc.EmbedConnection.class));
        Assert.assertNotNull(connection.unwrap(ConnectionProxyImpl.class));
        Assert.assertNull(connection.unwrap(null));

        org.apache.derby.impl.jdbc.EmbedConnection derbyConnection = connection.unwrap(org.apache.derby.impl.jdbc.EmbedConnection.class);
        Assert.assertNotNull(derbyConnection);
View Full Code Here

Examples of com.blazebit.cdi.exception.annotation.CatchHandler.unwrap()

          "The interceptor annotation can not be determined!");
    }

    CatchHandling[] exceptionHandlingAnnotations = exceptionHandlerAnnotation
        .value();
    Class<? extends Throwable>[] unwrap = exceptionHandlerAnnotation
        .unwrap();

    try {
      return ic.proceed();
    } catch (Exception ex) {
View Full Code Here

Examples of com.caucho.hessian.io.Deflation.unwrap()

    try{
      fis = new FileInputStream(fileName);
      BufferedInputStream bis = new BufferedInputStream(fis);
      Hessian2Input his = new Hessian2Input(bis);
      Deflation dis = new Deflation();
      return dis.unwrap(his);
    }
    catch(Exception e){
      MessageGenerator.briefError("Problem opening stream for file: " + fileName);
    }
    return null;
View Full Code Here

Examples of com.google.gwt.dev.jjs.impl.gflow.constants.ConstantsAssumption.Updater.unwrap()

        for (CfgEdge e : graph.getOutEdges(x)) {
          if (CfgConditionalNode.THEN.equals(e.getRole())) {
            result.add(thenAssumptions.unwrap());
          } else if (CfgConditionalNode.ELSE.equals(e.getRole())) {
            result.add(elseAssumptions.unwrap());
          } else {
            result.add(assumption.unwrap());
          }
        }
      }
View Full Code Here

Examples of com.google.gwt.dev.jjs.impl.gflow.copy.CopyAssumption.Updater.unwrap()

        return targetVariable instanceof JParameter ||
            targetVariable instanceof JLocal;
      }
    });

    AssumptionUtil.setAssumptions(g.getOutEdges(node), result.unwrap(), assumptionMap);
  }
}
View Full Code Here

Examples of com.google.gwt.dev.jjs.impl.gflow.liveness.LivenessAssumption.Updater.unwrap()

          result.kill(target);
        }
      }
    });

    AssumptionUtil.setAssumptions(g.getInEdges(node), result.unwrap(), assumptionMap);
  }
}
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.