当前位置: 首页>>代码示例>>Java>>正文


Java ApiTypeInfo类代码示例

本文整理汇总了Java中io.vertx.codegen.type.ApiTypeInfo的典型用法代码示例。如果您正苦于以下问题:Java ApiTypeInfo类的具体用法?Java ApiTypeInfo怎么用?Java ApiTypeInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ApiTypeInfo类属于io.vertx.codegen.type包,在下文中一共展示了ApiTypeInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: apiType

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Override
public ApiTypeModel apiType(ApiTypeInfo type) {
  functionTypes.add(type);
  return new ApiTypeModel(this, type) {
    @Override
    public ExpressionModel onMethodInvocation(TypeInfo receiverType, MethodSignature method, TypeInfo returnType, List<TypeArg> typeArguments, List<ExpressionModel> argumentModels, List<TypeInfo> argumentTypes) {
      return super.onMethodInvocation(receiverType, method, returnType, typeArguments, argumentModels, argumentTypes);
    }
  };
}
 
开发者ID:vert-x3,项目名称:vertx-lang-ceylon,代码行数:11,代码来源:CeylonCodeBuilder.java

示例2: renderType

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
private void renderType(TypeInfo type, KotlinCodeWriter renderer) {
  if (type instanceof ApiTypeInfo) {
    renderer.renderApiType((ApiTypeInfo) type);
  } else if (type instanceof ClassTypeInfo) {
    renderer.renderJavaType((ClassTypeInfo) type);
  } else if (type instanceof PrimitiveTypeInfo) {
    renderer.renderBasicType(type);
  } else {
    renderer.append(type.getName());
  }
}
 
开发者ID:vert-x3,项目名称:vertx-codetrans,代码行数:12,代码来源:KotlinCodeBuilder.java

示例3: isInstanceOfHandler

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
public static boolean isInstanceOfHandler(TypeInfo type) {
  if (type instanceof ApiTypeInfo) {
    ApiTypeInfo apiType = (ApiTypeInfo) type;
    return apiType.isHandler();
  }
  return false;
}
 
开发者ID:vert-x3,项目名称:vertx-codetrans,代码行数:8,代码来源:Helper.java

