Examples of newJavaMethod()


Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

      ComplexTypeSG complexTypeSG = typeSG.getComplexTypeSG();

      JavaQName resultName = complexTypeSG.getClassContext().getXMLInterfaceName();
      String className = resultName.getClassName();
      String methodName = "create" + Character.toUpperCase(className.charAt(0)) + className.substring(1);
      JavaMethod createMethod = js.newJavaMethod(methodName, resultName, "public");
      createMethod.addThrows(JAXBException.class);
      createMethod.addLine("return (", resultName, ") newInstance(", resultName, ".class);");
    }
   
    return js;
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    DirectAccessible pLexicalValue = con.addParam(String.class, "pLexicalValue");
    con.addLine(name, " = ", pName, ";");
    con.addLine(value, " = ", pValue, ";");
    con.addLine(lexicalValue, " = ", pLexicalValue, ";");

    JavaMethod toStringMethod = js.newJavaMethod("toString", String.class, JavaSource.PUBLIC);
    toStringMethod.addLine("return ", lexicalValue, ";");

    JavaMethod getValueMethod = js.newJavaMethod("getValue", valueType, JavaSource.PUBLIC);
    getValueMethod.addLine("return ", value, ";");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    con.addLine(lexicalValue, " = ", pLexicalValue, ";");

    JavaMethod toStringMethod = js.newJavaMethod("toString", String.class, JavaSource.PUBLIC);
    toStringMethod.addLine("return ", lexicalValue, ";");

    JavaMethod getValueMethod = js.newJavaMethod("getValue", valueType, JavaSource.PUBLIC);
    getValueMethod.addLine("return ", value, ";");

    JavaMethod getNameMethod = js.newJavaMethod("getName", String.class, JavaSource.PUBLIC);
    getNameMethod.addLine("return ", name, ";");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    toStringMethod.addLine("return ", lexicalValue, ";");

    JavaMethod getValueMethod = js.newJavaMethod("getValue", valueType, JavaSource.PUBLIC);
    getValueMethod.addLine("return ", value, ";");

    JavaMethod getNameMethod = js.newJavaMethod("getName", String.class, JavaSource.PUBLIC);
    getNameMethod.addLine("return ", name, ";");

    JavaMethod getInstancesMethod = js.newJavaMethod("getInstances", qNameArray, JavaSource.PUBLIC);
    getInstancesMethod.setStatic(true);
    getInstancesMethod.addLine("return ", instances, ";");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    getValueMethod.addLine("return ", value, ";");

    JavaMethod getNameMethod = js.newJavaMethod("getName", String.class, JavaSource.PUBLIC);
    getNameMethod.addLine("return ", name, ";");

    JavaMethod getInstancesMethod = js.newJavaMethod("getInstances", qNameArray, JavaSource.PUBLIC);
    getInstancesMethod.setStatic(true);
    getInstancesMethod.addLine("return ", instances, ";");

    JavaMethod fromValueMethod = js.newJavaMethod("fromValue", qName, JavaSource.PUBLIC);
    pValue = fromValueMethod.addParam(valueType, "pValue");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    JavaMethod getInstancesMethod = js.newJavaMethod("getInstances", qNameArray, JavaSource.PUBLIC);
    getInstancesMethod.setStatic(true);
    getInstancesMethod.addLine("return ", instances, ";");

    JavaMethod fromValueMethod = js.newJavaMethod("fromValue", qName, JavaSource.PUBLIC);
    pValue = fromValueMethod.addParam(valueType, "pValue");
    fromValueMethod.setStatic(true);
    DirectAccessible i = fromValueMethod.addForArray(instances);
    fromValueMethod.addIf(pController.getEqualsCheck(fromValueMethod, new Object[]{instances, "[", i, "].value"}, pValue));
    fromValueMethod.addLine("return ", instances, "[", i, "];");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    fromValueMethod.addEndIf();
    fromValueMethod.addEndFor();
    fromValueMethod.addThrowNew(IllegalArgumentException.class, JavaSource.getQuoted("Invalid value: "),
                                " + ", pValue);

    JavaMethod fromNameMethod = js.newJavaMethod("fromName", qName, JavaSource.PUBLIC);
    pName = fromNameMethod.addParam(String.class, "pName");
    fromNameMethod.setStatic(true);
    i = fromNameMethod.addForArray(instances);
    fromNameMethod.addIf(instances, "[", i, "].name.equals(", pName, ")");
    fromNameMethod.addLine("return ", instances, "[", i, "];");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    fromNameMethod.addEndIf();
    fromNameMethod.addEndFor();
    fromNameMethod.addThrowNew(IllegalArgumentException.class, JavaSource.getQuoted("Invalid name: "),
                                " + ", pName);

    JavaMethod fromStringMethod = js.newJavaMethod("fromString", qName, JavaSource.PUBLIC);
    pValue = fromStringMethod.addParam(String.class, "pValue");
    fromStringMethod.setStatic(true);
    fromStringMethod.addLine("return ", fromValueMethod, "(",
                             super.getCastFromString(pController, fromStringMethod, pValue, null), ");");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    fromStringMethod.setStatic(true);
    fromStringMethod.addLine("return ", fromValueMethod, "(",
                             super.getCastFromString(pController, fromStringMethod, pValue, null), ");");

    if (js.isImplementing(Serializable.class)) {
      JavaMethod readResolveMethod = js.newJavaMethod("readResolve", Object.class, JavaSource.PRIVATE);
      readResolveMethod.addLine("return ", fromValueMethod, "(", value, ");");
    }
    return js;
  }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.newJavaMethod()

    myName.setFinal(true);
    XsQName qName = pController.getName();
    myName.addLine("new ", QName.class, "(", JavaSource.getQuoted(qName.getNamespaceURI()),
                   ", ", JavaSource.getQuoted(qName.getLocalName()), ")");

    JavaMethod getQName = js.newJavaMethod("getQName", QName.class, JavaSource.PUBLIC);
    getQName.addLine("return ", myName, ";");

    return js;
  }
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.