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


Java IndexView类代码示例

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


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

示例1: index

import org.jboss.jandex.IndexView; //导入依赖的package包/类
@Produces
@DeploymentScoped
@Default
IndexView index() {
    Indexer indexer = new Indexer();
    Map<ArchivePath, Node> c = context.getCurrentArchive().getContent();
    try {
        for (Map.Entry<ArchivePath, Node> each : c.entrySet()) {
            if (each.getKey().get().endsWith(CLASS_SUFFIX)) {
                indexer.index(each.getValue().getAsset().openStream());
            }
        }
    } catch (IOException e) {
        throw new RuntimeException(e);
    }

    return indexer.complete();
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:19,代码来源:DeploymentProducer.java

示例2: contribute

import org.jboss.jandex.IndexView; //导入依赖的package包/类
@Override
public void contribute(InFlightMetadataCollector metadataCollector, IndexView jandexIndex) {
    MetadataBuildingOptions options = metadataCollector.getMetadataBuildingOptions();
    ClassLoaderService classLoaderService = options.getServiceRegistry().getService(ClassLoaderService.class);

    final ClassLoaderAccess classLoaderAccess = new ClassLoaderAccessImpl(
            options.getTempClassLoader(),
            classLoaderService
    );

    this.metadataBuildingContext = new MetadataBuildingContextRootImpl(
            options,
            classLoaderAccess,
            metadataCollector
    );

        java.util.Collection<PersistentEntity> persistentEntities = hibernateMappingContext.getPersistentEntities();
    for (PersistentEntity persistentEntity : persistentEntities) {
        if(!persistentEntity.getJavaClass().isAnnotationPresent(Entity.class)) {
            if(ConnectionSourcesSupport.usesConnectionSource(persistentEntity, dataSourceName) && persistentEntity.isRoot()) {
                bindRoot((HibernatePersistentEntity) persistentEntity, metadataCollector, sessionFactoryName);
            }
        }
    }
}
 
开发者ID:grails,项目名称:gorm-hibernate5,代码行数:26,代码来源:GrailsDomainBinder.java

示例3: loadDependentIndexes

import org.jboss.jandex.IndexView; //导入依赖的package包/类
protected IndexView loadDependentIndexes() {
    List<IndexView> indexes = this.project.getArtifacts()
            .stream()
            .map(artifact -> {
                try {
                    return loadIndex(artifact);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return null;
            })
            .filter(Objects::nonNull)
            .collect(Collectors.toList());

    return CompositeIndex.create(indexes);
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:17,代码来源:ConfigurableDocumentationGenerator.java

示例4: loadDependentIndexFromArchive

import org.jboss.jandex.IndexView; //导入依赖的package包/类
protected IndexView loadDependentIndexFromArchive(File archive) throws IOException {
    try (JarFile jar = new JarFile(archive)) {

        ZipEntry entry = jar.getEntry("META-INF/" + Jandexer.INDEX_NAME);
        if (entry != null) {
            return loadIndex(jar.getInputStream(entry));

        }
        Indexer indexer = new Indexer();

        Enumeration<JarEntry> entries = jar.entries();

        while (entries.hasMoreElements()) {
            JarEntry each = entries.nextElement();
            if (each.getName().endsWith(".class") && !each.getName().equals("module-info.class")) {
                try (InputStream in = jar.getInputStream(each)) {
                    indexer.index(in);
                }
            }

        }

        return indexer.complete();
    }
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:26,代码来源:ConfigurableDocumentationGenerator.java

示例5: process

import org.jboss.jandex.IndexView; //导入依赖的package包/类
protected void process(IndexView ownIndex, IndexView totalIndex) {
    Collection<ClassInfo> fractions = ownIndex.getAllKnownImplementors(FRACTION_CLASS);

    for (ClassInfo fraction : fractions) {
        new ResourceDocumentationGatherer(this.log, this.documentationRegistry, totalIndex, fraction).gather();
    }

    Collection<AnnotationInstance> annos = ownIndex.getAnnotations(CONFIGURABLE_ANNOTATION);

    for (AnnotationInstance anno : annos) {
        AnnotationTarget annoTarget = anno.target();
        if (annoTarget.kind().equals(AnnotationTarget.Kind.FIELD)) {
            ClassInfo declaringClass = annoTarget.asField().declaringClass();
            if (!fractions.contains(declaringClass)) {
                new AnnotationDocumentationGatherer(this.log, this.documentationRegistry, totalIndex, anno).gather();
            }
        }
    }
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:20,代码来源:ConfigurableDocumentationGenerator.java

示例6: loadIndex

import org.jboss.jandex.IndexView; //导入依赖的package包/类
protected IndexView loadIndex(Artifact dep) throws IOException {
    if (dep.getFile() == null) {
        return null;
    }

    return loadDependentIndexFromArchive(dep.getFile());
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:8,代码来源:ConfigurableDocumentationGenerator.java

示例7: ServiceClientProcessor

import org.jboss.jandex.IndexView; //导入依赖的package包/类
@Inject
public ServiceClientProcessor(Archive archive, IndexView index) {
    this.archive = archive;
    this.index = index;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:6,代码来源:ServiceClientProcessor.java

示例8: AdvertisingMetadataProcessor

import org.jboss.jandex.IndexView; //导入依赖的package包/类
@Inject
public AdvertisingMetadataProcessor(Archive archive, IndexView index) {
    this.archive = archive;
    this.index = index;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:6,代码来源:AdvertisingMetadataProcessor.java

示例9: MPJWTAuthExtensionArchivePreparer

import org.jboss.jandex.IndexView; //导入依赖的package包/类
@Inject
@SuppressWarnings("unused")
public MPJWTAuthExtensionArchivePreparer(Archive archive, IndexView index) {
    this.archive = archive;
    this.index = index;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:7,代码来源:MPJWTAuthExtensionArchivePreparer.java

示例10: HealthAnnotationProcessor

import org.jboss.jandex.IndexView; //导入依赖的package包/类
@Inject
public HealthAnnotationProcessor(Archive archive, IndexView index) {
    this.archive = archive;
    this.index = index;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:6,代码来源:HealthAnnotationProcessor.java

示例11: buildIndex

import org.jboss.jandex.IndexView; //导入依赖的package包/类
protected IndexView buildIndex(IndexView ownIndex) {
    IndexView dependentIndexes = loadDependentIndexes();

    return CompositeIndex.create(ownIndex, dependentIndexes);
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:6,代码来源:ConfigurableDocumentationGenerator.java

示例12: AnnotationDocumentationGatherer

import org.jboss.jandex.IndexView; //导入依赖的package包/类
public AnnotationDocumentationGatherer(Log log, DocumentationRegistry documentationRegistry, IndexView totalIndex, AnnotationInstance anno) {
    super(log, documentationRegistry, totalIndex);
    this.anno = anno;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:5,代码来源:AnnotationDocumentationGatherer.java

示例13: SubresourcesDocumentationGatherer

import org.jboss.jandex.IndexView; //导入依赖的package包/类
public SubresourcesDocumentationGatherer(Log log, DocumentationRegistry registry, IndexView index, String name, ClassInfo subresourceInfo) {
    super(log, registry, index);
    this.name = name;
    this.subresourceInfo = subresourceInfo;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:6,代码来源:SubresourcesDocumentationGatherer.java

示例14: DocumentationGatherer

import org.jboss.jandex.IndexView; //导入依赖的package包/类
public DocumentationGatherer(Log log, DocumentationRegistry registry, IndexView index) {
    this.log = log;
    this.registry = registry;
    this.index = index;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:6,代码来源:DocumentationGatherer.java

示例15: ResourceDocumentationGatherer

import org.jboss.jandex.IndexView; //导入依赖的package包/类
public ResourceDocumentationGatherer(Log log, DocumentationRegistry registry, IndexView index, ClassInfo resourceClassInfo) {
    this(log, nameFor(resourceClassInfo), registry, index, resourceClassInfo);
    this.isRootFraction = true;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm-fraction-plugin,代码行数:5,代码来源:ResourceDocumentationGatherer.java


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