Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.JavaMethod.addThrows()


  private JavaMethod newGetAttributesMethod(ComplexTypeSG pType) throws SAXException {
    JavaMethod jm = js.newJavaMethod("getAttributes", AttributesImpl.class, JavaSource.PUBLIC);
    final DirectAccessible pController = jm.addParam(JMSAXDriverController.class, "pController");
    DirectAccessible pObject = jm.addParam(Object.class, "pObject");
    jm.addThrows(SAXException.class);
    final LocalJavaField result = jm.newJavaField(AttributesImpl.class);
    result.addLine("new ", AttributesImpl.class, "()");
    AttributeSG[] myAttributes = pType.getAttributes();
    if (myAttributes.length > 0) {
      JavaQName elementInterface = pType.getClassContext().getXMLInterfaceName();
View Full Code Here


   
    JavaMethod jm = getJavaSource().newJavaMethod("addAttribute", JavaQNameImpl.VOID, JavaSource.PUBLIC);
    DirectAccessible pURI = jm.addParam(String.class, "pURI");
    DirectAccessible pLocalName = jm.addParam(String.class, "pLocalName");
    DirectAccessible pValue = jm.addParam(String.class, "pValue");
    jm.addThrows(SAXException.class);
    jm.addIf(pURI, " == null");
    jm.addLine(pURI, " = \"\";");
    jm.addEndIf();
   
    JavaQName resultType = ctSG.getClassContext().getXMLInterfaceName();
View Full Code Here

    setParamNamespaceURI(pNamespaceURI);
    setParamLocalName(pLocalName);
    setParamQName(pQName);
    setParamAttrs(pAttr);
    setParamResult(null);
    jm.addThrows(SAXException.class);
    return jm;
  }

  public JavaMethod newEndElementMethod() throws SAXException {
    JavaMethod jm = getJavaSource().newJavaMethod("endElement", void.class, JavaSource.PUBLIC);
View Full Code Here

    setParamNamespaceURI(pNamespaceURI);
    setParamLocalName(pLocalName);
    setParamQName(pQName);
    setParamAttrs(null);
    setParamResult(pResult);
    jm.addThrows(SAXException.class);
    return jm;
  }

  public JavaMethod newIsFinishedMethod() throws SAXException {
    JavaMethod jm = getJavaSource().newJavaMethod("isFinished", boolean.class, JavaSource.PUBLIC);
View Full Code Here

    jcon.addLine(jf, " = (", JAXBContextImpl.class, ") ",
                 JAXBContext.class, ".newInstance(",
                 JavaSource.getQuoted(pPackageName), ");");

    JavaMethod newInstanceMethod = js.newJavaMethod("newInstance", Object.class, "public");
    newInstanceMethod.addThrows(JAXBException.class);
    Parameter pElementInterface = newInstanceMethod.addParam(Class.class, "pElementInterface");
    newInstanceMethod.addLine("return ", jf, ".getManager(", pElementInterface, ").getElementJ();");

    {
      JavaMethod getPropertyMethod = js.newJavaMethod("getProperty", Object.class, "public");
View Full Code Here

  if (anonymous) {
    result = pPrefix + result;
  }
    String methodName = "create" + result;
    JavaMethod createMethod = pSource.newJavaMethod(methodName, resultName, "public");
    createMethod.addThrows(JAXBException.class);
  if (anonymous) {
    createMethod.addLine("return new ", pContext.getXMLImplementationName(), "();");
  } else {
    createMethod.addLine("return (", resultName, ") newInstance(", resultName, ".class);");
  }
View Full Code Here

   */
  protected JavaMethod getInsertRowMethod(JavaSource pSource, TableInfo pTableInfo) {
    Table table = pTableInfo.getTable();
    JavaMethod jm = pSource.newJavaMethod(getInsertRowMethodName(pTableInfo),
        Object[].class, JavaSource.PRIVATE);
    jm.addThrows(SQLException.class);
    DirectAccessible connection = jm.addParam(Connection.class, "pConn");
    DirectAccessible map = jm.addParam(Map.class, "pMap");
    DirectAccessible values = jm.addParam(Object[].class, "pValue");
   
    logFinestEntering(jm, values);
View Full Code Here

   */
  protected JavaMethod getInnerInsertRowMethod(JavaSource pSource, TableInfo pTableInfo) {
    Table table = pTableInfo.getTable();
    JavaMethod jm = pSource.newJavaMethod(getInsertRowMethodName(pTableInfo),
        JavaQNameImpl.VOID, JavaSource.PRIVATE);
    jm.addThrows(SQLException.class);
    DirectAccessible connection = jm.addParam(Connection.class, "pConn");
    DirectAccessible values = jm.addParam(Object[].class, "pValue");
   
    logFinestEntering(jm, null);
   
View Full Code Here

      headTable = (TableInfo) iter.next();
    }
   
    JavaQName resultType = JavaQNameImpl.getInstance(Object[].class);
    JavaMethod jm = pSource.newJavaMethod("clone", resultType, JavaSource.PUBLIC);
    jm.addThrows(SQLException.class);
    JavaComment jc = jm.newComment();
    jc.addLine("<p>This method takes as input the key values of a row in the table " +
        headTable.getTable().getQName() + ".");
    jc.addLine("The key values are given by the array <code>pRow</code>:");
    jc.addLine("<ul>");
View Full Code Here

    for (int i = 0;  i < classes.length;  i++) {
      method.addParam(classes[i], "arg" + i);
    }
    Class[] exceptions = pMethod.getExceptionTypes();
    for (int i = 0;  i < exceptions.length;  i++) {
      method.addThrows(exceptions[i]);
    }
    return method;
  }
 
  /** Returns the compiled class being used to gather information.
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.