org.oasisopen.sca.annotation.Service.value()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中org.oasisopen.sca.annotation.Service.value()方法的一些代码示例,展示了Service.value()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Service.value()方法的具体详情如下:
包路径:org.oasisopen.sca.annotation.Service
类名称:Service
方法名:value

Service.value介绍

暂无

代码示例

代码示例来源:origin: com.carecon.fabric3/fabric3-introspection-java

public void visitType(org.oasisopen.sca.annotation.Service annotation, Class<?> type, InjectingComponentType componentType, IntrospectionContext context) {
  Class<?>[] services = annotation.value();
  String[] names = annotation.names();
  for (int i = 0; i < services.length; i++) {
    Class<?> service = services[i];
    componentType.add(createDefinition(service, names.length == 0 ? service.getSimpleName() : names[i], type, componentType, context));
  }
}

代码示例来源:origin: org.codehaus.fabric3/fabric3-introspection-java

public void visitType(Service annotation, Class<?> type, InjectingComponentType componentType, IntrospectionContext context) {
  for (Class<?> service : annotation.names()) {
    ServiceDefinition definition = createDefinition(service, type, componentType, context);
    componentType.add(definition);
  }
  Class<?> service = annotation.value();
  if (!Void.class.equals(service)) {
    ServiceDefinition definition = createDefinition(service, type, componentType, context);
    componentType.add(definition);
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

if (annotation.value().length == 0) {
  throw new IntrospectionException("[JCA90059] The array of interfaces or classes specified by the value attribute of the @Service annotation MUST contain at least one element");
Class<?>[] interfaces = annotation.value();
if (annotation.names().length > 0) {
  if (annotation.names().length != interfaces.length) {

相关文章