incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: incubator-altrmi/src/java/org/apache/altrmi/generator BCELProxyGeneratorImpl.java
Date Sun, 23 Feb 2003 10:26:36 GMT
hammant     2003/02/23 02:26:36

  Modified:    src/java/org/apache/altrmi/generator
                        BCELProxyGeneratorImpl.java
  Log:
  Start of work on .equals()
  
  Revision  Changes    Path
  1.5       +30 -11    incubator-altrmi/src/java/org/apache/altrmi/generator/BCELProxyGeneratorImpl.java
  
  Index: BCELProxyGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/generator/BCELProxyGeneratorImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BCELProxyGeneratorImpl.java	22 Feb 2003 14:53:52 -0000	1.4
  +++ BCELProxyGeneratorImpl.java	23 Feb 2003 10:26:36 -0000	1.5
  @@ -240,7 +240,7 @@
           il.append(
               m_factory.createFieldAccess(
                   generatedClassName,
  -                "mProxyHelper",
  +                "m_proxyHelper",
                   new ObjectType("org.apache.altrmi.client.ProxyHelper"),
                   Constants.PUTFIELD));
           InstructionHandle ih9 = il.append(m_factory.createReturn(Type.VOID));
  @@ -253,7 +253,7 @@
       /**
        * Method createFields.
        * =================adding===============
  -     *   private transient org.apache.altrmi.client.ProxyHelper mProxyHelper;
  +     *   private transient org.apache.altrmi.client.ProxyHelper m_proxyHelper;
        * =================adding===============
        *     Add
        */
  @@ -264,7 +264,7 @@
               new FieldGen(
                   Constants.ACC_PRIVATE | Constants.ACC_TRANSIENT,
                   new ObjectType("org.apache.altrmi.client.ProxyHelper"),
  -                "mProxyHelper",
  +                "m_proxyHelper",
                   m_constantsPool);
           m_classGen.addField(field.getField());
       }
  @@ -273,7 +273,7 @@
        * Method createGetReferenceIDMethod.
        * =================adding=====================================
        *   public Long altrmiGetReferenceID(Object factoryThatIsAsking) {
  -     *     return mProxyHelper.getReferenceID(factoryThatIsAsking);
  +     *     return m_proxyHelper.getReferenceID(factoryThatIsAsking);
        *   }
        * =================adding=====================================
        *
  @@ -297,7 +297,7 @@
           il.append(
               m_factory.createFieldAccess(
                   generatedClassName,
  -                "mProxyHelper",
  +                "m_proxyHelper",
                   new ObjectType("org.apache.altrmi.client.ProxyHelper"),
                   Constants.GETFIELD));
           il.append(m_factory.createLoad(Type.OBJECT, 1));
  @@ -470,7 +470,7 @@
            * ================================================
            * try
            * {
  -         *      Object retVal = mProxyHelper.processObjectRequest("foo1(int,
  +         *      Object retVal = m_proxyHelper.processObjectRequest("foo1(int,
                    float, java.lang.String, java.lang.Integer)",args,argClasses);
            *      return (java.lang.String) retVal;
            * }
  @@ -495,7 +495,7 @@
           il.append(
               m_factory.createFieldAccess(
                   generatedClassName,
  -                "mProxyHelper",
  +                "m_proxyHelper",
                   new ObjectType("org.apache.altrmi.client.ProxyHelper"),
                   Constants.GETFIELD));
           // **** Check if the return type is facade ***
  @@ -732,14 +732,33 @@
           il.dispose();
       }
   
  -    private void generateEqualsMethod()
  -    {
  -        // TODO ....
  +    private void generateEqualsMethod() {
   
          /* public boolean equals(Object o) {
           *   return m_proxyHelper.isEquals(this,o);
           * }
           */
  +
  +// TODO Can't get this to work (PH) .....
  +//     [junit] java.lang.VerifyError: (class: AltrmiGeneratedHello_org$apache$altrmi$test$TestInterface3,
  +//             method: equals signature: (Ljava/lang/Object;)Z) Incompatible type for getting
or setting field
  +
  +//      InstructionList il = new InstructionList();
  +//      MethodGen method = new MethodGen(Constants.ACC_PUBLIC, Type.BOOLEAN, new Type[]
{
  +//          Type.OBJECT }, new String[] { "arg0" }, "equals", "AltrmiGeneratedHello_Main",
il, m_constantsPool);
  +//
  +//      il.append(m_factory.createLoad(Type.OBJECT, 0));
  +//      il.append(m_factory.createFieldAccess("AltrmiGeneratedHello_Main", "m_proxyHelper",
  +//              new ObjectType("org.apache.altrmi.client.ProxyHelper"), Constants.GETFIELD));
  +//      il.append(m_factory.createLoad(Type.OBJECT, 0));
  +//      il.append(m_factory.createLoad(Type.OBJECT, 1));
  +//      il.append(m_factory.createInvoke("org.apache.altrmi.client.ProxyHelper", "isEquals",
  +//              Type.BOOLEAN, new Type[] { Type.OBJECT, Type.OBJECT }, Constants.INVOKEINTERFACE));
  +//      il.append(m_factory.createReturn(Type.INT));
  +//      method.setMaxStack();
  +//      method.setMaxLocals();
  +//      m_classGen.addMethod(method.getMethod());
  +//      il.dispose();
       }
   
       /**
  
  
  

Mime
View raw message