本文整理汇总了Java中com.google.gwt.user.client.rpc.impl.AbstractSerializationStream类的典型用法代码示例。如果您正苦于以下问题:Java AbstractSerializationStream类的具体用法?Java AbstractSerializationStream怎么用?Java AbstractSerializationStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractSerializationStream类属于com.google.gwt.user.client.rpc.impl包,在下文中一共展示了AbstractSerializationStream类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testElision
import com.google.gwt.user.client.rpc.impl.AbstractSerializationStream; //导入依赖的package包/类
public void testElision() throws SerializationException {
ObjectGraphTestServiceAsync async = getServiceAsync();
SerializationStreamWriter writer = ((SerializationStreamFactory) async)
.createStreamWriter();
AbstractSerializationStream stream = (AbstractSerializationStream) writer;
assertEquals(
"Missing flag",
expectedObfuscationState(),
stream.hasFlags(AbstractSerializationStream.FLAG_ELIDE_TYPE_NAMES));
SerializableDoublyLinkedNode node = new SerializableDoublyLinkedNode();
writer.writeObject(node);
String s = writer.toString();
// Don't use class.getName() due to conflict with removal of type names
assertEquals("Checking for SerializableDoublyLinkedNode",
expectedObfuscationState(),
!s.contains("SerializableDoublyLinkedNode"));
}
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:21,代码来源:ObjectGraphTest.java
示例2: serialize
import com.google.gwt.user.client.rpc.impl.AbstractSerializationStream; //导入依赖的package包/类
public <T> String serialize(Class<? super T> clazz, T instance, SerializationPolicy serializationPolicy) throws SerializationException {
if (instance == null) {
return null;
}else if(String.class.equals(clazz)){
return (String) instance;
}
if (serializationPolicy == null) {
throw new IllegalArgumentException("SerializationPolicy is null, please call StorageUtils.PolicyLoader.load(...) before");
}
ServerSerializationStreamWriter stream = new ServerSerializationStreamWriter(serializationPolicy);
stream.setFlags(AbstractSerializationStream.DEFAULT_FLAGS);
stream.prepareToWrite();
if (clazz != void.class) {
stream.serializeValue(instance, clazz);
}
return stream.toString();
}
开发者ID:seanchenxi,项目名称:gwt-storage,代码行数:20,代码来源:ServerStorageSerializer.java
示例3: invokeAndEncodeResponse
import com.google.gwt.user.client.rpc.impl.AbstractSerializationStream; //导入依赖的package包/类
public static String invokeAndEncodeResponse(Object target,
Method serviceMethod,
Object[] args,
SerializationPolicy serializationPolicy)
throws SerializationException {
return invokeAndEncodeResponse(target, serviceMethod, args, serializationPolicy,
AbstractSerializationStream.DEFAULT_FLAGS);
}
开发者ID:kaaproject,项目名称:kaa,代码行数:9,代码来源:RpcHelper.java
示例4: invokeAndEncodeResponse
import com.google.gwt.user.client.rpc.impl.AbstractSerializationStream; //导入依赖的package包/类
public static String invokeAndEncodeResponse(Object target, Method serviceMethod, Object[] args,
SerializationPolicy serializationPolicy) throws SerializationException {
return invokeAndEncodeResponse(target, serviceMethod, args, serializationPolicy,
AbstractSerializationStream.DEFAULT_FLAGS);
}
开发者ID:kaaproject,项目名称:sandbox-frame,代码行数:6,代码来源:RPCHelper.java
注:本文中的com.google.gwt.user.client.rpc.impl.AbstractSerializationStream类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论