Examples of JType


Examples of com.sun.codemodel.JType

                List<? extends Property> propList = mapping.getWrapperStyleDrilldown();
                for (Property pro : propList) {
                    if (pro.elementName().getNamespaceURI().equals(item.getNamespaceURI())
                        && pro.elementName().getLocalPart().equals(item.getLocalPart())) {

                        JType type = pro.type();
                        if (type instanceof JDefinedClass
                            && ((JDefinedClass)type).isAbstract()) {
                            //no default values for abstract classes
                            return null;
                        }
View Full Code Here

Examples of com.sun.codemodel.JType

                    writer.write("();");
                    fillInFields(writer, indent, path, varName, jdc);
                }
            } else {
                boolean found = false;
                JType tp2 = tp.erasure();
                try {
                    Field f = tp2.getClass().getDeclaredField("_class");
                    f.setAccessible(true);
                    Class<?> cls = (Class)f.get(tp2);
                    if (List.class.isAssignableFrom(cls)) {
                        found = true;
View Full Code Here

Examples of com.sun.codemodel.internal.JType

            r = new IsSetFieldRenderer( r, prop.isOptionalPrimitive()||prop.isCollection(), true );
        }

        prop.realization = r;

        JType bt = getBaseType();
        if(bt!=null)
            prop.baseType = bt;

        return prop;
    }
View Full Code Here

Examples of org.apache.cxf.common.jaxb.JAXBUtils.JType

            name = part.getTypeQName();
        }
        Mapping mapping = model.get(name);
       
        //String clsName = null;
        JType jType = null;
        if (mapping != null) {
            jType = mapping.getType().getTypeClass();             
        }
       
        if (jType == null) {
            TypeAndAnnotation typeAndAnnotation = model.getJavaType(part.getTypeQName());          
            if (typeAndAnnotation != null) {               
                jType = typeAndAnnotation.getTypeClass();
            }
        }
        if (jType == null
            && part.isElement()
            && part.getXmlSchema() instanceof XmlSchemaElement
            && ((XmlSchemaElement)part.getXmlSchema()).getSchemaTypeName() == null) {
            //anonymous inner thing.....
            UnwrappedOperationInfo oInfo = (UnwrappedOperationInfo)op;
            op = oInfo.getWrappedOperation();
           
            if (part.getMessageInfo() == oInfo.getInput()) {
                mapping = model.get(op.getInput().getMessagePart(0).getElementQName());
            } else {
                mapping = model.get(op.getOutput().getMessagePart(0).getElementQName());
            }
            if (mapping != null) {
                jType = mapping.getType().getTypeClass();
                try {
                    Iterator<JType> i = jType.classes();
                    while (i.hasNext()) {
                        JType jt = i.next();
                        if (jt.name().equalsIgnoreCase(part.getElementQName().getLocalPart())) {
                            jType = jt;
                        }
                    }
                } catch (Throwable t) {
                    //ignore, JType is a type that doesn't have a classes method
                }
            }
           
        }
       
        if (jType == null) {
            throw new ServiceConstructionException(new Message("NO_JAXB_CLASSMapping", LOG, name));
        }
           
        Class<?> cls;
       
        try {
            int arrayCount = 0;
            JType rootType = jType;
            while (rootType.isArray()) {
                rootType = rootType.elementType();
                arrayCount++;
            }
            if (arrayCount == 0
                && part.isElement()
                && part.getXmlSchema() instanceof XmlSchemaElement
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBUtils.JType

            name = part.getTypeQName();
        }
        Mapping mapping = model.get(name);
       
        //String clsName = null;
        JType jType = null;
        if (mapping != null) {
            jType = mapping.getType().getTypeClass();             
        }
       
        if (jType == null) {
            TypeAndAnnotation typeAndAnnotation = model.getJavaType(part.getTypeQName());          
            if (typeAndAnnotation != null) {               
                jType = typeAndAnnotation.getTypeClass();
            }
        }
        if (jType == null
            && part.isElement()
            && part.getXmlSchema() instanceof XmlSchemaElement
            && ((XmlSchemaElement)part.getXmlSchema()).getSchemaTypeName() == null) {
            //anonymous inner thing.....
            UnwrappedOperationInfo oInfo = (UnwrappedOperationInfo)op;
            op = oInfo.getWrappedOperation();
           
            if (part.getMessageInfo() == oInfo.getInput()) {
                mapping = model.get(op.getInput().getMessagePart(0).getElementQName());
            } else {
                mapping = model.get(op.getOutput().getMessagePart(0).getElementQName());
            }
            if (mapping != null) {
                jType = mapping.getType().getTypeClass();
                try {
                    Iterator<JType> i = jType.classes();
                    while (i.hasNext()) {
                        JType jt = i.next();
                        if (jt.name().equalsIgnoreCase(part.getElementQName().getLocalPart())) {
                            jType = jt;
                        }
                    }
                } catch (Throwable t) {
                    //ignore, JType is a type that doesn't have a classes method
                }
            }
           
        }
       
        if (jType == null) {
            throw new ServiceConstructionException(new Message("NO_JAXB_CLASSMapping", LOG, name));
        }
           
        Class cls;
       
        try {
            int arrayCount = 0;
            JType rootType = jType;
            while (rootType.isArray()) {
                rootType = rootType.elementType();
                arrayCount++;
            }
            if (arrayCount == 0
                && part.isElement()
                && part.getXmlSchema() instanceof XmlSchemaElement
View Full Code Here

Examples of org.commoncrawl.rpc.compiler.JType

    }
    throw new Error("Missing return statement in function");
  }

  final public JField<JType> Field() throws ParseException {
    JType jt;
    Token name;
    Token ordinal;
    int modifiers = 0;
    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
      case 47:
View Full Code Here

Examples of org.exolab.javasource.JType

     * @param fieldInfo the fieldInfo to translate
     * @return the created methods
     */
    public JMethod[] createAccessMethods(final FieldInfo fieldInfo) {
            String mname = fieldInfo.getMethodSuffix();
            JType jType = new XMLInfoNature(fieldInfo).getSchemaType().getJType();

            JMethod[] methods = new JMethod[3];
            methods[0] = makeGetMethod(fieldInfo, mname, jType); // -- create get method
            methods[1] = makeSetMethod(fieldInfo, mname, jType); // -- create set method
            methods[2] = makeGetReferenceIdMethod(fieldInfo); // -- create getReferenceId
View Full Code Here

Examples of org.milyn.javabean.pojogen.JType

    private boolean trunacate;
    private DelimiterType terminatingDelimiter;

    WriteMethod(JClass jClass, MappingNode mappingNode) {
        super("write");
        addParameter(new JType(Writer.class), "writer");
        addParameter(new JType(Delimiters.class), "delimiters");
        getExceptions().add(new JType(IOException.class));
        jClass.getImplementTypes().add(new JType(EDIWritable.class));
        jClass.getMethods().add(this);
        this.jClass = jClass;
        this.mappingNode = mappingNode;
        this.trunacate = (mappingNode instanceof ContainerNode && ((ContainerNode)mappingNode).isTruncatable());

        if(trunacate) {
            jClass.getRawImports().add(new JType(StringWriter.class));
            jClass.getRawImports().add(new JType(List.class));
            jClass.getRawImports().add(new JType(ArrayList.class));
            jClass.getRawImports().add(new JType(EDIUtils.class));
            jClass.getRawImports().add(new JType(DelimiterType.class));
        }
    }
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.