All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.glassfish.admingui.connector.IndexItemInjector Maven / Gradle / Ivy

The newest version!

package org.glassfish.admingui.connector;

import java.util.ArrayList;
import java.util.List;
import org.jvnet.hk2.annotations.Service;
import org.jvnet.hk2.config.ConfigInjector;
import org.jvnet.hk2.config.Dom;
import org.jvnet.hk2.config.InjectionTarget;

@Service(name = "indexitem", metadata = "=collection:org.glassfish.admingui.connector.IndexItem,@target=required,@target=datatype:java.lang.String,@target=leaf,@text=required,@text=datatype:java.lang.String,@text=leaf,target=org.glassfish.admingui.connector.IndexItem")
@InjectionTarget(org.glassfish.admingui.connector.IndexItem.class)
public class IndexItemInjector
    extends ConfigInjector
{


    public void inject(Dom dom, org.glassfish.admingui.connector.IndexItem target) {
        element_setIndexItems(dom, target);
        attribute_setTarget(dom, target);
        attribute_setText(dom, target);
    }

    public void injectAttribute(Dom dom, String name, org.glassfish.admingui.connector.IndexItem target) {
        if ("target".equals(name)) {
            attribute_setTarget(dom, target);
        }
        if ("text".equals(name)) {
            attribute_setText(dom, target);
        }
    }

    public void injectElement(Dom dom, String name, org.glassfish.admingui.connector.IndexItem target) {
        if ("indexitem".equals(name)) {
            element_setIndexItems(dom, target);
        }
    }

    public void element_setIndexItems(Dom dom, org.glassfish.admingui.connector.IndexItem target) {
        List v1 = dom.nodeElements("indexitem");
        if (v1 == null) {
            return ;
        }
        List v2 = new ArrayList(v1 .size());
        for (Dom v3 : v1) {
            v2 .add(((org.glassfish.admingui.connector.IndexItem) v3 .get()));
        }
        target.setIndexItems(v2);
    }

    public void attribute_setTarget(Dom dom, org.glassfish.admingui.connector.IndexItem target) {
        String v1 = dom.attribute("target");
        target.setTarget(v1);
    }

    public void attribute_setText(Dom dom, org.glassfish.admingui.connector.IndexItem target) {
        String v1 = dom.attribute("text");
        target.setText(v1);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy