Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.LocalJavaField.addLine()


    }
  }

  public void forAllNonNullValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
    LocalJavaField f = pMethod.newJavaField(BYTE_ARRAY_TYPE);
    f.addLine(pValue);
    pMethod.addIf(f, " != null");
    pSGlet.generate(pMethod, pValue);
    pMethod.addEndIf();
  }
View Full Code Here


    }
  }

  public void forAllNonNullValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
    LocalJavaField f = pMethod.newJavaField(BYTE_ARRAY_TYPE);
    f.addLine(pValue);
    pMethod.addIf(f, " != null");
    pSGlet.generate(pMethod, pValue);
    pMethod.addEndIf();
  }
View Full Code Here

    DirectAccessible value;
    if (pValue instanceof DirectAccessible) {
      value = (DirectAccessible) pValue;
    } else {
      LocalJavaField v = pMethod.newJavaField(String.class);
      v.addLine(pValue);
      value = v;
    }

    LocalJavaField result = pMethod.newJavaField(pController.getRuntimeType());
    for (int i = 0;  i < memberTypes.length;  i++) {
View Full Code Here

    DirectAccessible value;
    if (pValue instanceof DirectAccessible) {
      value = (DirectAccessible) pValue;
    } else {
      LocalJavaField v = pMethod.newJavaField(Object.class);
      v.addLine(pValue);
      value = v;
    }

    LocalJavaField result = pMethod.newJavaField(String.class);
    for (int i = 0;  i < memberTypes.length;  i++) {
View Full Code Here

    return pValue;
  }

  public void forAllNonNullValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
    LocalJavaField f = pMethod.newJavaField(STRING_TYPE);
    f.addLine(pValue);
    pMethod.addIf(f, " != null");
    pSGlet.generate(pMethod, pValue);
    pMethod.addEndIf();
  }
View Full Code Here

    return js;
  }

  public void forAllNonNullValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
    LocalJavaField f = pMethod.newJavaField(qName);
    f.addLine(pValue);
    pMethod.addIf(f, " != null");
    pSGlet.generate(pMethod, pValue);
    pMethod.addEndIf();
  }
View Full Code Here

    return result;
  }

  public void forAllValues(PropertySG pController, JavaMethod pMethod, DirectAccessible pElement, SGlet pSGlet) throws SAXException {
    LocalJavaField list = pMethod.newJavaField(List.class);
    list.addLine(pController.getValue(pElement));
    DirectAccessible i = pMethod.addForList(list);
    TypeSG typeSG = objectSG.getTypeSG();
    Object v;
    boolean isCasting = !OBJECT_TYPE.equals(typeSG.getRuntimeType());
    if (isCasting  &&  pSGlet instanceof SGlet.TypedSGlet) {
View Full Code Here

    pMethod.addEndFor();
  }

  public void forAllNonNullValues(PropertySG pController, JavaMethod pMethod, DirectAccessible pElement, SGlet pSGlet) throws SAXException {
    LocalJavaField list = pMethod.newJavaField(List.class);
    list.addLine(pController.getValue(pElement));
    DirectAccessible i = pMethod.addForList(list);
    TypeSG typeSG = objectSG.getTypeSG();
    Object v;
    boolean isCasting = !OBJECT_TYPE.equals(typeSG.getRuntimeType());
    JavaQName qName = typeSG.getRuntimeType();
View Full Code Here

  public void setValue(PropertySG pController, JavaMethod pMethod, DirectAccessible pElement, Object pValue, JavaQName pType) throws SAXException {
    if (pValue != null) {
      pValue = new Object[]{"(", pType, ") ", pValue};
    }
    LocalJavaField list = pMethod.newJavaField(List.class);
    list.addLine(pController.getValue(pElement));
    pMethod.addLine(list, ".clear();");
    pMethod.addLine(list, ".addAll(", pValue, ");");
  }

  public void addValue(PropertySG pController, JavaMethod pMethod, DirectAccessible pElement, Object pValue, JavaQName pType) throws SAXException {
View Full Code Here

   * @param pValues An array of additional values, possibly null
   */
  protected void logEntering(JavaMethod pMethod, Object pValues) {
    if (isGeneratingLogging()) {
      LocalJavaField mName = pMethod.newJavaField(String.class, "mName");
      mName.addLine(JavaSource.getQuoted(pMethod.getLoggingSignature()));
      mName.setFinal(true);
      if (pValues == null) {
        pMethod.addLine("logger.entering(", mName, ");");
      } else {
        pMethod.addLine("logger.entering(", mName, ", ", pValues, ");");        
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.