Add missing @Override annotations

GitOrigin-RevId: 56b084f82d4f4ec5153645b4d745bc881b803a26
This commit is contained in:
Tagir Valeev
2024-11-29 12:51:16 +00:00
committed by intellij-monorepo-bot
parent a59744de12
commit 5dca817b05
628 changed files with 1265 additions and 39 deletions
@@ -13,6 +13,7 @@ public class CustomRegExpInspectionToolWrapper extends LocalInspectionToolWrappe
super(new CustomRegExpFakeInspection(configuration));
}
@Override
public int hashCode() {
return myTool.getShortName().hashCode();
}
@@ -67,6 +67,7 @@ final class ExternalEditorOptionsImpl implements ExternalEditorOptions, JDOMExte
}
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
@@ -80,6 +81,7 @@ final class ExternalEditorOptionsImpl implements ExternalEditorOptions, JDOMExte
otherOptions.getExecutablePath() == null;
}
@Override
public int hashCode() {
return executablePath != null ? executablePath.hashCode() : 0;
}
@@ -72,6 +72,7 @@ final class ZoomOptionsImpl implements ZoomOptions {
return true;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -35,6 +35,7 @@ final class ThumbnailSelectInTarget implements SelectInTarget, DumbAware {
}
}
@Override
public String toString() {
return ImagesBundle.message("thumbnails.toolwindow.name");
}
@@ -75,6 +75,7 @@ public final class ColorDescriptor {
return myAWTColor;
}
@Override
public String toString() {
if (mySwingColor != null) {
return mySwingColor;
@@ -91,6 +92,7 @@ public final class ColorDescriptor {
return "null";
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof ColorDescriptor)) {
return false;
@@ -100,6 +100,7 @@ public final class FontDescriptor {
return UIManager.getFont(mySwingFont) != null;
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof FontDescriptor)) {
return false;
@@ -114,6 +114,7 @@ public final class StringDescriptor {
myFormClass = formClass;
}
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (!(o instanceof StringDescriptor)) return false;
@@ -128,6 +129,7 @@ public final class StringDescriptor {
return true;
}
@Override
public int hashCode() {
int result;
result = (myBundleName != null ? myBundleName.hashCode() : 0);
@@ -136,6 +138,7 @@ public final class StringDescriptor {
return result;
}
@Override
public String toString() {
if (myValue != null) {
return "[StringDescriptor:" + myValue + "]";
@@ -63,6 +63,7 @@ public final class BorderType {
return myBorderFactoryMethodName;
}
@Override
public boolean equals(final Object o){
if (o instanceof BorderType){
return myId.equals(((BorderType)o).myId);
@@ -70,6 +71,7 @@ public final class BorderType {
return false;
}
@Override
public int hashCode(){
return 0;
}
@@ -134,6 +134,7 @@ public final class CompilerMessageImpl implements CompilerMessage {
return myModuleNames;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof CompilerMessage)) return false;
@@ -149,6 +150,7 @@ public final class CompilerMessageImpl implements CompilerMessage {
return true;
}
@Override
public int hashCode() {
int result;
result = myCategory.hashCode();
@@ -159,6 +161,7 @@ public final class CompilerMessageImpl implements CompilerMessage {
return result;
}
@Override
public String toString() {
return myMessage;
}
@@ -27,6 +27,7 @@ public class ExitStatus {
myName = name;
}
@Override
public String toString() {
return myName;
}
@@ -83,6 +83,7 @@ public abstract class BuildArtifactsBeforeRunTaskBase<Self extends BuildArtifact
myArtifactPointers.remove(pointer);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -96,6 +97,7 @@ public abstract class BuildArtifactsBeforeRunTaskBase<Self extends BuildArtifact
return true;
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + myArtifactPointers.hashCode();
@@ -329,6 +329,7 @@ public class InstrumentationClassFinder {
return result;
}
@Override
public boolean equals (final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -593,6 +594,7 @@ public class InstrumentationClassFinder {
return new BufferedInputStream(new FileInputStream(file));
}
@Override
public String toString() {
return file.getAbsolutePath();
}
@@ -604,6 +606,7 @@ public class InstrumentationClassFinder {
return null;
}
@Override
public String toString() {
return "FileLoader [" + myRootDir + "]";
}
@@ -677,6 +680,7 @@ public class InstrumentationClassFinder {
return null;
}
@Override
public String toString() {
return "JarLoader [" + myURL + "!/" + entry.getName() + "]";
}
@@ -23,6 +23,7 @@ package com.intellij.openapi.compiler;
*/
public enum CompilerMessageCategory {
ERROR {
@Override
public String toString() {
return JavaCompilerBundle.message("message.category.error");
}
@@ -32,6 +33,7 @@ public enum CompilerMessageCategory {
}
},
WARNING {
@Override
public String toString() {
return JavaCompilerBundle.message("message.category.warning");
}
@@ -41,6 +43,7 @@ public enum CompilerMessageCategory {
}
},
INFORMATION {
@Override
public String toString() {
return JavaCompilerBundle.message("message.category.information");
}
@@ -50,6 +53,7 @@ public enum CompilerMessageCategory {
}
},
STATISTICS {
@Override
public String toString() {
return JavaCompilerBundle.message("message.category.statistics");
}
@@ -70,6 +70,7 @@ public class ExcludeEntryDescription implements Disposable {
return myFilePointer.isValid();
}
@Override
public boolean equals(Object obj) {
if(!(obj instanceof ExcludeEntryDescription entryDescription)) {
return false;
@@ -83,6 +84,7 @@ public class ExcludeEntryDescription implements Disposable {
return Objects.equals(entryDescription.getUrl(), getUrl());
}
@Override
public int hashCode() {
int result = (myIsFile ? 1 : 0);
result = 31 * result + (myIncludeSubdirectories ? 1 : 0);
@@ -1187,6 +1187,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
myEvaluationContext = evaluationContext;
}
@Override
public String toString() {
return "INVOKE: " + super.toString();
}
@@ -361,6 +361,7 @@ public abstract class SuspendContextImpl extends XSuspendContext implements Susp
myEvaluationContext = evaluationContext;
}
@Override
public String toString() {
return "{" + myDebugId + "} " + "SP=" + getSuspendPolicyString() + " " + oldToString();
}
@@ -80,10 +80,12 @@ public final class TextWithImportsImpl implements TextWithImports {
return myImports;
}
@Override
public boolean equals(Object object) {
return object instanceof TextWithImportsImpl item && Objects.equals(item.myText, myText) && Objects.equals(item.myImports, myImports);
}
@Override
public String toString() {
return getText();
}
@@ -100,6 +102,7 @@ public final class TextWithImportsImpl implements TextWithImports {
return result;
}
@Override
public int hashCode() {
return myText.hashCode();
}
@@ -21,12 +21,14 @@ public class ArgValueData extends DescriptorData<ArgumentValueDescriptorImpl> {
return new ArgumentValueDescriptorImpl(project, myVariable, myValue);
}
@Override
public boolean equals(Object object) {
if (!(object instanceof ArgValueData)) return false;
return myVariable.slot() == ((ArgValueData)object).myVariable.slot();
}
@Override
public int hashCode() {
return myVariable.slot();
}
@@ -32,10 +32,12 @@ public final class ArrayItemData extends DescriptorData<ArrayElementDescriptorIm
return new ArrayItemDisplayKeyImpl(myIndex);
}
@Override
public boolean equals(Object object) {
return object instanceof ArrayItemData && myArray.equals(((ArrayItemData)object).myArray) && ((ArrayItemData)object).myIndex == myIndex;
}
@Override
public int hashCode() {
return myArray.hashCode() + myIndex;
}
@@ -47,10 +49,12 @@ public final class ArrayItemData extends DescriptorData<ArrayElementDescriptorIm
myIndex = index;
}
@Override
public boolean equals(Object o) {
return o instanceof ArrayItemDisplayKeyImpl && ((ArrayItemDisplayKeyImpl)o).myIndex == myIndex;
}
@Override
public int hashCode() {
return 0;
}
@@ -20,8 +20,10 @@ public abstract class DescriptorData<T extends NodeDescriptor> implements Descri
protected abstract T createDescriptorImpl(@NotNull Project project);
@Override
public abstract boolean equals(Object object);
@Override
public abstract int hashCode();
public abstract DisplayKey<T> getDisplayKey();
@@ -4,7 +4,9 @@ package com.intellij.debugger.impl.descriptors.data;
import com.intellij.debugger.ui.tree.NodeDescriptor;
public interface DisplayKey<T extends NodeDescriptor> extends DescriptorKey<T> {
@Override
boolean equals(Object object);
@Override
int hashCode();
}
@@ -21,10 +21,12 @@ public final class FieldData extends DescriptorData<FieldDescriptorImpl> {
return new FieldDescriptorImpl(project, myObjRef, myField);
}
@Override
public boolean equals(Object object) {
return object instanceof FieldData fieldData && fieldData.myField == myField && fieldData.myObjRef.equals(myObjRef);
}
@Override
public int hashCode() {
return myObjRef.hashCode() + myField.hashCode();
}
@@ -19,12 +19,14 @@ public class LocalData extends DescriptorData<LocalVariableDescriptorImpl> {
return new LocalVariableDescriptorImpl(project, myLocalVariable);
}
@Override
public boolean equals(Object object) {
if (!(object instanceof LocalData)) return false;
return ((LocalData)object).myLocalVariable.equals(myLocalVariable);
}
@Override
public int hashCode() {
return myLocalVariable.hashCode();
}
@@ -35,6 +35,7 @@ public final class MethodReturnValueData extends DescriptorData<MethodReturnValu
}
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -47,6 +48,7 @@ public final class MethodReturnValueData extends DescriptorData<MethodReturnValu
return true;
}
@Override
public int hashCode() {
return Objects.hash(myReturnValue, myMethod);
}
@@ -10,11 +10,13 @@ public class SimpleDisplayKey<T extends NodeDescriptor> implements DisplayKey<T>
myKey = key;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof SimpleDisplayKey)) return false;
return ((SimpleDisplayKey<?>)o).myKey.equals(myKey);
}
@Override
public int hashCode() {
return myKey.hashCode();
}
@@ -28,6 +28,7 @@ public class StackFrameData extends DescriptorData<StackFrameDescriptorImpl> {
return new StackFrameDescriptorImpl(myFrame, myMethodsTracker);
}
@Override
public boolean equals(Object object) {
if (!(object instanceof StackFrameData)) {
return false;
@@ -35,6 +36,7 @@ public class StackFrameData extends DescriptorData<StackFrameDescriptorImpl> {
return ((StackFrameData)object).myFrame == myFrame;
}
@Override
public int hashCode() {
return myFrame.hashCode();
}
@@ -51,6 +53,7 @@ public class StackFrameData extends DescriptorData<StackFrameDescriptorImpl> {
myContextKey = contextKey;
}
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -62,6 +65,7 @@ public class StackFrameData extends DescriptorData<StackFrameDescriptorImpl> {
return true;
}
@Override
public int hashCode() {
return myContextKey == null ? 0 : myContextKey.hashCode();
}
@@ -25,10 +25,12 @@ public final class StaticData extends DescriptorData<StaticDescriptorImpl> {
return new StaticDescriptorImpl(myRefType);
}
@Override
public boolean equals(Object object) {
return object instanceof StaticData;
}
@Override
public int hashCode() {
return STATIC.hashCode();
}
@@ -18,6 +18,7 @@ public final class StaticFieldData extends DescriptorData<FieldDescriptorImpl> {
return new FieldDescriptorImpl(project, null, myField);
}
@Override
public boolean equals(Object object) {
if (!(object instanceof StaticFieldData fieldData)) {
return false;
@@ -25,6 +26,7 @@ public final class StaticFieldData extends DescriptorData<FieldDescriptorImpl> {
return (fieldData.myField == myField);
}
@Override
public int hashCode() {
return myField.hashCode();
}
@@ -15,12 +15,14 @@ public final class ThisData extends DescriptorData<ThisDescriptorImpl> {
return new ThisDescriptorImpl(project);
}
@Override
public boolean equals(Object object) {
if (!(object instanceof ThisData)) return false;
return true;
}
@Override
public int hashCode() {
return THIS.hashCode();
}
@@ -19,6 +19,7 @@ public class ThreadData extends DescriptorData<ThreadDescriptorImpl> {
return new ThreadDescriptorImpl(myThread);
}
@Override
public boolean equals(Object object) {
if (!(object instanceof ThreadData)) {
return false;
@@ -26,6 +27,7 @@ public class ThreadData extends DescriptorData<ThreadDescriptorImpl> {
return myThread.equals(((ThreadData)object).myThread);
}
@Override
public int hashCode() {
return myThread.hashCode();
}
@@ -19,12 +19,14 @@ public class ThreadGroupData extends DescriptorData<ThreadGroupDescriptorImpl> {
return new ThreadGroupDescriptorImpl(myThreadGroup);
}
@Override
public boolean equals(Object object) {
if (!(object instanceof ThreadGroupData)) return false;
return myThreadGroup.equals(((ThreadGroupData)object).myThreadGroup);
}
@Override
public int hashCode() {
return myThreadGroup.hashCode();
}
@@ -28,12 +28,14 @@ public class UserExpressionData extends DescriptorData<UserExpressionDescriptor>
return new UserExpressionDescriptorImpl(project, myParentDescriptor, myTypeName, myName, myText, myEnumerationIndex);
}
@Override
public boolean equals(Object object) {
if (!(object instanceof UserExpressionData)) return false;
return myName.equals(((UserExpressionData)object).myName);
}
@Override
public int hashCode() {
return myName.hashCode();
}
@@ -25,6 +25,7 @@ public final class WatchItemData extends DescriptorData<WatchItemDescriptor> {
return myValue == null ? new WatchItemDescriptor(project, myText) : new WatchItemDescriptor(project, myText, myValue);
}
@Override
public boolean equals(final Object object) {
if (object instanceof WatchItemData) {
return myText.equals(((WatchItemData)object).myText);
@@ -32,6 +33,7 @@ public final class WatchItemData extends DescriptorData<WatchItemDescriptor> {
return false;
}
@Override
public int hashCode() {
return myText.hashCode();
}
@@ -102,6 +102,7 @@ public class GeneratedLocation implements Location {
return Long.compare(codeIndex(), o.codeIndex());
}
@Override
public String toString() {
return myReferenceType.name() + "." + myMethodName + ":" + myLineNumber;
}
@@ -56,10 +56,12 @@ public class LocalVariableProxyImpl extends JdiProxy implements LocalVariablePro
return myFrame;
}
@Override
public int hashCode() {
return 31 * myFrame.hashCode() + myVariableName.hashCode();
}
@Override
public boolean equals(Object o) {
return o instanceof LocalVariableProxyImpl proxy &&
Comparing.equal(proxy.myFrame, myFrame) &&
@@ -53,6 +53,7 @@ public class ObjectReferenceProxyImpl extends JdiProxy {
return myType;
}
@Override
@NonNls
public String toString() {
final ObjectReference objectReference = getObjectReference();
@@ -107,6 +108,7 @@ public class ObjectReferenceProxyImpl extends JdiProxy {
return getObjectReference().entryCount();
}
@Override
public boolean equals(Object o) {
if (!(o instanceof ObjectReferenceProxyImpl)) {
return false;
@@ -117,6 +119,7 @@ public class ObjectReferenceProxyImpl extends JdiProxy {
}
@Override
public int hashCode() {
return myObjectReference.hashCode();
}
@@ -268,6 +268,7 @@ public class StackFrameProxyImpl extends JdiProxy implements StackFrameProxyEx {
return myThreadProxy;
}
@Override
public @NonNls String toString() {
try {
return "StackFrameProxyImpl: " + getStackFrame().toString();
@@ -513,11 +514,13 @@ public class StackFrameProxyImpl extends JdiProxy implements StackFrameProxyEx {
throw new EvaluateException(error.getMessage(), error);
}
@Override
public int hashCode() {
return 31 * myThreadProxy.hashCode() + myFrameFromBottomIndex;
}
@Override
public boolean equals(final Object obj) {
if (!(obj instanceof StackFrameProxyImpl frameProxy)) {
return false;
@@ -46,6 +46,7 @@ public class ThreadGroupReferenceProxyImpl extends ObjectReferenceProxyImpl impl
return myParentThreadGroupProxy;
}
@Override
public @NonNls String toString() {
return "ThreadGroupReferenceProxy: " + getThreadGroupReference().toString();
}
@@ -124,6 +124,7 @@ public final class ThreadReferenceProxyImpl extends ObjectReferenceProxyImpl imp
getThreadReference().suspend();
}
@Override
@NonNls
public String toString() {
try {
@@ -158,6 +158,7 @@ public class VirtualMachineProxyImpl implements JdiTimer, VirtualMachineProxy {
return allClasses;
}
@Override
public String toString() {
return myVirtualMachine.toString();
}
@@ -477,11 +478,13 @@ public class VirtualMachineProxyImpl implements JdiTimer, VirtualMachineProxy {
return proxy;
}
@Override
public boolean equals(Object obj) {
LOG.assertTrue(obj instanceof VirtualMachineProxyImpl);
return myVirtualMachine.equals(((VirtualMachineProxyImpl)obj).getVirtualMachine());
}
@Override
public int hashCode() {
return myVirtualMachine.hashCode();
}
@@ -115,6 +115,7 @@ public class NodeRendererSettings implements PersistentStateComponent<Element> {
return myAlternateCollectionRenderers[0].isEnabled();
}
@Override
public boolean equals(Object o) {
if (!(o instanceof NodeRendererSettings)) return false;
@@ -48,6 +48,7 @@ public class RendererConfiguration implements Cloneable, JDOMExternalizable {
return result;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof RendererConfiguration)) return false;
@@ -31,6 +31,7 @@ public final class ViewsGeneralSettings implements PersistentStateComponent<View
return this;
}
@Override
public boolean equals(Object object) {
return object instanceof ViewsGeneralSettings generalSettings &&
HIDE_NULL_ARRAY_ELEMENTS == generalSettings.HIDE_NULL_ARRAY_ELEMENTS &&
@@ -120,6 +120,7 @@ public class RunHotswapDialog extends OptionsDialog {
return mySession;
}
@Override
public String toString() {
return mySession.getSessionName();
}
@@ -418,6 +418,7 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
}
}
@Override
public String toString() {
return ReadAction.compute(() -> CommonXmlStrings.HTML_START + CommonXmlStrings.BODY_START
+ XmlStringUtil.escapeString(getDisplayName())
@@ -55,6 +55,7 @@ public class DebuggerTreeNodeImpl extends TreeBuilderNode implements DebuggerTre
return myTree;
}
@Override
public String toString() {
return myText != null ? myText.toString() : "";
}
@@ -27,10 +27,12 @@ import com.intellij.openapi.diagnostic.Logger;
public final class DefaultNodeDescriptor extends NodeDescriptorImpl {
private static final Logger LOG = Logger.getInstance(DefaultNodeDescriptor.class);
@Override
public boolean equals(Object obj) {
return obj instanceof DefaultNodeDescriptor;
}
@Override
public int hashCode() {
return 0;
}
@@ -126,6 +126,7 @@ public abstract class NodeDescriptorImpl implements NodeDescriptor {
return myLabel;
}
@Override
public String toString() {
return getLabel();
}
@@ -125,6 +125,7 @@ public abstract class NodeRendererImpl implements NodeRenderer {
myProperties.writeExternal(element, myDefaultName);
}
@Override
public String toString() {
return getName();
}
@@ -328,6 +328,7 @@ public abstract class SourcePosition implements Navigatable {
};
}
@Override
public boolean equals(Object o) {
if (o instanceof SourcePosition sourcePosition) {
return Comparing.equal(sourcePosition.getFile(), getFile()) && sourcePosition.getOffset() == getOffset();
@@ -186,6 +186,7 @@ public final class DebuggerSettings implements Cloneable, PersistentStateCompone
}
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof DebuggerSettings secondSettings)) return false;
@@ -121,6 +121,7 @@ public class JarApplicationConfiguration extends LocatableConfigurationBase impl
JavaRunConfigurationExtensionManager.checkConfigurationIsValid(this);
}
@Override
public Module @NotNull [] getModules() {
Module module = myConfigurationModule.getModule();
return module != null ? new Module[]{module} : Module.EMPTY_ARRAY;
@@ -123,6 +123,7 @@ public final class ProjectStructureSelectInTarget implements SelectInTarget, Dum
return false;
}
@Override
public String toString() {
return JavaUiBundle.message("select.in.project.settings");
}
@@ -54,6 +54,7 @@ public final class LibraryDescriptor implements Dependency {
myJars.removeAll(jars);
}
@Override
public String toString() {
return "Lib[" + myName + "]";
}
@@ -139,6 +139,7 @@ public non-sealed class ModuleDescriptor implements Dependency {
/**
* For debug purposes only
*/
@Override
public String toString() {
@NonNls final StringBuilder builder = new StringBuilder();
builder.append("[Module: ").append(getContentRoots()).append(" | ");
@@ -478,6 +478,7 @@ public class JdkComboBox extends SdkComboBoxBase<JdkComboBoxItem> {
return new SdkListItem.NoneSdkItem();
}
@Override
public String toString() {
return JavaUiBundle.message("jdk.combo.box.none.item");
}
@@ -60,6 +60,7 @@ public class ArtifactSourceItem extends PackagingSourceItem {
return Collections.singletonList(PackagingElementFactory.getInstance().createArtifactElement(pointer, project));
}
@Override
public boolean equals(Object obj) {
return obj instanceof ArtifactSourceItem && myArtifact.equals(((ArtifactSourceItem)obj).myArtifact);
}
@@ -74,6 +75,7 @@ public class ArtifactSourceItem extends PackagingSourceItem {
return myArtifact;
}
@Override
public int hashCode() {
return myArtifact.hashCode();
}
@@ -43,10 +43,12 @@ public final class ArtifactsSourceItemsProvider extends PackagingSourceItemsProv
super(false);
}
@Override
public boolean equals(Object obj) {
return obj instanceof ArtifactsGroupSourceItem;
}
@Override
public int hashCode() {
return 0;
}
@@ -50,10 +50,12 @@ public class LibrarySourceItem extends PackagingSourceItem {
return new LibrarySourceItemPresentation(myLibrary, context);
}
@Override
public boolean equals(Object obj) {
return obj instanceof LibrarySourceItem && myLibrary.equals(((LibrarySourceItem)obj).myLibrary);
}
@Override
public int hashCode() {
return myLibrary.hashCode();
}
@@ -40,10 +40,12 @@ public class ModuleGroupItem extends PackagingSourceItem {
myPath = path;
}
@Override
public boolean equals(Object obj) {
return obj instanceof ModuleGroupItem && myPath.equals(((ModuleGroupItem)obj).myPath);
}
@Override
public int hashCode() {
return myPath.hashCode();
}
@@ -23,7 +23,10 @@ import com.intellij.packaging.elements.PackagingElementOutputKind;
import com.intellij.packaging.impl.elements.ProductionModuleOutputElementType;
import com.intellij.packaging.impl.elements.ProductionModuleOutputPackagingElement;
import com.intellij.packaging.impl.ui.ModuleElementPresentation;
import com.intellij.packaging.ui.*;
import com.intellij.packaging.ui.ArtifactEditorContext;
import com.intellij.packaging.ui.PackagingSourceItem;
import com.intellij.packaging.ui.SourceItemPresentation;
import com.intellij.packaging.ui.SourceItemWeights;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
@@ -40,10 +43,12 @@ public class ModuleOutputSourceItem extends PackagingSourceItem {
return myModule;
}
@Override
public boolean equals(Object obj) {
return obj instanceof ModuleOutputSourceItem && myModule.equals(((ModuleOutputSourceItem)obj).myModule);
}
@Override
public int hashCode() {
return myModule.hashCode();
}
@@ -35,10 +35,12 @@ public class ModuleSourceItemGroup extends PackagingSourceItem {
return new ModuleSourceItemPresentation(myModule, context);
}
@Override
public boolean equals(Object obj) {
return obj instanceof ModuleSourceItemGroup && myModule.equals(((ModuleSourceItemGroup)obj).myModule);
}
@Override
public int hashCode() {
return myModule.hashCode();
}
@@ -89,6 +89,7 @@ class ItemElement extends LibraryTableTreeContentElement<ItemElement> {
return myRootType;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ItemElement itemElement)) return false;
@@ -100,6 +101,7 @@ class ItemElement extends LibraryTableTreeContentElement<ItemElement> {
return myUrl;
}
@Override
public int hashCode() {
int result;
result = getParent().hashCode();
@@ -36,6 +36,7 @@ public interface LibrariesContainer {
Project getProject();
enum LibraryLevel {GLOBAL, PROJECT, MODULE;
@Override
public String toString() {
return StringUtil.capitalize(StringUtil.toLowerCase(name()));
}
@@ -10,6 +10,7 @@ import java.util.Collection;
public interface RefJavaElement extends RefElement {
@Override
@Deprecated
default PsiElement getElement() {
throw new UnsupportedOperationException();
@@ -211,6 +211,7 @@ public final class WrapWithAdapterMethodCallFix extends LocalQuickFixAndIntentio
return null;
}
@Override
public String toString() {
return myTemplate.replace("{0}", "").replaceAll("\\b[a-z.]+\\.", "");
}
@@ -74,6 +74,7 @@ public final class HMember implements MemberDescriptor {
return this;
}
@Override
public String toString() {
return bytesToString(asBytes());
}
@@ -78,6 +78,7 @@ final class LambdaIndy {
return ContainerUtil.concat(captured, ContainerUtil.map(getFunctionalMethodType().getArgumentTypes(), valueSupplier));
}
@Override
public String toString() {
return "Lambda [" + myMethod.methodName + "]: " + StringUtil.getShortName(myFunctionalInterfaceType.getClassName());
}
@@ -218,6 +218,7 @@ public final class TrackingRunner extends StandardDataFlowRunner {
}
public abstract static class DfaProblemType {
@Override
public abstract @Nls String toString();
CauseItem[] findCauses(TrackingRunner runner, PsiExpression expression, MemoryStateChange history) {
@@ -432,6 +433,7 @@ public final class TrackingRunner extends StandardDataFlowRunner {
return new CauseItem[0];
}
@Override
public String toString() {
return JavaAnalysisBundle.message("dfa.find.cause.cast.may.fail");
}
@@ -447,6 +449,7 @@ public final class TrackingRunner extends StandardDataFlowRunner {
return new CauseItem[0];
}
@Override
public String toString() {
return JavaAnalysisBundle.message("dfa.find.cause.may.be.null");
}
@@ -51,6 +51,7 @@ public class BooleanAndOrInstruction extends ExpressionPushingInstruction {
return result.toArray(DfaInstructionState.EMPTY_ARRAY);
}
@Override
public String toString() {
return myOr ? "OR" : "AND";
}
@@ -112,6 +112,7 @@ public class BooleanBinaryInstruction extends ExpressionPushingInstruction {
}
@Override
public String toString() {
return "BOOLEAN_OP " + myRelation;
}
@@ -264,6 +264,7 @@ public class MethodCallInstruction extends ExpressionPushingInstruction {
return myContext;
}
@Override
public String toString() {
if (myContext instanceof PsiCall) {
return "CALL_METHOD: " + myContext.getText();
@@ -39,6 +39,7 @@ public class MethodReferenceInstruction extends ExpressionPushingInstruction {
return nextStates(interpreter, stateBefore);
}
@Override
public String toString() {
return "METHOD_REF: " + getDfaAnchor();
}
@@ -40,6 +40,7 @@ public class NotInstruction extends ExpressionPushingInstruction {
return result.toArray(DfaInstructionState.EMPTY_ARRAY);
}
@Override
public String toString() {
return "NOT";
}
@@ -63,6 +63,7 @@ public class NumericBinaryInstruction extends EvalInstruction {
};
}
@Override
public String toString() {
return myBinOp == null ? "UNKNOWN_NUMERIC_OP" : "NUMERIC_OP " + myBinOp;
}
@@ -79,6 +79,7 @@ public class StringConcatInstruction extends EvalInstruction {
constant instanceof Boolean ? constant.toString() : null;
}
@Override
public String toString() {
return "STRING_CONCAT";
}
@@ -87,6 +87,7 @@ public class JavaClassFindUsagesOptions extends JavaFindUsagesOptions {
}
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!super.equals(o)) return false;
@@ -105,6 +106,7 @@ public class JavaClassFindUsagesOptions extends JavaFindUsagesOptions {
return true;
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (isMethodsUsages ? 1 : 0);
@@ -56,6 +56,7 @@ public class JavaMethodFindUsagesOptions extends JavaFindUsagesOptions {
properties.setValue(prefix + "isSearchForBaseMethod", isSearchForBaseMethod, true);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!super.equals(o)) return false;
@@ -74,6 +75,7 @@ public class JavaMethodFindUsagesOptions extends JavaFindUsagesOptions {
return true;
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (isOverridingMethods ? 1 : 0);
@@ -59,6 +59,7 @@ public class JavaPackageFindUsagesOptions extends JavaFindUsagesOptions {
}
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!super.equals(o)) return false;
@@ -73,6 +74,7 @@ public class JavaPackageFindUsagesOptions extends JavaFindUsagesOptions {
return true;
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (isClassesUsages ? 1 : 0);
@@ -61,6 +61,7 @@ public class JavaVariableFindUsagesOptions extends JavaFindUsagesOptions {
properties.setValue(prefix + "isSearchForBaseAccessors", isSearchForBaseAccessors, false);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!super.equals(o)) return false;
@@ -77,6 +78,7 @@ public class JavaVariableFindUsagesOptions extends JavaFindUsagesOptions {
return true;
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (isReadAccess ? 1 : 0);
@@ -973,6 +973,7 @@ public final class DuplicatesFinder {
return myFolded;
}
@Override
public String toString() {
return myVariable + ", " + myType + (myFolded ? ", folded" : "");
}
@@ -1,7 +1,10 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.siyeh.ig.fixes;
import com.intellij.psi.*;
import com.intellij.psi.PsiField;
import com.intellij.psi.PsiMethod;
import com.intellij.psi.PsiModifier;
import com.intellij.psi.PsiModifierList;
import com.intellij.psi.util.ClassUtil;
import org.jetbrains.annotations.NonNls;
@@ -88,6 +91,7 @@ public class MemberSignature implements Comparable<MemberSignature> {
return signature.compareTo(other.signature);
}
@Override
public boolean equals(Object object) {
try {
final MemberSignature other = (MemberSignature)object;
@@ -128,10 +132,12 @@ public class MemberSignature implements Comparable<MemberSignature> {
return STATIC_INITIALIZER;
}
@Override
public int hashCode() {
return name.hashCode() + signature.hashCode();
}
@Override
public String toString() {
return name + signature;
}
@@ -555,6 +555,7 @@ public enum ApplicationMediaType {
this.contentType = contentType;
}
@Override
public String toString() {
return contentType;
}
@@ -116,6 +116,7 @@ public enum AudioMediaType {
this.contentType = contentType;
}
@Override
public String toString() {
return contentType;
}
@@ -63,6 +63,7 @@ public enum ImageMediaType {
this.contentType = contentType;
}
@Override
public String toString() {
return contentType;
}
@@ -38,6 +38,7 @@ public enum MessageMediaType {
this.contentType = contentType;
}
@Override
public String toString() {
return contentType;
}
@@ -39,6 +39,7 @@ public enum ModelMediaType {
this.contentType = contentType;
}
@Override
public String toString() {
return contentType;
}
@@ -39,6 +39,7 @@ public enum MultipartMediaType {
this.contentType = contentType;
}
@Override
public String toString() {
return contentType;
}
@@ -71,6 +71,7 @@ public enum TextMediaType {
this.contentType = contentType;
}
@Override
public String toString() {
return contentType;
}
@@ -70,6 +70,7 @@ public enum VideoMediaType {
this.contentType = contentType;
}
@Override
public String toString() {
return contentType;
}
@@ -133,6 +133,7 @@ public final class StatementExtractor {
public abstract Node prepend(Node node);
@Override
public abstract String toString();
}
@@ -206,6 +207,7 @@ public final class StatementExtractor {
return node.myAnchor == null ? this : new Cons(node, this);
}
@Override
public String toString() {
if (myAnchor instanceof PsiInstanceOfExpression) {
var patternVariableWrappers = JavaPsiPatternUtil.collectPatternVariableWrappers(myAnchor);
@@ -42,6 +42,7 @@ public final class CancelPolicy implements ConflictResolutionPolicy {
return null;
}
@Override
public String toString() {
return "Cancel";
}
@@ -195,6 +195,7 @@ public class Config {
return myPattern = pattern;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -224,6 +225,7 @@ public class Config {
return true;
}
@Override
public int hashCode() {
int result;
result = (useFullyQualifiedName ? 1 : 0);
@@ -244,6 +246,7 @@ public class Config {
return result;
}
@Override
public String toString() {
return "Config{" +
"useFullyQualifiedName=" + useFullyQualifiedName +
@@ -259,6 +259,7 @@ public final class FilterPattern {
this.methodType = methodType;
}
@Override
public String toString() {
return "FilterPattern{" +
"fieldName='" + fieldName + "'" +
@@ -53,6 +53,7 @@ public final class InsertLastStrategy implements InsertNewMethodStrategy {
return (PsiMethod) clazz.addBefore(newMethod, last);
}
@Override
public String toString() {
return "Last";
}
@@ -98,6 +98,7 @@ public class MigrationMap {
myEntries.set(index, entry);
}
@Override
public String toString() {
return getName();
}
@@ -359,6 +359,7 @@ public class MoveClassesOrPackagesProcessor extends BaseRefactoringProcessor {
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ClassMemberWrapper wrapper)) return false;
@@ -371,6 +372,7 @@ public class MoveClassesOrPackagesProcessor extends BaseRefactoringProcessor {
return Objects.equals(myElement.getName(), wrapper.myElement.getName());
}
@Override
public int hashCode() {
final String name = myElement.getName();
if (name != null) {
@@ -59,6 +59,7 @@ public interface ExpectedTypeInfo {
boolean equals(ExpectedTypeInfo info);
@Override
String toString();
ExpectedTypeInfo @NotNull [] intersect(@NotNull ExpectedTypeInfo info);
@@ -75,6 +75,7 @@ public class ExpectedTypeInfoImpl implements ExpectedTypeInfo {
return myDefaultType;
}
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (!(o instanceof ExpectedTypeInfoImpl that)) return false;
@@ -87,6 +88,7 @@ public class ExpectedTypeInfoImpl implements ExpectedTypeInfo {
return true;
}
@Override
public int hashCode() {
int result = myType.hashCode();
result = 31 * result + myDefaultType.hashCode();
@@ -100,6 +102,7 @@ public class ExpectedTypeInfoImpl implements ExpectedTypeInfo {
return equals((Object)obj);
}
@Override
public String toString() {
return "ExpectedTypeInfo[type='" + myType + "' kind='" + myKind + "']";
}
@@ -56,6 +56,7 @@ public abstract class RParenthTailType extends TailType {
return moveCaret(editor, existingRParenthOffset, 1);
}
@Override
public @NonNls String toString() {
return "RParenth";
}

Some files were not shown because too many files have changed in this diff Show More