Package org.apache.ws.jaxme.js

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


  }

  public JavaMethod newMarshalChildsMethod() throws SAXException {
      JavaMethod jm = getJavaSource().newJavaMethod("marshalChilds", void.class, JavaSource.PUBLIC);
      jm.addThrows(SAXException.class);
    Parameter pController = jm.addParam(JMSAXDriverController.class, "pController");
    Parameter pHandler = jm.addParam(ContentHandler.class, "pHandler");
    Parameter pElement = jm.addParam(Object.class, "pObject");
    setParamController(pController);
    setParamHandler(pHandler);
    setParamElement(pElement);
    return jm;
  }
View Full Code Here


    public JavaMethod getXMLSetMethod(PropertySG pController, JavaSource pSource) throws SAXException {
        String fieldName = pController.getXMLFieldName();
        String methodName = pController.getXMLSetMethodName();
        JavaMethod result = pSource.newJavaMethod(methodName, void.class, JavaSource.PUBLIC);
        Parameter param = result.addParam(Object.class, "p" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1));
        result.addLine(fieldName, " = ", param, ";");
        return result;
    }
View Full Code Here

      jc.addLine("@return Attribute value or null, if the attribute is not set.");
      jc.addLine("@throws NullPointerException The <code>pName</code> argument is null.");
      if (!namespaceList.isAny()) {
          jc.addLine("@throws IllegalArgumentException The namespace <code>pName.getNamespaceURI()</code> is invalid.");
      }
      Parameter pName = jm.addParam(QName.class, "pName");
      if (!pSource.isInterface()) {
        jm.addIf(pName, " == null");
        jm.addThrowNew(NullPointerException.class, JavaSource.getQuoted("The pName argument must not be null."));
        jm.addEndIf();
        getValidNamespaceCheck(pController, jm, pName);
View Full Code Here

      jc.addLine("<p>Sets the 'anyAttribute' named <code>pName</code> to the value <code>pValue</code>.</p>");
      if (!namespaceList.isAny()) {
          jc.addLine("@throws IllegalArgumentException The namespace <code>pName.getNamespaceURI()</code> is invalid.");
      }
      jc.addLine("@throws NullPointerException Either of the arguments <code>pName</code> or <code>pValue</code> is null.");
      Parameter pName = jm.addParam(QName.class, "pName");
      Parameter pValue = jm.addParam(String.class, "pValue");
      if (!pSource.isInterface()) {
        jm.addIf(pName, " == null");
        jm.addThrowNew(NullPointerException.class, JavaSource.getQuoted("The pName argument must not be null."));
        jm.addEndIf();
        jm.addIf(pValue, " == null");
View Full Code Here

      if (!namespaceList.isAny()) {
          jc.addLine("@throws IllegalArgumentException The namespace <code>pName.getNamespaceURI()</code> is invalid.");
      }
      jc.addLine("@throws NullPointerException Either of the arguments <code>pName</code> or <code>pValue</code> is null.");
      jc.addLine("@return True, if the attribute was set, otherwise false.");
      Parameter pName = jm.addParam(QName.class, "pName");
      if (!pSource.isInterface()) {
        jm.addIf(pName, " == null");
        jm.addThrowNew(NullPointerException.class, JavaSource.getQuoted("The pName argument must not be null."));
        jm.addEndIf();
        getValidNamespaceCheck(pController, jm, pName);
View Full Code Here

    driver.marshalParticles(pMethod, pElement, driver.particles);
  }

  public JavaMethod newMarshalChildsMethod() throws SAXException {
    JavaMethod jm = super.newMarshalChildsMethod();
    Parameter paramElement = getParamElement();
    JavaQName elementInterface = ctSG.getClassContext().getXMLInterfaceName();
    LocalJavaField element = jm.newJavaField(elementInterface);
    element.addLine("(", elementInterface, ") ", paramElement);
    marshalParticles(jm, element, particles);
    return jm;
View Full Code Here

    super(pType, pJs);
  }

  public JavaMethod newMarshalChildsMethod() throws SAXException {
    JavaMethod jm = super.newMarshalChildsMethod();
    Parameter paramElement = getParamElement();
    Parameter paramController = getParamController();
    JavaQName elementInterface = ctSG.getClassContext().getXMLInterfaceName();
      LocalJavaField element = jm.newJavaField(elementInterface);
      element.addLine("(", elementInterface, ") ", paramElement);
      LocalJavaField chars = jm.newJavaField(String.class);
      SimpleContentSG simpleContent = ctSG.getSimpleContentSG();
View Full Code Here

  protected JavaMethod getXMLGetElementMethod(PropertySG pController, JavaSource pSource) throws SAXException {
    JavaQName instanceClass = getInstanceClass();
    String fieldName = pController.getXMLFieldName();
    String methodName = pController.getXMLGetMethodName();
    JavaMethod result = pSource.newJavaMethod(methodName, instanceClass, JavaSource.PUBLIC);
    Parameter index = result.addParam(int.class, "pIndex");
    if (!pSource.isInterface()) {
      result.addLine("return ", asPrimitive(index, fieldName), ";");
    }
    return result;
  }
View Full Code Here

  public JavaMethod getXMLSetMethod(PropertySG pController, JavaSource pSource) throws SAXException {
    JavaQName arrayClass = getArrayClass();
    String fieldName = pController.getXMLFieldName();
    String methodName = pController.getXMLSetMethodName();
    JavaMethod result = pSource.newJavaMethod(methodName, "void", JavaSource.PUBLIC);
    Parameter array = result.addParam(arrayClass, "pValue");
    if (!pSource.isInterface()) {
      result.addLine(fieldName, ".clear();");
      result.addIf(array, " != null");
      DirectAccessible i = result.addForArray(int.class, array);
      Object o = new Object[]{array, "[", i, "]"};
View Full Code Here

  protected JavaMethod getXMLSetElementMethod(PropertySG pController, JavaSource pSource) throws SAXException {
    JavaQName instanceClass = getInstanceClass();
    String fieldName = pController.getXMLFieldName();
    String methodName = pController.getXMLSetMethodName();
    JavaMethod result = pSource.newJavaMethod(methodName, "void", JavaSource.PUBLIC);
    Parameter index = result.addParam(int.class, "pIndex");
    Parameter element = result.addParam(instanceClass, "pValue");
    if (!pSource.isInterface()) {
      result.addLine(fieldName, ".set(", index, ", ", asObject(element), ");");
    }
    return result;
  }
View Full Code Here

TOP

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

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.