fractions/monitor/src/main/java/org/wildfly/swarm/monitor/runtime/HealthAnnotationProcessor.java [45:83]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static final DotName PATH = DotName.createSimple("javax.ws.rs.Path");

    public static final DotName APP_PATH = DotName.createSimple("javax.ws.rs.ApplicationPath");

    @Inject
    public HealthAnnotationProcessor(Archive archive, IndexView index) {
        this.archive = archive;
        this.index = index;
    }

    @Override
    public void process() throws NamingException {

        // first pass: jboss-web context root
        Optional<String> jbossWebContext = Optional.empty();
        //if (archive instanceof JBossWebContainer) {
        if (archive.getName().endsWith(".war")) {
            JBossWebContainer war = archive.as(WARArchive.class);
            if (war.getContextRoot() != null) {
                jbossWebContext = Optional.of(war.getContextRoot());
            }
        }

        // second pass: JAX-RS applications
        Optional<String> appPath = Optional.empty();
        Collection<AnnotationInstance> appPathAnnotations = index.getAnnotations(APP_PATH);
        for (AnnotationInstance annotation : appPathAnnotations) {
            if (annotation.target().kind() == AnnotationTarget.Kind.CLASS) {
                appPath = Optional.of(annotation.value().asString());
            }
        }

        // third pass: JAX-RS resources
        Collection<AnnotationInstance> pathAnnotations = index.getAnnotations(PATH);
        for (AnnotationInstance annotation : pathAnnotations) {
            if (annotation.target().kind() == AnnotationTarget.Kind.CLASS) {
                ClassInfo classInfo = annotation.target().asClass();

                for (MethodInfo methodInfo : classInfo.methods()) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



fractions/microprofile/microprofile-health/src/main/java/org/wildfly/swarm/microprofile/health/runtime/HealthAnnotationProcessor.java [48:86]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static final DotName PATH = DotName.createSimple("javax.ws.rs.Path");

    public static final DotName APP_PATH = DotName.createSimple("javax.ws.rs.ApplicationPath");

    @Inject
    public HealthAnnotationProcessor(Archive archive, IndexView index) {
        this.archive = archive;
        this.index = index;
    }

    @Override
    public void process() throws NamingException {

        // first pass: jboss-web context root
        Optional<String> jbossWebContext = Optional.empty();
        //if (archive instanceof JBossWebContainer) {
        if (archive.getName().endsWith(".war")) {
            JBossWebContainer war = archive.as(WARArchive.class);
            if (war.getContextRoot() != null) {
                jbossWebContext = Optional.of(war.getContextRoot());
            }
        }

        // second pass: JAX-RS applications
        Optional<String> appPath = Optional.empty();
        Collection<AnnotationInstance> appPathAnnotations = index.getAnnotations(APP_PATH);
        for (AnnotationInstance annotation : appPathAnnotations) {
            if (annotation.target().kind() == AnnotationTarget.Kind.CLASS) {
                appPath = Optional.of(annotation.value().asString());
            }
        }

        // third pass: JAX-RS resources
        Collection<AnnotationInstance> pathAnnotations = index.getAnnotations(PATH);
        for (AnnotationInstance annotation : pathAnnotations) {
            if (annotation.target().kind() == AnnotationTarget.Kind.CLASS) {
                ClassInfo classInfo = annotation.target().asClass();

                for (MethodInfo methodInfo : classInfo.methods()) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



