Package org.apache.commons.betwixt.io.read

Examples of org.apache.commons.betwixt.io.read.ReadContext


      * Factory method for new contexts.
      * Ensure that they are correctly configured.
      * @return the ReadContext created, not null
      */
    private ReadContext makeContext() {
        return new ReadContext( log, bindingConfiguration, readConfiguration );
    }
View Full Code Here


    public TestBaseMappingStrategy(String testName) {
        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");
       
        ActionMappingStrategy strategy = ActionMappingStrategy.DEFAULT;
        MappingAction action = strategy.getMappingAction("", "books", new AttributesImpl(), context);
        assertTrue("Should be mapped to an array bind action", action instanceof ArrayBindAction);
    }
View Full Code Here

        this(
            introspector,
            basePath,
            baseElementDescriptor,
            baseBeanClass,
            new ReadContext( context, new ReadConfiguration() ));
    }
View Full Code Here

      * Factory method for new contexts.
      * Ensure that they are correctly configured.
      * @return the ReadContext created, not null
      */
    private ReadContext makeContext() {
        return new ReadContext( log, bindingConfiguration, readConfiguration );
    }
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.io.read.ReadContext

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.