All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oneandone.iocunit.analyzer.ElseClasses Maven / Gradle / Ivy

package com.oneandone.iocunit.analyzer;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.decorator.Decorator;
import javax.enterprise.inject.Alternative;
import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.spi.Extension;
import javax.interceptor.Interceptor;

/**
 * @author aschoerk
 */
public class ElseClasses {
    Set> foundAlternativeStereotypes = new HashSet<>();
    Set> foundAlternativeClasses = new HashSet<>();
    List> decorators = new ArrayList<>();
    List> interceptors = new ArrayList<>();

    Set> extensionClasses = new HashSet<>();
    List extensionObjects = new ArrayList<>();
    Set> elseClasses = new HashSet<>();

    void elseClass(Class c) {
        if(ConfigStatics.isExtension(c)) {
            extensionClasses.add((Class) c);
        }
        else if(c.getAnnotation(Decorator.class) != null) {
            decorators.add(c);
        }
        else if(c.getAnnotation(Interceptor.class) != null) {
            interceptors.add(c);
        }
        else if(c.isAnnotation()) {
            if(c.isAnnotationPresent(Stereotype.class) && c.isAnnotationPresent(Alternative.class)) {
                foundAlternativeStereotypes.add(c);
            }
            else {
                elseClasses.add(c);
            }
        }
        else {
            elseClasses.add(c);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy