Package org.netbeans.modules.schema2beans

Examples of org.netbeans.modules.schema2beans.GraphManager


     * @param type The expected type of the value to be returned.
     * @throws IllegalArgumentException If the bean is not part of a complete bean graph.
     */   
    protected static java.util.List findCompatibleBeansWithValue(BaseBean root, String propName, String propVal, Class type) throws IllegalArgumentException {
        java.util.List retVal = null;
        GraphManager gm = root.graphManager();
        if (null == gm)
            throw new IllegalArgumentException("Disconnected beans not supported");
        String[] props = root.findPropertyValue(propName, propVal);
        int len = 0;
        if (null != props)
            len = props.length;
        if (len > 0)
            retVal = new java.util.ArrayList();
        for (int i = 0; i < len; i++) {
            // get the bean that is the property's parent.
            BaseBean candidate = gm.getPropertyParent(props[i]);
            if (type.isInstance(candidate))
                retVal.add(candidate);
        }
        return retVal;
    }
View Full Code Here


     * @param type The expected type of the value to be returned.
     * @throws IllegalArgumentException If the bean is not part of a complete bean graph.
     */   
    protected static List findCompatibleBeansWithValue(BaseBean root, String propName, String propVal, Class type) throws IllegalArgumentException {
        List retVal = null;
        GraphManager gm = root.graphManager();
        if (null == gm)
            throw new IllegalArgumentException(
                    bundle.getString("ERR_DISCONNECTED_NOT_SUPPORTED"));
        String[] props = root.findPropertyValue(propName, propVal);
        int len = 0;
        if (null != props)
            len = props.length;
        if (len > 0)
            retVal = new ArrayList();
        for (int i = 0; i < len; i++) {
            // get the bean that is the property's parent.
            BaseBean candidate = gm.getPropertyParent(props[i]);
            if (type.isInstance(candidate))
                retVal.add(candidate);
        }
        return retVal;
    }
View Full Code Here

     * @param type The expected type of the value to be returned.
     * @throws IllegalArgumentException If the bean is not part of a complete bean graph.
     */   
    protected static List findCompatibleBeansWithValue(BaseBean root, String propName, String propVal, Class type) throws IllegalArgumentException {
        List retVal = null;
        GraphManager gm = root.graphManager();
        if (null == gm)
            throw new IllegalArgumentException(
                    bundle.getString("ERR_DISCONNECTED_NOT_SUPPORTED"));
        String[] props = root.findPropertyValue(propName, propVal);
        int len = 0;
        if (null != props)
            len = props.length;
        if (len > 0)
            retVal = new ArrayList();
        for (int i = 0; i < len; i++) {
            // get the bean that is the property's parent.
            BaseBean candidate = gm.getPropertyParent(props[i]);
            if (type.isInstance(candidate))
                retVal.add(candidate);
        }
        return retVal;
    }
View Full Code Here

TOP

Related Classes of org.netbeans.modules.schema2beans.GraphManager

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.