示例4: testModuleScopedApiModel

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testModuleScopedApiModel() throws Exception {
  ClassModel model = new Generator().generateClass(ModuleScopedApi.class);
  assertEquals(ModuleScopedApi.class.getName(), model.getIfaceFQCN());
  assertEquals("io.vertx.test.codegen.testmodule.modulescoped", model.getModule().getPackageName());
  assertEquals("simple", model.getModule().getName());
  ApiTypeInfo type = (ApiTypeInfo) model.getType();
  assertEquals("io.vertx.test.groovy.codegen.testmodule.modulescoped.ModuleScopedApi", type.translateName("groovy"));
  assertEquals("io.vertx.test.ceylon.simple.ModuleScopedApi", type.translateName(TypeNameTranslator.composite("ceylon")));
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ModuleTest.java

示例5: testEmptyPkg

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testEmptyPkg() throws Exception {
  ClassModel model = new Generator().generateClass(EmptyPkg.class);
  assertEquals(EmptyPkg.class.getName(), model.getIfaceFQCN());
  assertEquals("io.vertx.test.codegen.testmodule.emptypkg", model.getModule().getPackageName());
  assertEquals("simple", model.getModule().getName());
  ApiTypeInfo type = (ApiTypeInfo) model.getType();
  assertEquals("io.vertx.test.groovy.codegen.testmodule.emptypkg.empty.sub.EmptyPkg", type.translateName("groovy"));
  assertEquals("io.vertx.test.ceylon.simple.empty.sub.EmptyPkg", type.translateName(TypeNameTranslator.composite("ceylon")));
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ModuleTest.java

示例6: testModuleScopedSubApiModel

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testModuleScopedSubApiModel() throws Exception {
  ClassModel model = new Generator().generateClass(ModuleScopedSubApi.class);
  assertEquals(ModuleScopedSubApi.class.getName(), model.getFqn());
  assertEquals("io.vertx.test.codegen.testmodule.modulescoped", model.getModule().getPackageName());
  assertEquals("simple", model.getModule().getName());
  ApiTypeInfo type = (ApiTypeInfo) model.getType();
  assertEquals("io.vertx.test.groovy.codegen.testmodule.modulescoped.sub.ModuleScopedSubApi", type.translateName("groovy"));
  assertEquals("io.vertx.test.ceylon.simple.sub.ModuleScopedSubApi", type.translateName(TypeNameTranslator.composite("ceylon")));
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ModuleTest.java

示例7: testVertxCoreModuleScopedApiModel

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testVertxCoreModuleScopedApiModel() throws Exception {
  ClassModel model = new Generator().generateClass(VertxCoreModuleScopedApi.class);
  assertEquals(VertxCoreModuleScopedApi.class.getName(), model.getIfaceFQCN());
  assertEquals("io.vertx.test.codegen.testmodule.vertx.core", model.getModule().getPackageName());
  assertEquals("vertx", model.getModule().getName());
  ApiTypeInfo type = (ApiTypeInfo) model.getType();
  assertEquals("io.vertx.groovy.test.codegen.testmodule.vertx.core.VertxCoreModuleScopedApi", type.translateName("groovy"));
  assertEquals("io.vertx.ceylon.core.VertxCoreModuleScopedApi", type.translateName(TypeNameTranslator.composite("ceylon")));
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ModuleTest.java

示例8: testVertxOtherModuleScopedApiModel

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testVertxOtherModuleScopedApiModel() throws Exception {
  ClassModel model = new Generator().generateClass(VertxOtherModuleScopedApi.class);
  assertEquals(VertxOtherModuleScopedApi.class.getName(), model.getIfaceFQCN());
  assertEquals("io.vertx.test.codegen.testmodule.vertx.other", model.getModule().getPackageName());
  assertEquals("vertx-other", model.getModule().getName());
  ApiTypeInfo type = (ApiTypeInfo) model.getType();
  assertEquals("io.vertx.groovy.test.codegen.testmodule.vertx.other.VertxOtherModuleScopedApi", type.translateName("groovy"));
  assertEquals("io.vertx.ceylon.other.VertxOtherModuleScopedApi", type.translateName(TypeNameTranslator.composite("ceylon")));
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ModuleTest.java

示例9: testInterfaceExtendingReadStream

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testInterfaceExtendingReadStream() throws Exception {
  ClassModel model = new Generator().generateClass(InterfaceExtentingReadStream.class);
  ApiTypeInfo apiType = (ApiTypeInfo) model.getType();
  assertTrue(apiType.isReadStream());
  assertEquals(TypeReflectionFactory.create(String.class), apiType.getReadStreamArg());
  assertFalse(apiType.isWriteStream());
  assertNull(apiType.getWriteStreamArg());
  assertFalse(apiType.isHandler());
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ClassTest.java

示例10: 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());
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:12,代码来源:ClassTest.java

示例11: testInterfaceExtendingWriteStream

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testInterfaceExtendingWriteStream() throws Exception {
  ClassModel model = new Generator().generateClass(InterfaceExtentingWriteStream.class);
  ApiTypeInfo apiType = (ApiTypeInfo) model.getType();
  assertFalse(apiType.isReadStream());
  assertNull(apiType.getReadStreamArg());
  assertTrue(apiType.isWriteStream());
  assertEquals(TypeReflectionFactory.create(String.class), apiType.getWriteStreamArg());
  assertFalse(apiType.isHandler());
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ClassTest.java

示例12: testGenericInterfaceExtendingWriteStream

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testGenericInterfaceExtendingWriteStream() throws Exception {
  ClassModel model = new Generator().generateClass(GenericInterfaceExtentingWriteStream.class);
  ApiTypeInfo apiType = (ApiTypeInfo) model.getType().getRaw();
  assertFalse(apiType.isReadStream());
  assertNull(apiType.getReadStreamArg());
  assertTrue(apiType.isWriteStream());
  TypeVariableInfo writeStreamArg = (TypeVariableInfo) apiType.getWriteStreamArg();
  assertEquals("U", writeStreamArg.getName());
  assertFalse(apiType.isHandler());
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:12,代码来源:ClassTest.java

示例13: testInterfaceExtendingReadStreamAndWriteStream

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testInterfaceExtendingReadStreamAndWriteStream() throws Exception {
  ClassModel model = new Generator().generateClass(InterfaceExtentingReadStreamAndWriteStream.class);
  ApiTypeInfo apiType = (ApiTypeInfo) model.getType();
  assertTrue(apiType.isReadStream());
  assertEquals(TypeReflectionFactory.create(String.class), apiType.getReadStreamArg());
  assertTrue(apiType.isWriteStream());
  assertEquals(TypeReflectionFactory.create(String.class), apiType.getWriteStreamArg());
  assertFalse(apiType.isHandler());
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ClassTest.java

示例14: 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());
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:13,代码来源:ClassTest.java

示例15: testInterfaceSubtypingReadStream

import io.vertx.codegen.type.ApiTypeInfo; //导入依赖的package包/类
@Test
public void testInterfaceSubtypingReadStream() throws Exception {
  ClassModel model = new Generator().generateClass(InterfaceSubtypingReadStream.class);
  ApiTypeInfo apiType = (ApiTypeInfo) model.getType();
  assertTrue(apiType.isReadStream());
  assertEquals(TypeReflectionFactory.create(String.class), apiType.getReadStreamArg());
  assertFalse(apiType.isWriteStream());
  assertNull(apiType.getWriteStreamArg());
  assertFalse(apiType.isHandler());
}
 
开发者ID:vert-x3,项目名称:vertx-codegen,代码行数:11,代码来源:ClassTest.java


注:本文中的io.vertx.codegen.type.ApiTypeInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。