activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/AltJavaGenerator.java [730:757]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        for (FieldDescriptor field : m.getFields().values()) {
            String uname = uCamel(field.getName());
            String getterMethod="get"+uname+"()";     
            String hasMethod = "has"+uname+"()";

            if( field.getRule() == FieldDescriptor.REPEATED_RULE ) {
                getterMethod = "get"+uname+"List()";
            }
            
            p("if ("+hasMethod+" ^ obj."+hasMethod+" ) ");
            p("   return false;");
            
            
            
            if( field.getRule() != FieldDescriptor.REPEATED_RULE && (field.isNumberType() || field.getType()==FieldDescriptor.BOOL_TYPE) ) {
                p("if ("+hasMethod+" && ( "+getterMethod+"!=obj."+getterMethod+" ))");
            } else {
                p("if ("+hasMethod+" && ( !"+getterMethod+".equals(obj."+getterMethod+") ))");
            }
            p("   return false;");
        }
        p("return true;");
        unindent();
        p("}");
        p("");
        p("public int hashCode() {");
        indent();
        int hc = className.hashCode();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/JavaGenerator.java [513:541]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	        for (FieldDescriptor field : m.getFields().values()) {
	            String uname = uCamel(field.getName());
	            String getterMethod="get"+uname+"()";     
	            String hasMethod = "has"+uname+"()";
	
	            if( field.getRule() == FieldDescriptor.REPEATED_RULE ) {
	                getterMethod = "get"+uname+"List()";
	            }
	            
	            p("if ("+hasMethod+" ^ obj."+hasMethod+" ) ");
	            p("   return false;");
	            
	            
	            
	            if( field.getRule() != FieldDescriptor.REPEATED_RULE && (field.isNumberType() || field.getType()==FieldDescriptor.BOOL_TYPE) ) {
	                p("if ("+hasMethod+" && ( "+getterMethod+"!=obj."+getterMethod+" ))");
	            } else {
	                p("if ("+hasMethod+" && ( !"+getterMethod+".equals(obj."+getterMethod+") ))");
	            }
	            p("   return false;");
	        }
	        p("return true;");
        }
        unindent();
        p("}");
        p("");
        p("public int hashCode() {");
        indent();
        int hc = className.hashCode();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



