Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.JavaQName


    pMethod.addLine(list, ".add(", itemType.getSimpleTypeSG().getCastFromString(pMethod, new Object[]{st, ".nextToken()"}, pData),
                    ");");
    pMethod.addEndFor();

    if ("indexed".equals(collectionType)) {
      JavaQName iType = itemType.getSimpleTypeSG().getRuntimeType();
      return new TypedValueImpl(new Object[]{"((", iType, ") ", list, ".toArray(new ", iType, "[", list, ".size()]))"},
                  itemType.getSimpleTypeSG().getRuntimeType());
    } else {
    JavaQName myListType = JavaQNameImpl.getInstance(collectionType, true);
    return new TypedValueImpl(list, myListType);
    }
  }
View Full Code Here


    throw new IllegalStateException("Not implemented");
  }

  public Object getInitialValue(SimpleTypeSG pController, JavaSource p0) throws SAXException {
    String s = pController.getCollectionType();
    JavaQName listClass = "indexed".equals(s) ? ARRAYLIST_TYPE : JavaQNameImpl.getInstance(s, true);
    return new Object[]{"new ", listClass, "()"};
  }
View Full Code Here

   private class ProxyInterfaceGenerator extends ProxyGenerator {
     public JavaMethod getInterfaceMethod(JavaSource pSource, JavaMethod pMethod) {
       JavaMethod jm = pSource.newJavaMethod(pMethod);
       Parameter[] parameters = jm.getParams();
       JavaQName controllerInterfaceQName = getControllerInterface().getQName();
       jm.clearParams();
       jm.addParam(controllerInterfaceQName, "pController");
       for (int i = 0;  i < parameters.length;  i++) {
         jm.addParam(parameters[i]);
       }
View Full Code Here

     }

     public JavaMethod getInterfaceMethod(JavaSource pSource, JavaMethod pMethod) {
       JavaMethod jm = pSource.newJavaMethod(pMethod);
       Parameter[] parameters = jm.getParams();
       JavaQName controllerInterfaceQName = getControllerInterface().getQName();
       jm.clearParams();
       jm.addParam(controllerInterfaceQName, "pController");
       for (int i = 0;  i < parameters.length;  i++) {
         jm.addParam(parameters[i]);
       }
View Full Code Here

            throw new IllegalStateException("Missing class name");
        }
        String className = classNameAST.getText();
        if (pOuterClass == null) {
            String packageName = getPackageName();
            JavaQName qName;
            if (packageName == null) {
                qName = JavaQNameImpl.getInstance(className);
            } else {
                qName = JavaQNameImpl.getInstance(packageName, className);
            }
View Full Code Here

        } else {
          firstIdent = pName;
            suffix = "";
        }
        for (int i = 0;  i < importStatements.size();  i++) {
          JavaQName qName = (JavaQName) importStatements.get(i);
            if (qName.getClassName().equals(firstIdent)) {
              for (StringTokenizer st = new StringTokenizer(suffix, ".");  st.hasMoreTokens()) {
                String s = st.nextToken();
                    qName = JavaQNameImpl.getInnerInstance(qName, s);
                }
                return qName;
View Full Code Here

        if (implementsAST == null) {
          throw new IllegalStateException("AST implements not found");
        }
        if (implementsAST.getFirstChild() != null) {
            String ident = parseIdentifier(implementsAST);
            JavaQName qName = getQName(ident);
            if (pType == JavaRecognizer.IMPLEMENTS_CLAUSE) {
              pSource.addImplements(qName);
            } else {
              pSource.addExtends(qName);
            }
View Full Code Here

        AST type = findChild(pAST, JavaRecognizer.TYPE);
        if (type == null) {
            throw new IllegalStateException("Missing TYPE AST");
        }
        String typeName = parseIdentifier(type);
        JavaQName typeQName = getQName(typeName);
        return pSource.newJavaField(fieldName, typeName, JavaSource.DEFAULT_PROTECTION);
    }
View Full Code Here

        }
        String typeName = parseIdentifier(type);
        if (typeName == null) {
            throw new IllegalStateException("Missing identifier for " + fieldName);
        }
        JavaQName typeQName = getQName(typeName);
        return pSource.newJavaMethod(fieldName, typeQName, JavaSource.DEFAULT_PROTECTION);
    }
View Full Code Here

        AST type = findChild(pAST, JavaRecognizer.TYPE);
        if (type == null) {
            throw new IllegalStateException("Missing TYPE AST");
        }
        String typeName = parseIdentifier(type);
        JavaQName typeQName = getQName(typeName);
        return pMethod.addParam(typeQName, paramName);
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.js.JavaQName

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.