Package org.apache.ws.jaxme.js

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


    jcon.addLine(values, " = ", pValues, ";");
   
    JavaMethod getNameMethod = jic.newJavaMethod("getName", String.class, JavaSource.PUBLIC);
    getNameMethod.addLine("return ", name, ";");
   
    JavaMethod getValuesMethod = jic.newJavaMethod("getValues", Object[].class, JavaSource.PUBLIC);
    getValuesMethod.addLine("return ", values, ";");
   
    {
      JavaMethod jm = jic.newJavaMethod("toString", String.class, JavaSource.PUBLIC);
      LocalJavaField sb = jm.newJavaField(StringBuffer.class, "sb");
View Full Code Here


   
    JavaMethod getValuesMethod = jic.newJavaMethod("getValues", Object[].class, JavaSource.PUBLIC);
    getValuesMethod.addLine("return ", values, ";");
   
    {
      JavaMethod jm = jic.newJavaMethod("toString", String.class, JavaSource.PUBLIC);
      LocalJavaField sb = jm.newJavaField(StringBuffer.class, "sb");
      sb.addLine("new ", StringBuffer.class, "(", name, ")");
      DirectAccessible loopVar = jm.addForArray(values);
      jm.addLine(sb, ".append(", JavaSource.getQuoted(", "), ").append(",
          values, "[", loopVar, "]);");
View Full Code Here

      jm.addLine("return ", sb, ".toString();");
     
    }
   
    {
      JavaMethod jm = jic.newJavaMethod("hashCode", int.class, JavaSource.PUBLIC);
      LocalJavaField hashCodeResult = jm.newJavaField(int.class, "result");
      hashCodeResult.addLine(name, ".hashCode() + ", values, ".length;");
      DirectAccessible loopVar = jm.addForArray(values);
      LocalJavaField o = jm.newJavaField(Object.class, "o");
      o.addLine(values, "[", loopVar, "]");
View Full Code Here

      jm.addEndFor();
      jm.addLine("return ", hashCodeResult, ";");
    }
   
    {
      JavaMethod jm = jic.newJavaMethod("equals", boolean.class, JavaSource.PUBLIC);
      DirectAccessible o = jm.addParam(Object.class, "o");
      jm.addIf(o, " == null  ||  !(", o, " instanceof ", jic.getQName(), ")");
      jm.addLine("return false;");
      jm.addEndIf();
      LocalJavaField other = jm.newJavaField(jic.getQName(), "other");
View Full Code Here

    DirectAccessible pName = jcon.addParam(String.class, "pName");
    DirectAccessible pValues = jcon.addParam(Object[].class, "pValues");
    jcon.addLine(name, " = ", pName, ";");
    jcon.addLine(values, " = ", pValues, ";");
   
    JavaMethod getNameMethod = jic.newJavaMethod("getName", String.class, JavaSource.PUBLIC);
    getNameMethod.addLine("return ", name, ";");
   
    JavaMethod getValuesMethod = jic.newJavaMethod("getValues", Object[].class, JavaSource.PUBLIC);
    getValuesMethod.addLine("return ", values, ";");
   
View Full Code Here

    jcon.addLine(values, " = ", pValues, ";");
   
    JavaMethod getNameMethod = jic.newJavaMethod("getName", String.class, JavaSource.PUBLIC);
    getNameMethod.addLine("return ", name, ";");
   
    JavaMethod getValuesMethod = jic.newJavaMethod("getValues", Object[].class, JavaSource.PUBLIC);
    getValuesMethod.addLine("return ", values, ";");
   
    {
      JavaMethod jm = jic.newJavaMethod("toString", String.class, JavaSource.PUBLIC);
      LocalJavaField sb = jm.newJavaField(StringBuffer.class, "sb");
View Full Code Here

   
    JavaMethod getValuesMethod = jic.newJavaMethod("getValues", Object[].class, JavaSource.PUBLIC);
    getValuesMethod.addLine("return ", values, ";");
   
    {
      JavaMethod jm = jic.newJavaMethod("toString", String.class, JavaSource.PUBLIC);
      LocalJavaField sb = jm.newJavaField(StringBuffer.class, "sb");
      sb.addLine("new ", StringBuffer.class, "(", name, ")");
      DirectAccessible loopVar = jm.addForArray(values);
      jm.addLine(sb, ".append(", JavaSource.getQuoted(", "), ").append(",
          values, "[", loopVar, "]);");
View Full Code Here

      jm.addLine("return ", sb, ".toString();");
     
    }
   
    {
      JavaMethod jm = jic.newJavaMethod("hashCode", int.class, JavaSource.PUBLIC);
      LocalJavaField hashCodeResult = jm.newJavaField(int.class, "result");
      hashCodeResult.addLine(name, ".hashCode() + ", values, ".length;");
      DirectAccessible loopVar = jm.addForArray(values);
      LocalJavaField o = jm.newJavaField(Object.class, "o");
      o.addLine(values, "[", loopVar, "]");
View Full Code Here

      jm.addEndFor();
      jm.addLine("return ", hashCodeResult, ";");
    }
   
    {
      JavaMethod jm = jic.newJavaMethod("equals", boolean.class, JavaSource.PUBLIC);
      DirectAccessible o = jm.addParam(Object.class, "o");
      jm.addIf(o, " == null  ||  !(", o, " instanceof ", jic.getQName(), ")");
      jm.addLine("return false;");
      jm.addEndIf();
      LocalJavaField other = jm.newJavaField(jic.getQName(), "other");
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.