Examples of PolymorphicReferenceResolver


Examples of org.apache.commons.betwixt.registry.PolymorphicReferenceResolver

        Log log = getLog();
        try {
            ElementDescriptor currentDescriptor = getCurrentDescriptor();
            if (currentDescriptor != null) {
                if (currentDescriptor.isPolymorphic()) {
                    PolymorphicReferenceResolver resolver = getXMLIntrospector().getPolymorphicReferenceResolver();
                    result = resolver.resolveType(mapping, this);
                    if (result == null) {
                        // try the other polymorphic descriptors
                        ElementDescriptor parent = getParentDescriptor();
                        if (parent != null) {
                            ElementDescriptor[] descriptors = parent.getElementDescriptors();
                            ElementDescriptor originalDescriptor = mapping.getDescriptor();
                            boolean resolved = false;
                            for (int i=0; i<descriptors.length;i++) {
                                ElementDescriptor descriptor = descriptors[i];
                                if (descriptor.isPolymorphic()) {
                                    mapping.setDescriptor(descriptor);
                                    result = resolver.resolveType(mapping, this);
                                    if (result != null) {
                                        resolved = true;
                                        descriptorStack.pop();
                                        popOptions();
                                        descriptorStack.push(descriptor);
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.