package com.axellience.vuegwt.client.vnode.builder;

import com.axellience.vuegwt.client.component.VueComponent;
import com.axellience.vuegwt.client.vnode.VNode;
import com.axellience.vuegwt.client.vnode.VNodeData;
import com.axellience.vuegwt.client.vue.VueConstructor;

/**
 * @author Adrien Baron
 */
public class VNodeBuilder
{
    private final CreateElementFunction function;

    public VNodeBuilder(CreateElementFunction function)
    {
        this.function = function;
    }

    /**
     * Create an empty VNode
     * @return a new empty VNode
     */
    public VNode el()
    {
        return this.function.create(null, null, null);
    }

    /**
     * Create a VNode with the given HTML tag
     * @param tag HTML tag for the new VNode
     * @param children Children
     * @return a new VNode of this tag
     */
    public VNode el(String tag, Object... children)
    {
        return this.function.create(tag, children, null);
    }

    /**
     * Create a VNode with the given HTML tag
     * @param tag HTML tag for the new VNode
     * @param data Information for the new VNode (attributes...)
     * @param children Children
     * @return a new VNode of this tag
     */
    public VNode el(String tag, VNodeData data, Object... children)
    {
        return this.function.create(tag, data, children);
    }

    /**
     * Create a VNode with the given Component
     * @param vueConstructor Constructor for the Component we want
     * @param children Children
     * @return a new VNode of this Component
     */
    public VNode el(VueConstructor<VueComponent> vueConstructor, Object... children)
    {
        return this.function.create(vueConstructor, children, null);
    }

    /**
     * Create a VNode with the given Component
     * @param vueConstructor Constructor for the Component we want
     * @param data Information for the new VNode (attributes...)
     * @param children Children
     * @return a new VNode of this Component
     */
    public VNode el(Class<VueComponent> vueConstructor, VNodeData data, Object... children)
    {
        return this.function.create(vueConstructor, data, children);
    }
}

@@ -1782,38 +1782,45 @@
 ueCo
-nstructor Constructor for the 
+mponentClass Class for the %7B@link Vue
 Comp
@@ -1816,32 +1816,33 @@
 ink VueComponent
+%7D
  we want%0A     * 
@@ -2029,25 +2029,28 @@
 t%3E vueCo
-nstructor
+mponentClass
 , VNodeD
@@ -2126,25 +2126,28 @@
 te(vueCo
-nstructor
+mponentClass
 , data, 

Fix VNodeBuilder JavaDoc comment