Package org.apache.commons.betwixt

Examples of org.apache.commons.betwixt.BindingConfiguration


        context.pushElement("gamma");
        assertEquals("No class", null, context.getLastMappedClass());
    }
   
    public void testGetCurrentElement() throws Exception {
        ReadContext context = new ReadContext(new BindingConfiguration(), new ReadConfiguration());
        context.pushElement("element");
        context.markClassMap(String.class);
        assertEquals("Current element: ", "element", context.getCurrentElement());
    }
View Full Code Here


    }
   
    public void testLastMappedClassBottomClass() throws Exception
    {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());

        context.markClassMap(Object.class);
        context.pushElement("beta");
        context.pushElement("delta");
View Full Code Here

   
    public void testLastMappedClassTwoClasses() throws Exception
    {
       
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());   
        context.markClassMap(Object.class);
        context.pushElement("beta");
        context.pushElement("delta");
        context.markClassMap(String.class);
View Full Code Here

    }
   
    public void testLastMappedClassTopClass() throws Exception
    {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());   
        context.markClassMap(Object.class);
        context.pushElement("beta");
        context.pushElement("delta");
        context.markClassMap(String.class);
View Full Code Here

   
   
    public void testNullElementNameMatchesAll() throws Exception {
       
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
                   
        context.pushElement("LibraryBeanWithArraySetter");  
        context.markClassMap(LibraryBeanWithArraySetter.class);
        context.pushElement("books");
View Full Code Here

        super(testName);
    }

    public void testArrayMapping() throws Exception {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
       
        context.pushElement("LibraryBeanWithArraySetter");  
        context.markClassMap(LibraryBeanWithArraySetter.class);
        context.pushElement("books");
View Full Code Here

        ElementDescriptor baseElementDescriptor,
        Class baseBeanClass,
        boolean matchIDs) {
        this.basePath = basePath;
        this.baseElementDescriptor = baseElementDescriptor;
        BindingConfiguration bindingConfiguration = new BindingConfiguration();
        bindingConfiguration.setMapIDs(matchIDs);
        context =
            new DigesterReadContext(
                log,
                bindingConfiguration,
                new ReadConfiguration());
View Full Code Here

      * @param bean evaluate expressions against this bean
      * @param log log to this logger
      * @deprecated 0.5 use constructor which takes a BindingConfiguration
      */
    public Context(Object bean, Log log) {
        this( bean, log, new BindingConfiguration() );
    }
View Full Code Here

      * @param variables context variables
      * @param log log to this logger
      * @deprecated 0.5 use constructor which takes a converter
      */
    public Context(Object bean, Map variables, Log log) {
        this( bean, variables, log, new BindingConfiguration() );
    }
View Full Code Here

        ElementMapping elementMapping = new ElementMapping();
        elementMapping.setAttributes(new AttributesImpl());
        elementMapping.setName("Bogus");
        elementMapping.setDescriptor(descriptor);
        elementMapping.setType(Iterator.class);
        ReadContext readContext = new ReadContext(new BindingConfiguration(), new ReadConfiguration());
       
        assertNull(introspector.getPolymorphicReferenceResolver().resolveType(elementMapping, readContext));
       
        elementMapping.setName("elementA");
        Class resolution = introspector.getPolymorphicReferenceResolver().resolveType(elementMapping, readContext);
View Full Code Here

TOP

Related Classes of org.apache.commons.betwixt.BindingConfiguration

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.