Override the equals method using the given {@link MethodBodyCreator}.

@param creator the method body creator to use
@return true if the method was not already overridden
435326
protected boolean overrideEquals(MethodBodyCreator creator) {
        Method equals = null;
        ClassMetadataSource data = reflectionMetadataSource.getClassMetadata(Object.class);
        try {
            equals = data.getMethod("equals", Boolean.TYPE, Object.class);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return overrideMethod(equals, MethodIdentifier.getIdentifierForMethod(equals), creator);
    }
1247374
private static boolean isMatching(Method base, Method compare) {

		// if names and argument types match ... then this are the same method
		if (base.getName().equals(compare.getName()) &&
		    base.getParameterCount() == compare.getParameterCount()) {

			Class<?>[] typeBase = base.getParameterTypes();
			Class<?>[] typeCompare = compare.getParameterTypes();

			for (int index = 0; index < typeBase.length; index++) {
				Class clazzBase = typeBase[index];
				Class clazzCompare = typeCompare[index];
				if (!clazzBase.equals(clazzCompare)) {
					return false;
				}
			}

			return true;
		}

		return false;
	}
387147
private static boolean methodExists(String controllerMethod, Class<?> controllerClass) {
        Objects.requireNonNull(controllerMethod, Required.CONTROLLER_METHOD.toString());
        Objects.requireNonNull(controllerClass, Required.CONTROLLER_CLASS.toString());
        
        return Arrays.stream(controllerClass.getMethods()).anyMatch(method -> method.getName().equals(controllerMethod));
    }
369374
public boolean equalsContents(Object o) {
        if(this == o) {
            return true;
        }
        if(o == null) {
            return false;
        }
        if (o.getClass() != getClass()) {
            return false;
        }

        if(!super.equalsContents(o)) {
            return false;
        }

        Referenceable obj = (Referenceable)o;
        if (!traitNames.equals(obj.getTraits())) {
            return false;
        }

        return true;
    }
745164
public static boolean isMatch(Method methodA, Method methodB)
  {
    if (! methodA.getName().equals(methodB.getName()))
      return false;

    return isMatch(methodA.getParameterTypes(),
                   methodB.getParameterTypes());
  }
899592
@Override
    public <T> T create(EntityCreateOperation<T> creator)
            throws ServiceException {
        try {
            return service.create(creator);
        } catch (UniformInterfaceException e) {
            throw processCatch(new ServiceException(e));
        } catch (ClientHandlerException e) {
            throw processCatch(new ServiceException(e));
        }
    }
544249
@Override
  public boolean doIsEquals(NormalAnnotationExpr first, NormalAnnotationExpr second) {

    boolean equals = true;

    if (!first.getName().equals(second.getName())) equals = false;

    if (equals == true) {

      if (first.getPairs() == null) return second.getPairs() == null;

      if (!isSmallerHasEqualsInBigger(first.getPairs(), second.getPairs(), true)) return false;

    }

    return equals;
  }
105680
public boolean equalsTo(Object o)
    {
        if(o == null || !(o instanceof Reference))
        {
            return false;
        }
        
        Reference refCompared = (Reference)o;
        if(!StringUtil.isEquals(sections, refCompared.sections)) return false;
        if(systemUnderTest == null || !systemUnderTest.equalsTo(refCompared.systemUnderTest)) return false;
        if(requirement == null || !requirement.equalsTo(refCompared.requirement)) return false;
        if(specification == null || !specification.equalsTo(refCompared.specification)) return false;
        
        return true;
    }
826037
public T create() throws Exception {
        if (type == TYPE_DEFAULT) {
            if (args == null || args.length == 0) {
                return aClass.newInstance();
            }
        } else if (type == TYPE_CREATOR) {
            return creator.create();
        }

        throw new RuntimeException("Unsupported create method");
    }
784480
private void addEquals(TypeSpec.Builder classBuilder) {
        MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("equals")
                .addModifiers(Modifier.PUBLIC)
                .addParameter(ClassName.get(Object.class), "obj")
                .returns(boolean.class)
                .addAnnotation(Override.class)
                .addStatement("return (obj instanceof " + getRemoterInterfaceClassName() + ClassBuilder.PROXY_SUFFIX + ") && obj.hashCode() == hashCode()");
        classBuilder.addMethod(methodBuilder.build());
    }
713894
protected Request.Builder setBody(Request.Builder builder) {
        // NOTE: default Builder is GET
        if (body != null) {
            byte[] bodyBytes = null;
            try {
                bodyBytes = Manager.getObjectMapper().writeValueAsBytes(body);
            } catch (Exception e) {
                Log.e(TAG, "Error serializing body of request", e);
            }
            RequestBody requestBody = null;
            if (isCompressedRequest()) {
                requestBody = setCompressedBody(bodyBytes);
                if (requestBody != null)
                    builder.addHeader("Content-Encoding", "gzip");
            }
            if (requestBody == null)
                requestBody = RequestBody.create(JSON, bodyBytes);
            if ("PUT".equalsIgnoreCase(method))
                builder.put(requestBody);
            else if ("POST".equalsIgnoreCase(method))
                builder.post(requestBody);
        }
        // body is null -> create db (PUT /{db})
        // http://docs.couchdb.org/en/2.0.0/api/database/common.html#put--db
        else if ("PUT".equalsIgnoreCase(method) || "POST".equalsIgnoreCase(method)) {
            // create empty json
            RequestBody requestBody = RequestBody.create(JSON, "");
            if ("PUT".equalsIgnoreCase(method))
                builder.put(requestBody);
            else if ("POST".equalsIgnoreCase(method))
                builder.post(requestBody);
        }
        return builder;
    }
888315
public Datatype.Builder setHasToBuilderMethod(boolean hasToBuilderMethod) {
    this.hasToBuilderMethod = hasToBuilderMethod;
    _unsetProperties.remove(Property.HAS_TO_BUILDER_METHOD);
    return (Datatype.Builder) this;
  }
14131
public static <T> boolean equalsE(T a, T b) {
        if (a == null && b == null) {
            return true;
        }
        if (a != null && b == null) {
            return false;
        }
        if (a == null) {
            return false;
        }
        return a.equals(b);
    }
130866
public final void mGREATER_EQUALS() throws RecognitionException {
		try {
			int _type = GREATER_EQUALS;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:218:5: ( '>=' )
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:218:7: '>='
			{
			match(">="); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
971197
public static boolean isEqualsMethod(Method method) {
		if (method == null || false == method.getName().equals("equals")) {
			return false;
		}
		final Class<?>[] paramTypes = method.getParameterTypes();
		return (1 == paramTypes.length && paramTypes[0] == Object.class);
	}
982925
protected boolean overrideHashcode(MethodBodyCreator creator) {

        Method hashCode = null;
        ClassMetadataSource data = reflectionMetadataSource.getClassMetadata(Object.class);
        try {
            hashCode = data.getMethod("hashCode", Integer.TYPE);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return overrideMethod(hashCode, MethodIdentifier.getIdentifierForMethod(hashCode), creator);
    }
1000418
private boolean httpMethodSupportsBody(HttpMethod method) {
        return HttpMethod.POST.equals(method) || HttpMethod.PUT.equals(method)
                || HttpMethod.DELETE.equals(method) || HttpMethod.PATCH.equals(method);
    }