Examples of SlingWrapper


Examples of org.apache.sling.scripting.javascript.SlingWrapper

                    ScriptableObject.defineClass(scope, clazz);

                    if (SlingWrapper.class.isAssignableFrom(clazz)) {

                        // SlingWrappers can map to several classes if needed
                        final SlingWrapper hostWrapper = (SlingWrapper) clazz.newInstance();;
                        for (Class<?> c : hostWrapper.getWrappedClasses()) {
                            getWrapFactory().registerWrapper(c,
                                hostWrapper.getClassName());
                        }

                    } else {

                        // but other Scriptable host objects need to be
View Full Code Here

Examples of org.apache.sling.scripting.javascript.SlingWrapper

                    ScriptableObject.defineClass(scope, clazz);

                    if (SlingWrapper.class.isAssignableFrom(clazz)) {
                       
                        // SlingWrappers can map to several classes if needed
                        final SlingWrapper hostWrapper = (SlingWrapper) clazz.newInstance();;
                        for (Class<?> c : hostWrapper.getWrappedClasses()) {
                            getWrapFactory().registerWrapper(c,
                                hostWrapper.getClassName());
                        }
                       
                    } else {
                       
                        // but other Scriptable host objects need to be
View Full Code Here

Examples of org.apache.sling.scripting.javascript.helper.SlingWrapper

                    ScriptableObject.defineClass(rootScope, clazz);
                    final ScriptableObject host = (ScriptableObject) clazz.newInstance();

                    if (SlingWrapper.class.isAssignableFrom(clazz)) {
                        // SlingWrappers can map to several classes if needed
                        final SlingWrapper hostWrapper = (SlingWrapper) host;
                        for (Class<?> c : hostWrapper.getWrappedClasses()) {
                            SlingWrapFactory.INSTANCE.registerWrapper(c,
                                hostWrapper.getClassName());
                        }
                    } else {
                        // but other ScriptableObjects need to be registered as
                        // well
                        SlingWrapFactory.INSTANCE.registerWrapper(
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.