Search in sources :

Example 1 with ComponentCreator

use of com.taobao.weex.ui.ComponentCreator in project incubator-weex by apache.

the class ConfigComponentHolder method createInstance.

@Override
public synchronized WXComponent createInstance(WXSDKInstance instance, WXDomObject node, WXVContainer parent) throws IllegalAccessException, InvocationTargetException, InstantiationException {
    if (mClass == null || mClassLoader != instance.getContext().getClassLoader()) {
        mClass = WXSDKManager.getInstance().getClassLoaderAdapter().getComponentClass(mType, mClassName, instance);
        mClassLoader = instance.getContext().getClassLoader();
    }
    ComponentCreator creator = new SimpleComponentHolder.ClazzComponentCreator(mClass);
    WXComponent component = creator.createInstance(instance, node, parent);
    component.bindHolder(this);
    return component;
}
Also used : ComponentCreator(com.taobao.weex.ui.ComponentCreator) WXComponent(com.taobao.weex.ui.component.WXComponent)

Aggregations

ComponentCreator (com.taobao.weex.ui.ComponentCreator)1 WXComponent (com.taobao.weex.ui.component.WXComponent)1