本文整理汇总了Java中io.vertx.codegen.type.ApiTypeInfo.getReadStreamArg方法的典型用法代码示例。如果您正苦于以下问题:Java ApiTypeInfo.getReadStreamArg方法的具体用法?Java ApiTypeInfo.getReadStreamArg怎么用?Java ApiTypeInfo.getReadStreamArg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.vertx.codegen.type.ApiTypeInfo
的用法示例。
在下文中一共展示了ApiTypeInfo.getReadStreamArg方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGenericInterfaceExtendingReadStream
import io.vertx.codegen.type.ApiTypeInfo; //导入方法依赖的package包/类
@Test
public void testGenericInterfaceExtendingReadStream() throws Exception {
ClassModel model = new Generator().generateClass(GenericInterfaceExtentingReadStream.class);
ApiTypeInfo apiType = (ApiTypeInfo) model.getType().getRaw();
assertTrue(apiType.isReadStream());
TypeVariableInfo readStreamArg = (TypeVariableInfo) apiType.getReadStreamArg();
assertEquals("U", readStreamArg.getName());
assertFalse(apiType.isWriteStream());
assertNull(apiType.getWriteStreamArg());
assertFalse(apiType.isHandler());
}
示例2: testGenericInterfaceExtendingReadStreamAndWriteStream
import io.vertx.codegen.type.ApiTypeInfo; //导入方法依赖的package包/类
@Test
public void testGenericInterfaceExtendingReadStreamAndWriteStream() throws Exception {
ClassModel model = new Generator().generateClass(GenericInterfaceExtentingReadStreamAndWriteStream.class);
ApiTypeInfo apiType = (ApiTypeInfo) model.getType().getRaw();
assertTrue(apiType.isReadStream());
TypeVariableInfo readStreamArg = (TypeVariableInfo) apiType.getReadStreamArg();
assertEquals("U", readStreamArg.getName());
assertTrue(apiType.isWriteStream());
TypeVariableInfo writeStreamArg = (TypeVariableInfo) apiType.getWriteStreamArg();
assertEquals("U", writeStreamArg.getName());
assertFalse(apiType.isHandler());
}
示例3: testReadStreamWithParameterizedTypeArg
import io.vertx.codegen.type.ApiTypeInfo; //导入方法依赖的package包/类
@Test
public void testReadStreamWithParameterizedTypeArg() throws Exception {
ClassModel model = new Generator().generateClass(ReadStreamWithParameterizedTypeArg.class);
ApiTypeInfo apiType = (ApiTypeInfo) model.getType().getRaw();
assertTrue(apiType.isReadStream());
ParameterizedTypeInfo readStreamArg = (ParameterizedTypeInfo) apiType.getReadStreamArg();
assertEquals(TypeReflectionFactory.create(List.class), readStreamArg.getRaw());
assertEquals(1, readStreamArg.getArgs().size());
assertEquals("T", readStreamArg.getArgs().get(0).getName());
assertFalse(apiType.isWriteStream());
assertNull(apiType.getWriteStreamArg());
assertFalse(apiType.isHandler());
}