Examples of DirectAccessible


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

  public JavaMethod getXMLHandlersStartElementMethod(ComplexTypeSG pController, JavaSource pSource,
                                                      DirectAccessible pLevelVar)
      throws SAXException {
    JavaMethod jm = pSource.newJavaMethod("startElement", void.class, JavaSource.PUBLIC);
    DirectAccessible pNamespaceURI = jm.addParam(String.class, "pNamespaceURI");
    DirectAccessible pLocalName = jm.addParam(String.class, "pLocalName");
    DirectAccessible pQName = jm.addParam(String.class, "pQName");
    DirectAccessible pAttr = jm.addParam(Attributes.class, "pAttr");
    jm.addThrows(SAXException.class);

    jm.addSwitch(pLevelVar, "++");
    jm.addCase("0");
View Full Code Here

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

  }

  public JavaQName getRuntimeType(SimpleTypeSG pController) { return DURATION_TYPE; }

  public Object getCastFromString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, Object pData) {
    DirectAccessible v;
    if (pValue instanceof DirectAccessible) {
      v = (DirectAccessible) pValue;
    } else {
      LocalJavaField f = pMethod.newJavaField(String.class);
      f.addLine(pValue);
View Full Code Here

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

      throws SAXException {
    LocalJavaField list = pMethod.newJavaField(LIST_TYPE);
    String collectionType = pController.getCollectionType();
    list.addLine("new ", ("indexed".equals(collectionType) ?
                          ARRAYLIST_TYPE : JavaQNameImpl.getInstance(collectionType, true)), "()");
    DirectAccessible st = pMethod.addForEnumeration(StringTokenizer.class, new Object[]{"new ", StringTokenizer.class, "(", pValue, ")"});
    pMethod.addLine(list, ".add(", itemType.getSimpleTypeSG().getCastFromString(pMethod, new Object[]{st, ".nextToken()"}, pData),
                    ");");
    pMethod.addEndFor();

    if ("indexed".equals(collectionType)) {
View Full Code Here

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

  }

  public Object getCastToString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, DirectAccessible pData)
      throws SAXException {
    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, "]"};
    } else {
      loopVar = pMethod.addForList(value);
View Full Code Here

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

  public JavaMethod getXMLSetMethod(SimpleTypeSG pController, JavaSource pSource,
                                     String pFieldName, String pMethodName) throws SAXException {
    if (pController.hasSetMethod()) {
      String pName = "p" + Character.toUpperCase(pFieldName.charAt(0)) + pFieldName.substring(1);
      JavaMethod jm = pSource.newJavaMethod(pMethodName, JavaQNameImpl.VOID, JavaSource.PUBLIC);
      DirectAccessible param = jm.addParam(pController.getRuntimeType(), pName);
      if (!pSource.isInterface()) {
        pController.addValidation(jm, param);
        jm.addLine(pFieldName, " = ", param, ";");
      }
      return jm;
View Full Code Here

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

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

  public Object getCastFromString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue,
                                   Object pData) throws SAXException {
    DirectAccessible value;
    if (pValue instanceof DirectAccessible) {
      value = (DirectAccessible) pValue;
    } else {
      LocalJavaField v = pMethod.newJavaField(String.class);
      v.addLine(pValue);
View Full Code Here

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

    return result;
  }

  public Object getCastToString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue,
                                 DirectAccessible pData) throws SAXException {
    DirectAccessible value;
    if (pValue instanceof DirectAccessible) {
      value = (DirectAccessible) pValue;
    } else {
      LocalJavaField v = pMethod.newJavaField(Object.class);
      v.addLine(pValue);
View Full Code Here

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

        JavaMethod jm = js.newJavaMethod("newResult", resultInterface, JavaSource.PROTECTED);
        jm.addThrows(SAXException.class);
        jm.addTry();
        jm.addLine("return (", resultInterface, ") getData().getFactory().getElement(",
                   xmlElementInterface, ".class);");
        DirectAccessible e = jm.addCatch(JAXBException.class);
        jm.addThrowNew(SAXException.class, e);
        jm.addEndTry();
      } else {
        myTypeSG.getComplexTypeSG().generateXMLHandlerMethods(js);
      }
View Full Code Here

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

  }

  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) {
      isCasting = ((SGlet.TypedSGlet) pSGlet).isCasting();
View Full Code Here

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

  }

  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();
    if (isCasting  &&  pSGlet instanceof SGlet.TypedSGlet) {
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.