Examples of findClasses()


Examples of org.glassfish.gmbal.generic.ClassAnalyzer.findClasses()

        if (result == null) {
            final Map<Class,Annotation> res =
                new HashMap<Class,Annotation>() ;

            ClassAnalyzer ca = ClassAnalyzer.getClassAnalyzer(cls) ;
            ca.findClasses( new Predicate<Class>() {
                public boolean evaluate(Class arg) {
                    // First, put in declared annotations if not already present.
                    Annotation[] annots = arg.getDeclaredAnnotations() ;
                    for (Annotation anno : annots) {
                        putIfNotPresent( res, anno.annotationType(), anno ) ;
View Full Code Here

Examples of org.glassfish.gmbal.typelib.EvaluatedClassAnalyzer.findClasses()

    public <T extends Annotation> T getFirstAnnotationOnClass(
        final EvaluatedClassDeclaration element, final Class<T> type ) {

        EvaluatedClassAnalyzer eca = new EvaluatedClassAnalyzer( element ) ;
        List<EvaluatedClassDeclaration> ecds = eca.findClasses(
            forAnnotation(type, EvaluatedClassDeclaration.class) ) ;

        if (ecds.size() > 0) {
            return getAnnotation( ecds.get(0).element(), type ) ;
        else {
View Full Code Here

Examples of org.glassfish.gmbal.typelib.EvaluatedClassAnalyzer.findClasses()

       
        try {
            final EvaluatedClassAnalyzer clsca = new EvaluatedClassAnalyzer( cls ) ;

            final EvaluatedClassDeclaration annotatedClass = Algorithms.getFirst(
                clsca.findClasses( forAnnotation( annotationClass,
                    EvaluatedClassDeclaration.class ) ),
                new Runnable() {
                    public void run() {
                        throw Exceptions.self.noAnnotationFound(
                            annotationClass.getName(), cls.name() ) ;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.