Examples of adapters()


Examples of org.apache.sling.models.annotations.Model.adapters()

                        Class<?> implType = bundle.loadClass(className);
                        Model annotation = implType.getAnnotation(Model.class);
                        if (annotation != null) {
                           
                            // get list of adapters from annotation - if not given use annotated class itself
                            Class<?>[] adapterTypes = annotation.adapters();
                            if (adapterTypes.length == 0) {
                                adapterTypes = new Class<?>[] { implType };
                            }
                            // register adapter only if given adapters are valid
                            if (validateAdapterClasses(implType, adapterTypes)) {
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.