Package org.apache.sling.scripting.javascript.helper

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

Related Classes of org.apache.sling.scripting.javascript.helper.SlingWrapper

Copyright © 2018 www.massapicom. 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.