Examples of LocalJavaField


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

    String collectionType = pController.getCollectionType();
    DirectAccessible value;
    if (pValue instanceof DirectAccessible) {
      value = (DirectAccessible) pValue;
    } else {
      LocalJavaField v = pMethod.newJavaField(pController.getRuntimeType());
      v.addLine(pValue);
      value = v;
    }

    LocalJavaField sb = pMethod.newJavaField(StringBuffer.class);
    sb.addLine("new ", StringBuffer.class, "()");
    Object v;
    DirectAccessible loopVar;
    if ("indexed".equals(collectionType)) {
      loopVar = pMethod.addForArray(value);
      v = new Object[]{value, "[", loopVar, "]"};
View Full Code Here

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

    pMethod.addEndFor();
    return new Object[]{sb, ".toString()"};
  }

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

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

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    return new DatatypeConverterImpl().parseDateTime(pValue);
  }

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

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

      throw new LocSAXException("Failed to convert string value to BigInteger: " + pValue, getLocator());
    }
  }

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

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

    return new Object[]{ pData, ".getDatatypeConverter().printQName(", pValue, ", ", pData,
                          ".getNamespaceContext())" };
  }

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

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

      throw new LocSAXException("Failed to convert string value to HexBinary: " + pValue, getLocator());
    }
  }

  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

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

      throw new LocSAXException("Failed to convert string value to Base64Binary: " + pValue, getLocator());
    }
  }

  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

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

                                   Object pData) throws SAXException {
    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++) {
      pMethod.addTry();
      pMethod.addLine(result, " = ", memberTypes[i].getSimpleTypeSG().getCastFromString(pMethod, value, pData), ";");
      pMethod.addCatch(RuntimeException.class);
    }
View Full Code Here

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

                                 DirectAccessible pData) throws SAXException {
    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++) {
      JavaQName memberRuntimeType = memberTypes[i].getSimpleTypeSG().getRuntimeType();
      pMethod.addIf(i == 0, value, " instanceof ", memberRuntimeType);
      Object v = OBJECT_TYPE.equals(memberRuntimeType) ?
        (Object) value :
View Full Code Here

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

  public Object getCastToString(SimpleTypeSG pController, Object pValue, DirectAccessible pData) {
    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
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.