Examples of AbstractFactory


Examples of org.apache.commons.jxpath.AbstractFactory

            return new NullPointer(getLocale(), id);
        }
    }

    private AbstractFactory getAbstractFactory(JXPathContext context){
        AbstractFactory factory = context.getFactory();
        if (factory == null){
            throw new JXPathException("Factory is not set on the JXPathContext - cannot create path: " + asPath());
        }
        return factory;
    }
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

        return ptr;
    }

    public NodePointer createPath(JXPathContext context){
        if (!actual){
            AbstractFactory factory = getAbstractFactory(context);
            if (!factory.declareVariable(context, name.toString())){
                throw new JXPathException("Factory cannot define variable '" + name + "' for path: " + asPath());
            }
            findVariables(context);
            // Assert: actual == true
        }
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

    }

    public NodePointer createChild(JXPathContext context, QName name, int index){
        Object collection = createCollection(context, index);
        if (!isActual() || (index != 0 && index != WHOLE_COLLECTION)){
            AbstractFactory factory = getAbstractFactory(context);
            // Ignore the name passed as a parameter, pass the name of the variable instead
            if (!factory.createObject(context, this, collection, getName().toString(), index)){
                throw new JXPathException("Factory could not create object path: " + asPath());
            }
            setIndex(index);
        }
        return this;
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

    public boolean testNode(NodeTest nodeTest){
        return getValuePointer().testNode(nodeTest);
    }

    private AbstractFactory getAbstractFactory(JXPathContext context){
        AbstractFactory factory = context.getFactory();
        if (factory == null){
            throw new JXPathException(
              "Factory is not set on the JXPathContext - cannot create path: "
              + asPath());
        }
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

            handler.setProperty(getBean(), getPropertyName(), value);
        }
        else {
            Object collection = getBaseValue();
            if (collection == null){
                AbstractFactory factory = getAbstractFactory(context);
                if (!factory.createObject(context, this, getBean(), getPropertyName(), 0)){
                    throw new JXPathException("Factory could not create an object for path: " + asPath());
                }
                collection = getBaseValue();
            }
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

    public NodePointer createChild(JXPathContext context, QName name, int index){
        // Ignore the name passed to us, use our own data
        Object collection = getBaseValue();
        if (collection == null){
            AbstractFactory factory = getAbstractFactory(context);
            if (!factory.createObject(context, this, getBean(), getPropertyName(), 0)){
                throw new JXPathException("Factory could not create an object for path: " + asPath());
            }
            collection = getBaseValue();
        }
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

        return pointer;
    }

    public NodePointer createPath(JXPathContext context){
        if (getNodeValue() == null){
            AbstractFactory factory = getAbstractFactory(context);
            int inx = (index == WHOLE_COLLECTION ? 0 : index);
            if (!factory.createObject(context, this, getBean(), getPropertyName(), inx)){
                throw new JXPathException("Factory could not create an object for path: " + asPath());
            }
        }
        return this;
    }
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

        }
        return string;
    }

    private AbstractFactory getAbstractFactory(JXPathContext context){
        AbstractFactory factory = context.getFactory();
        if (factory == null){
            throw new JXPathException("Factory is not set on the JXPathContext - cannot create path: " + asPath());
        }
        return factory;
    }
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

                                           "\nBinding doesn't support having namespace-declarations without explicit prefixes.",
                                           DomHelper.getLocationObject(bindingElm));
            }

            String jxPathFactoryName = bindingElm.getAttribute("jxpath-factory");
            AbstractFactory jxPathFactory = null;
            if (jxPathFactoryName != null && jxPathFactoryName.trim().length() > 0) {
                try {
                    Class jxPathFactoryClass = JXPathBindingBuilderBase.class.getClassLoader().loadClass(jxPathFactoryName);
                    jxPathFactory = (AbstractFactory)jxPathFactoryClass.newInstance();
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

        if (extra.direction != null) {
            // was defined
            direction = extra.direction;
        }

        AbstractFactory jxPathFactory = existing.jxPathFactory;
        if (extra.jxPathFactory != null) {
            jxPathFactory = extra.jxPathFactory;
        }

        return new CommonAttributes(extra.location, direction, strLeniency, extra.nsDeclarations, jxPathFactory);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.