Package org.apache.cxf.tools.common

Examples of org.apache.cxf.tools.common.DataBindingGenerator


    public static String resolvePartType(Part part) {
        return mangleNameToClassName(getPartType(part));
    }
   
    public static String getType(Part part, ToolContext env, boolean fullname) {
        DataBindingGenerator dataBinder = (DataBindingGenerator)env.get(ToolConstants.BINDING_GENERATOR);
        String type = dataBinder.getType(getElementName(part), fullname);
        if (type == null) {
            type = resolvePartType(part);
        }
        return type;
    }
View Full Code Here


   /* public static String resolvePartType(Part part, ProcessorEnvironment env) {
        return resolvePartType(part, env, false);
    }*/

    public static String resolvePartType(Part part, ToolContext env, boolean fullName) {
        DataBindingGenerator binder = (DataBindingGenerator)env.get(ToolConstants.BINDING_GENERATOR);
        if (binder == null) {
            String primitiveType = JAXBUtils.builtInTypeToJavaType(part.getTypeName().getLocalPart());
            if (part.getTypeName() != null &&  primitiveType != null) {
                return primitiveType;
            } else {
                return resolvePartType(part);
            }
        }
        String name = binder.getType(getElementName(part), fullName);
        if (name == null) {
            return resolvePartType(part);
        }
        return name;
      
View Full Code Here

    //
    // the non-wrapper style will get the type info from the part directly
    //
    public static String getFullClzName(Part part, ToolContext env,
                                        ClassCollector collector, boolean boxify) {
        DataBindingGenerator dataBindingGenerator = (DataBindingGenerator)env
            .get(ToolConstants.BINDING_GENERATOR);
        String jtype = null;
        QName xmlTypeName = getElementName(part);
        if (xmlTypeName == null) {
            xmlTypeName = part.getTypeName();
          
        }

        // if this flag  is true , mapping to java Type first;
        // if not found , findd the primitive type : int ,long
        // if not found,  find in the generated class
      
           
        if (boxify && dataBindingGenerator != null) {
            jtype = dataBindingGenerator.getJavaType(xmlTypeName, true);
        }
       
        if (boxify && dataBindingGenerator == null) {
            Class holderClass = JAXBUtils.holderClass(xmlTypeName.getLocalPart());
            jtype = holderClass == null ? null : holderClass.getName();
            if (jtype == null) {
                jtype = JAXBUtils.builtInTypeToJavaType(xmlTypeName.getLocalPart());
            }
                      
        }
       
        if (!boxify && dataBindingGenerator != null) {
            jtype = dataBindingGenerator.getJavaType(xmlTypeName, false);
        }
       
        if (!boxify && dataBindingGenerator == null) {
            jtype = JAXBUtils.builtInTypeToJavaType(xmlTypeName.getLocalPart());
        }
View Full Code Here

        //
        // RULE No.4 and No5:
        // wrapper element should be pure complex type
        //
        DataBindingGenerator databinder = (DataBindingGenerator)env.get(ToolConstants.BINDING_GENERATOR);
        if (databinder.getBlock(inputPart) == null
            || databinder.getBlock(outputPart) == null) {
            return false;
        }

        return true;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.DataBindingGenerator

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.