From a6cd5b5dbcd1fa2086c5285fa3883fc3bc459fee Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Thu, 29 May 2025 06:16:20 -0400 Subject: [PATCH 1/2] GP-0: Fixing @Override warnings --- .../dmg/ghidra/GDataConverterBE.java | 24 +++++++++++++ .../dmg/ghidra/GDataConverterLE.java | 24 +++++++++++++ .../model/data/ISF/AbstractIsfWriter.java | 5 +-- .../model/memory/TraceObjectMemoryRegion.java | 4 +++ .../database/spatial/rect/Rectangle2D.java | 5 +-- .../layout/SampleGraphLayoutProvider.java | 5 +-- .../filters/MultiChoiceBSimValueEditor.java | 5 +-- .../gui/filters/StringBSimValueEditor.java | 5 +-- .../gui/search/dialog/BSimSearchDialog.java | 2 ++ .../query/elastic/IDElasticResolution.java | 5 +-- .../query/protocol/AdjustVectorIndex.java | 5 +-- .../bsim/query/protocol/ChildAtom.java | 7 ++-- .../GenerateMaskedBitStringScript.java | 6 ++-- .../ReportDisassemblyErrors.java | 3 +- .../ghidra_scripts/TurnOffStackAnalysis.java | 5 +-- .../AbstractBinaryFormatAnalyzer.java | 7 ++-- .../ghidra/app/cmd/memory/MoveBlockTask.java | 5 +-- .../listing/UserDefinedPropertyMerger.java | 7 ++-- .../PropertyListMergeManager.java | 11 ++++-- .../propertylist/PropertyListMergePanel.java | 6 ++-- .../algorithmtree/ModuleAlgorithmPlugin.java | 6 ++-- .../core/analysis/AnalysisTaskList.java | 1 + .../analysis/ConstantPropagationAnalyzer.java | 1 + .../analysis/ObjectiveC2_MessageAnalyzer.java | 6 ++-- .../core/analysis/UpdateAlignmentAction.java | 7 ++-- .../validator/PostAnalysisValidator.java | 6 ++-- .../plugin/core/console/CodeCompletion.java | 1 + .../plugin/core/data/DataSettingsDialog.java | 5 +-- .../core/data/RenameDataFieldDialog.java | 5 +-- .../core/datamgr/actions/CopyAction.java | 6 ++-- .../core/datamgr/tree/CenterVerticalIcon.java | 8 +++-- .../util/DataDropOnBrowserHandler.java | 8 +++-- .../datapreview/DataTypeComponentPreview.java | 14 +++++--- .../core/fallthrough/FallThroughModel.java | 6 ++-- .../ExternalEntryFunctionAnalyzer.java | 5 +-- .../core/programtree/GroupTransferable.java | 14 ++++---- .../core/references/EditReferencePanel.java | 6 ++-- .../stackeditor/StackEditorManagerPlugin.java | 2 ++ .../PropertyManagerTableModel.java | 8 +++-- .../java/ghidra/app/plugin/match/Match.java | 5 +-- .../ghidra/app/services/AnalyzerAdapter.java | 7 ++-- .../app/util/CodeUnitInfoTransferable.java | 9 +++-- .../app/util/bin/format/coff/AoutHeader.java | 6 ++-- .../util/bin/format/coff/CoffLineNumber.java | 6 ++-- .../util/bin/format/coff/CoffRelocation.java | 5 +-- .../bin/format/coff/CoffSymbolAuxArray.java | 6 ++-- .../coff/CoffSymbolAuxBeginningOfBlock.java | 5 +-- .../bin/format/coff/CoffSymbolAuxDefault.java | 6 ++-- .../format/coff/CoffSymbolAuxEndOfBlock.java | 6 ++-- .../format/coff/CoffSymbolAuxEndOfStruct.java | 6 ++-- .../format/coff/CoffSymbolAuxFilename.java | 6 ++-- .../format/coff/CoffSymbolAuxFunction.java | 6 ++-- .../bin/format/coff/CoffSymbolAuxName.java | 6 ++-- .../bin/format/coff/CoffSymbolAuxSection.java | 6 ++-- .../bin/format/coff/CoffSymbolAuxTagName.java | 6 ++-- .../coff/archive/SecondLinkerMember.java | 5 +-- .../expression/DWARFExpressionException.java | 5 +-- .../app/util/bin/format/elf/GnuVerdaux.java | 8 ++--- .../app/util/bin/format/elf/GnuVerdef.java | 8 ++--- .../app/util/bin/format/elf/GnuVernaux.java | 8 ++--- .../app/util/bin/format/elf/GnuVerneed.java | 8 ++--- .../format/golang/rtti/types/GoMethod.java | 1 + .../format/macos/asd/AppleSingleDouble.java | 6 ++-- .../bin/format/macos/asd/EntryDescriptor.java | 5 +-- .../bin/format/macos/cfm/CFragResource.java | 6 ++-- .../format/macos/cfm/CFragResourceMember.java | 6 ++-- .../format/macos/cfm/CFragUsage1Union.java | 6 ++-- .../format/macos/cfm/CFragUsage2Union.java | 5 +-- .../format/macos/cfm/CFragWhere1Union.java | 5 +-- .../format/macos/cfm/CFragWhere2Union.java | 5 +-- .../format/macos/rm/ReferenceListEntry.java | 6 ++-- .../bin/format/macos/rm/ResourceHeader.java | 6 ++-- .../bin/format/macos/rm/ResourceType.java | 6 ++-- .../bin/format/objc2/ObjectiveC2_Cache.java | 6 ++-- .../format/objc2/ObjectiveC2_Category.java | 5 +-- .../bin/format/objc2/ObjectiveC2_Class.java | 5 +-- .../bin/format/objc2/ObjectiveC2_ClassRW.java | 6 ++-- .../format/objc2/ObjectiveC2_ImageInfo.java | 6 ++-- .../objc2/ObjectiveC2_Implementation.java | 5 +-- .../objc2/ObjectiveC2_InstanceVariable.java | 6 ++-- .../ObjectiveC2_InstanceVariableList.java | 5 +-- .../objc2/ObjectiveC2_MessageReference.java | 6 ++-- .../format/objc2/ObjectiveC2_Property.java | 6 ++-- .../objc2/ObjectiveC2_PropertyList.java | 5 +-- .../format/objc2/ObjectiveC2_Protocol.java | 5 +-- .../objc2/ObjectiveC2_ProtocolList.java | 5 +-- .../objectiveC/ObjectiveC1_Category.java | 6 ++-- .../format/objectiveC/ObjectiveC1_Class.java | 5 +-- .../ObjectiveC1_InstanceVariable.java | 6 ++-- .../ObjectiveC1_InstanceVariableList.java | 5 +-- .../objectiveC/ObjectiveC1_MetaClass.java | 6 ++-- .../format/objectiveC/ObjectiveC1_Method.java | 6 ++-- .../objectiveC/ObjectiveC1_MethodList.java | 5 +-- .../objectiveC/ObjectiveC1_Protocol.java | 6 ++-- .../objectiveC/ObjectiveC1_ProtocolList.java | 5 +-- .../ObjectiveC1_ProtocolMethod.java | 6 ++-- .../ObjectiveC1_ProtocolMethodList.java | 5 +-- .../pe/debug/DebugCodeViewSymbolTable.java | 7 ++-- .../util/bin/format/pe/debug/DebugMisc.java | 1 + .../format/pe/resource/ResourceDataEntry.java | 5 +-- .../format/pe/resource/ResourceDirectory.java | 5 +-- .../bin/format/pe/resource/ResourceInfo.java | 7 ++-- .../util/bin/format/pef/ContainerHeader.java | 5 +-- .../util/bin/format/pef/ExportedSymbol.java | 5 +-- .../format/pef/ExportedSymbolHashSlot.java | 5 +-- .../bin/format/pef/ExportedSymbolKey.java | 5 +-- .../util/bin/format/pef/ImportedLibrary.java | 5 +-- .../util/bin/format/pef/ImportedSymbol.java | 5 +-- .../util/bin/format/pef/LoaderInfoHeader.java | 5 +-- .../app/util/bin/format/pef/PefDebug.java | 6 ++-- .../app/util/bin/format/pef/Relocation.java | 5 +-- .../bin/format/xcoff/XCoffFileHeader.java | 6 ++-- .../bin/format/xcoff/XCoffOptionalHeader.java | 5 +-- .../bin/format/xcoff/XCoffSectionHeader.java | 6 ++-- .../ghidra/app/util/exporter/GzfExporter.java | 5 +-- .../util/opinion/BoundedBufferedReader.java | 8 +++++ .../util/recognizer/RecognizerService.java | 6 ++-- .../field/OpenCloseFieldMouseHandler.java | 6 ++-- .../framework/data/GhidraToolState.java | 8 ++--- .../util/state/analysis/MySwitchAnalyzer.java | 10 ++++-- .../field/AddressTableLengthTableColumn.java | 7 ++-- .../ReferenceFromAddressTableColumn.java | 5 +-- .../ReferenceFromFunctionTableColumn.java | 5 +-- .../field/ReferenceFromLabelTableColumn.java | 5 +-- .../field/ReferenceToAddressTableColumn.java | 5 +-- .../listing/BookmarkMergeManagerTest.java | 34 +++++++++++++++++-- .../CodeUnitMergeManagerOverrideTest.java | 16 +++++++-- .../DelaySlotCodeUnitMergeManagerTest.java | 10 ++++-- .../map/AddressRangeMap32BitTest.java | 5 +-- .../map/AddressRangeMap64BitTest.java | 5 +-- .../src/test/java/ghidra/JunitTestScan.java | 6 ++-- .../database/ProgramVolatilityTest.java | 5 +-- .../gui/ClosedPatternTableModel.java | 5 +-- .../gui/PatternInfoTableModel.java | 5 +-- .../plugin/core/byteviewer/FileByteBlock.java | 20 +++++++++-- .../core/format/AddressFormatModel.java | 20 +++++++++-- .../plugin/core/format/AsciiFormatModel.java | 19 +++++++++-- .../plugin/core/format/BinaryFormatModel.java | 19 +++++++++-- .../plugin/core/format/HexFormatModel.java | 19 +++++++++-- .../core/format/IntegerFormatModel.java | 19 +++++++++-- .../plugin/core/format/OctalFormatModel.java | 19 +++++++++-- .../ghidra_scripts/GraphASTAndFlowScript.java | 5 +-- .../GraphSelectedASTScript.java | 5 +-- .../classrecovery/GccTypeinfoRef.java | 6 ++-- .../decompiler/DecompilerInitializer.java | 8 ++--- .../decompiler/flatapi/FlatDecompilerAPI.java | 6 ++-- .../actions/SelectedPCodeDfgGraphTask.java | 5 +-- .../DecompilerPspecVolatilityTest.java | 5 +-- .../ghidra_scripts/ExportPCodeForCTADL.java | 2 ++ .../core/string/variadic/FormatArgument.java | 5 +-- .../android/art/headers/ArtHeader_005.java | 5 +-- .../android/fbpk/v1/FBPKv1_Partition.java | 5 +-- .../formats/android/fbpk/v1/FBPTv1_Entry.java | 5 +-- .../formats/android/fbpk/v2/FBPTv2_Entry.java | 5 +-- .../android/oat/headers/OatHeader_007.java | 5 +-- .../oat/oatclass/OatClass_Lollipop.java | 5 +-- .../android/oat/oatclass/OatClass_S_T.java | 5 +-- .../OatQuickMethodHeader_Lollipop.java | 5 +-- .../OatQuickMethodHeader_LollipopMR1.java | 5 +-- .../OatQuickMethodHeader_Nougat.java | 5 +-- .../OatQuickMethodHeader_Oreo.java | 5 +-- .../quickmethod/OatQuickMethodHeader_Q_R.java | 5 +-- .../android/vdex/headers/VdexHeader_006.java | 6 ++-- .../android/vdex/headers/VdexHeader_019.java | 5 +-- .../android/vdex/headers/VdexHeader_021.java | 5 +-- .../ghidra/file/formats/bplist/NSObject.java | 1 + .../formats/dump/apport/ApportHeader.java | 5 +-- .../file/formats/dump/cmd/DumpPeShim.java | 7 ++-- .../formats/dump/mdmp/CommentStreamA.java | 5 +-- .../formats/dump/mdmp/CommentStreamW.java | 5 +-- .../file/formats/dump/mdmp/CvRecord.java | 5 +-- .../file/formats/dump/mdmp/Directory.java | 5 +-- .../formats/dump/mdmp/ExceptionStream.java | 5 +-- .../file/formats/dump/mdmp/FunctionTable.java | 5 +-- .../dump/mdmp/FunctionTableStream.java | 5 +-- .../ghidra/file/formats/dump/mdmp/Handle.java | 5 +-- .../formats/dump/mdmp/HandleDataStream.java | 5 +-- .../dump/mdmp/HandleOperationListStream.java | 5 +-- .../formats/dump/mdmp/MdmpFileHeader.java | 5 +-- .../formats/dump/mdmp/Memory64ListStream.java | 5 +-- .../file/formats/dump/mdmp/MemoryInfo.java | 5 +-- .../dump/mdmp/MemoryInfoListStream.java | 5 +-- .../formats/dump/mdmp/MemoryListStream.java | 5 +-- .../file/formats/dump/mdmp/MemoryRange64.java | 1 + .../formats/dump/mdmp/MiscInfoStream.java | 5 +-- .../formats/dump/mdmp/ModuleListStream.java | 5 +-- .../dump/mdmp/ProcessVmCountersStream.java | 5 +-- .../formats/dump/mdmp/SystemInfoStream.java | 5 +-- .../formats/dump/mdmp/ThreadExListStream.java | 5 +-- .../file/formats/dump/mdmp/ThreadInfo.java | 5 +-- .../dump/mdmp/ThreadInfoListStream.java | 5 +-- .../formats/dump/mdmp/ThreadListStream.java | 5 +-- .../ghidra/file/formats/dump/mdmp/Token.java | 5 +-- .../formats/dump/mdmp/TokenListStream.java | 5 +-- .../dump/mdmp/UnloadedModuleListStream.java | 5 +-- .../dump/pagedump/ExceptionRecord.java | 5 +-- .../file/formats/dump/pagedump/MmPfn.java | 5 +-- .../pagedump/PhysicalMemoryDescriptor.java | 5 +-- .../dump/pagedump/PhysicalMemoryRun.java | 5 +-- .../formats/dump/pagedump/SummaryHeader.java | 5 +-- .../file/formats/dump/userdump/DebugInfo.java | 5 +-- .../formats/dump/userdump/MemoryInfo.java | 5 +-- .../formats/dump/userdump/MemoryRange.java | 5 +-- .../dump/userdump/UserdumpFileHeader.java | 5 +-- .../ios/apple8900/Apple8900Decryptor.java | 6 ++-- .../file/formats/ios/dmg/DmgHeaderV2.java | 8 +++-- .../formats/ios/ibootim/iBootImHeader.java | 5 +-- .../formats/ios/img3/AbstractImg3Tag.java | 5 +-- .../ghidra/file/formats/ios/img3/Img3.java | 5 +-- .../file/formats/yaffs2/YAFFS2Data.java | 5 +-- .../formats/yaffs2/YAFFS2ExtendedTags.java | 5 +-- .../file/formats/yaffs2/YAFFS2Header.java | 5 +-- .../ghidra/file/image/GImageConverter.java | 5 +-- .../FunctionGraphGroupVertices3Test.java | 6 ++-- .../app/plugin/core/go/GhidraGoPlugin.java | 5 +-- .../go/ipc/CheckForFileProcessedRunnable.java | 6 ++-- .../core/go/ipc/CheckForListenerRunnable.java | 5 +-- .../mouse/JgtEdgeNavigationPlugin.java | 5 +-- .../mouse/JgtTranslatingPlugin.java | 5 +-- .../datatype/modifier/MDManagedProperty.java | 5 +-- .../plugin/core/diff/DiffServiceProvider.java | 8 +++-- .../app/util/recognizer/AceRecognizer.java | 13 ++++--- .../app/util/recognizer/ArjRecognizer.java | 13 ++++--- .../app/util/recognizer/Bzip2Recognizer.java | 13 ++++--- .../app/util/recognizer/CHMRecognizer.java | 14 ++++---- .../app/util/recognizer/CabarcRecognizer.java | 14 ++++---- .../util/recognizer/CompressiaRecognizer.java | 14 ++++---- .../app/util/recognizer/CramFSRecognizer.java | 14 ++++---- .../app/util/recognizer/DebRecognizer.java | 14 ++++---- .../app/util/recognizer/DmgRecognizer.java | 14 ++++---- .../util/recognizer/EmptyPkzipRecognizer.java | 14 ++++---- .../app/util/recognizer/FreezeRecognizer.java | 14 ++++---- .../app/util/recognizer/GzipRecognizer.java | 14 ++++---- .../util/recognizer/ISO9660Recognizer.java | 14 ++++---- .../app/util/recognizer/ImpRecognizer.java | 14 ++++---- .../app/util/recognizer/JarRecognizer.java | 14 ++++---- .../app/util/recognizer/LhaRecognizer.java | 14 ++++---- .../app/util/recognizer/MSWIMRecognizer.java | 14 ++++---- .../recognizer/MacromediaFlashRecognizer.java | 14 ++++---- .../app/util/recognizer/PakArcRecognizer.java | 14 ++++---- .../app/util/recognizer/PkzipRecognizer.java | 14 ++++---- .../app/util/recognizer/PpmdRecognizer.java | 14 ++++---- .../app/util/recognizer/RPMRecognizer.java | 14 ++++---- .../app/util/recognizer/RarRecognizer.java | 14 ++++---- .../app/util/recognizer/SbcRecognizer.java | 14 ++++---- .../app/util/recognizer/SbxRecognizer.java | 14 ++++---- .../util/recognizer/SevenZipRecognizer.java | 14 ++++---- .../recognizer/SpannedPkzipRecognizer.java | 14 ++++---- .../app/util/recognizer/SqzRecognizer.java | 14 ++++---- .../util/recognizer/StuffIt1Recognizer.java | 14 ++++---- .../util/recognizer/StuffIt5Recognizer.java | 14 ++++---- .../app/util/recognizer/SzipRecognizer.java | 14 ++++---- .../app/util/recognizer/TarRecognizer.java | 14 ++++---- .../app/util/recognizer/UharcRecognizer.java | 14 ++++---- .../recognizer/UnixCompressRecognizer.java | 14 ++++---- .../util/recognizer/UnixPackRecognizer.java | 14 ++++---- .../app/util/recognizer/VHDRecognizer.java | 14 ++++---- .../app/util/recognizer/XZRecognizer.java | 14 ++++---- .../app/util/recognizer/XarRecognizer.java | 14 ++++---- .../app/util/recognizer/YbsRecognizer.java | 14 ++++---- .../app/util/recognizer/ZlibRecognizer.java | 14 ++++---- .../app/util/recognizer/sitxRecognizer.java | 14 ++++---- .../export/data/ExtIsfDataTypeWriter.java | 6 ++-- .../export/data/SarifDataTypeWriter.java | 5 +-- .../extlib/SarifClassesNamespaceWriter.java | 5 +-- .../extlib/SarifExternalLibraryWriter.java | 5 +-- .../export/func/SarifFunctionWriter.java | 5 +-- .../export/ref/SarifEquateRefWriter.java | 5 +-- .../sarif/export/ref/SarifEquateWriter.java | 5 +-- .../export/ref/SarifReferenceWriter.java | 5 +-- .../export/symbols/SarifSymbolWriter.java | 5 +-- .../result/SarifProgramResultHandler.java | 1 + .../src/main/java/sarif/io/SarifGsonIO.java | 6 ++-- .../main/java/sarif/io/SarifJacksonIO.java | 6 ++-- .../java/sarif/MergeCalcOverlaySarifTest.java | 5 +-- .../test/java/sarif/MergeCalcSarifTest.java | 5 +-- .../test/java/sarif/MergeMipsSarifTest.java | 6 ++-- .../java/sarif/MergeNotepadSarifTest.java | 5 +-- .../java/sarif/MergeWallaceSarifTest.java | 5 +-- .../ImpliedMatchProgramCorrelator.java | 5 +-- .../program/ManualMatchProgramCorrelator.java | 5 +-- .../feature/vt/api/db/VTMatchTagDB.java | 5 +-- .../vt/api/impl/MarkupItemStorageImpl.java | 6 ++-- .../vt/api/impl/VTRelatedMatchImpl.java | 20 ++++++----- .../feature/vt/api/main/VTMatchTag.java | 6 ++-- .../vt/gui/actions/ProviderToggleAction.java | 8 ++--- .../vt/gui/editors/DisplayableOffset.java | 6 ++-- .../MatchStatusUpdaterAssociationHook.java | 5 +-- .../DisplayableListingAddress.java | 5 +-- .../markuptable/DisplayableListingOffset.java | 8 +++-- .../DisplayableVariableOffset.java | 8 +++-- .../vt/gui/util/FilterIconFlashTimer.java | 5 +-- .../validator/VTPreconditionValidator.java | 6 ++-- .../main/java/db/ConvertedRecordIterator.java | 9 +++-- .../DB/src/main/java/db/DBInitializer.java | 8 ++--- .../java/db/buffers/DummyBufferFileMgr.java | 11 ++++-- .../java/docking/ComponentTransferable.java | 8 +++-- ...ngWindowsContextSensitiveHelpListener.java | 8 ++--- .../docking/dnd/DragDropTreeTransferable.java | 17 ++++++---- .../docking/menu/InvertableImageIcon.java | 8 +++-- .../main/java/docking/menu/MenuHandler.java | 12 +++++-- .../java/docking/theme/gui/ColorSorter.java | 5 +-- .../fieldpanel/internal/CursorBlinker.java | 6 ++-- .../internal/DefaultBackgroundColorModel.java | 8 +++-- .../EmptyFieldBackgroundColorManager.java | 8 +++-- .../EmptyLayoutBackgroundColorManager.java | 9 +++-- ...lySelectedFieldBackgroundColorManager.java | 8 +++-- .../LayoutBackgroundColorManagerAdapter.java | 9 +++-- .../MixedFieldBackgroundColorManager.java | 8 +++-- .../MixedLayoutBackgroundColorManager.java | 8 +++-- .../fieldpanel/AccessibleFieldTest.java | 5 +-- .../framework/client/ServerConnectTask.java | 5 +-- .../framework/remote/GhidraPrincipal.java | 6 ++-- .../store/FileSystemInitializer.java | 8 ++--- .../store/local/LocalDataFileHandle.java | 16 +++++++-- .../store/local/UnknownFolderItem.java | 3 ++ .../src/main/java/generic/json/Json.java | 1 + .../java/generic/stl/EmptyIteratorSTL.java | 16 +++++++-- .../main/java/generic/stl/ListIterator.java | 15 ++++++-- .../main/java/generic/stl/MapIteratorSTL.java | 16 +++++++-- .../main/java/generic/stl/SetIterator.java | 16 +++++++-- .../main/java/generic/stl/VectorIterator.java | 16 +++++++-- .../generic/timer/GhidraSwinglessTimer.java | 17 ++++++++-- .../framework/ShutdownHookRegistry.java | 5 +-- .../main/java/ghidra/util/LongIterator.java | 9 +++-- .../java/ghidra/util/datastruct/BitTree.java | 30 ++++++++++------ .../ghidra/util/datastruct/BooleanArray.java | 14 ++++---- .../ghidra/util/datastruct/ByteArray.java | 14 ++++---- .../util/datastruct/ByteArrayArray.java | 14 ++++---- .../ghidra/util/datastruct/DoubleArray.java | 14 ++++---- .../util/datastruct/DoubleArrayArray.java | 13 ++++--- .../ghidra/util/datastruct/FloatArray.java | 14 ++++---- .../util/datastruct/FloatArrayArray.java | 14 ++++---- .../ghidra/util/datastruct/FullKeySet.java | 34 ++++++++++++------- .../java/ghidra/util/datastruct/IntArray.java | 14 ++++---- .../ghidra/util/datastruct/IntArrayArray.java | 14 ++++---- .../ghidra/util/datastruct/LongArray.java | 14 ++++---- .../util/datastruct/LongArrayArray.java | 14 ++++---- .../ghidra/util/datastruct/ObjectArray.java | 14 ++++---- .../util/datastruct/ObjectRangeMap.java | 8 +++-- .../util/datastruct/ObjectValueRange.java | 5 +-- .../PropertySetIndexRangeIterator.java | 10 +++--- .../util/datastruct/RedBlackKeySet.java | 14 ++++++-- .../ghidra/util/datastruct/ShortArray.java | 14 ++++---- .../util/datastruct/ShortArrayArray.java | 14 ++++---- .../ghidra/util/datastruct/StringArray.java | 14 ++++---- .../util/datastruct/StringArrayArray.java | 8 +++-- .../util/datastruct/StringKeyIndexer.java | 11 +++--- .../ghidra/util/exception/MultipleCauses.java | 5 +-- .../ghidra/util/map/LongIteratorImpl.java | 16 +++++---- .../ghidra/util/map/ObjectStorageAdapter.java | 34 +++++++++++++++++-- .../java/ghidra/util/xml/SpecXmlUtils.java | 7 ++-- .../src/main/java/ghidra/xml/XmlTreeNode.java | 8 +++-- .../ghidra/service/graph/VertexShape.java | 7 ++++ .../theme/laf/MacLookAndFeelManager.java | 5 +-- .../util/filechooser/GhidraFileFilter.java | 11 +++--- .../util/layout/VariableHeightPairLayout.java | 10 ++++-- .../java/resources/icons/BytesImageIcon.java | 5 +-- .../java/resources/icons/ColorIcon3D.java | 8 +++-- .../resources/icons/DerivedImageIcon.java | 6 ++-- .../main/java/resources/icons/EmptyIcon.java | 7 ++-- .../icons/OvalBackgroundColorIcon.java | 14 ++++---- .../java/resources/icons/OvalColorIcon.java | 14 ++++---- .../main/java/ghidra/ProjectInitializer.java | 6 ++-- .../framework/main/ZoomedImagePainter.java | 8 ++--- .../datatree/VersionInfoTransferable.java | 9 +++-- .../tool/OpenFileDropHandlerFactory.java | 8 ++--- .../plugin/processors/generic/Constant.java | 2 ++ .../app/plugin/processors/generic/Label.java | 6 ++-- .../pcodeCPort/sleighbase/address_set.java | 6 ++-- .../slgh_compile/DirectoryVisitor.java | 28 +++++++++------ ...ompilePreprocessorDefinitionsAdapater.java | 14 ++++---- .../pcodeCPort/slghsymbol/SymbolTree.java | 6 ++-- .../database/code/CommentsDBAdapterV0.java | 9 +++-- .../code/DataFilteredCodeUnitIterator.java | 8 +++-- .../database/code/DataKeyIterator.java | 8 +++-- .../database/code/DataRecordIterator.java | 7 ++-- .../database/code/InstDBAdapterV0.java | 9 +++-- .../database/code/ProtoDBAdapterV0.java | 16 +++++++-- .../database/code/ProtoDBAdapterV1.java | 11 ++++-- .../database/data/CompositeDBAdapterV0.java | 1 + .../database/data/CompositeDBAdapterV1.java | 1 + .../database/data/EnumValueDBAdapterV0.java | 1 + .../database/data/EnumValueDBAdapterV1.java | 1 + .../database/data/SourceArchiveDB.java | 13 +++++-- .../data/SourceArchiveUpgradeMap.java | 13 +++++-- .../oldfunction/OldFunctionDBAdapterV0.java | 9 +++-- .../references/ShiftedReferenceDB.java | 6 ++-- .../database/references/StackReferenceDB.java | 6 ++-- .../IndexToAddressRangeIteratorAdapter.java | 9 +++-- .../program/database/symbol/EquateRefDB.java | 7 ++-- .../program/database/symbol/LibraryDB.java | 11 ++++-- .../program/database/symbol/NamespaceDB.java | 12 +++++-- .../symbol/TypeFilteredSymbolIterator.java | 8 +++-- .../program/database/util/AndQuery.java | 5 +-- .../database/util/EmptyRecordIterator.java | 9 +++-- .../database/util/FieldMatchQuery.java | 5 +-- .../database/util/FieldRangeQuery.java | 5 +-- .../program/database/util/NotQuery.java | 5 +-- .../ghidra/program/database/util/OrQuery.java | 5 +-- .../database/util/QueryRecordIterator.java | 9 +++-- .../DisassemblerMessageListener.java | 9 ++--- .../AddressRangeToAddressComparator.java | 3 +- .../address/EmptyAddressRangeIterator.java | 7 ++-- .../block/SimpleDestReferenceIterator.java | 10 +++--- .../block/SimpleSourceReferenceIterator.java | 10 +++--- .../SubroutineDestReferenceIterator.java | 10 +++--- .../SubroutineSourceReferenceIterator.java | 10 +++--- .../data/AbstractPointerTypedefBuiltIn.java | 5 +-- .../program/model/data/AnnotationHandler.java | 6 ++-- .../model/data/DefaultAnnotationHandler.java | 12 +++++-- .../program/model/data/DoubleDataType.java | 5 +-- .../program/model/data/IconResource.java | 5 +-- .../model/data/LongDoubleDataType.java | 5 +-- .../program/model/data/PointerTypedef.java | 5 +-- .../model/data/RepeatCountDataType.java | 7 ++-- .../model/data/RepeatedDynamicDataType.java | 8 +++-- .../model/data/RepeatedStringDataType.java | 7 ++-- .../model/data/StructuredDynamicDataType.java | 8 +++-- .../model/data/Undefined1DataType.java | 10 ++++-- .../model/data/Undefined2DataType.java | 10 ++++-- .../model/data/Undefined3DataType.java | 10 ++++-- .../model/data/Undefined4DataType.java | 10 ++++-- .../model/data/Undefined5DataType.java | 10 ++++-- .../model/data/Undefined6DataType.java | 10 ++++-- .../model/data/Undefined7DataType.java | 10 ++++-- .../model/data/Undefined8DataType.java | 10 ++++-- .../lang/BasicCompilerSpecDescription.java | 8 +++-- .../model/lang/BasicLanguageDescription.java | 14 ++++++-- .../java/ghidra/program/model/lang/Mask.java | 6 ++-- .../ghidra/program/model/lang/MaskImpl.java | 11 ++++-- .../program/model/lang/RegisterTree.java | 6 ++-- .../model/listing/BookmarkComparator.java | 6 ++-- .../model/listing/BookmarkTypeComparator.java | 6 ++-- .../model/listing/ProgramFragment.java | 3 +- .../program/model/listing/ProgramModule.java | 2 ++ .../symbol/ExternalLocationIterator.java | 6 ++-- .../model/symbol/MemReferenceImpl.java | 24 ++++++++++--- .../program/model/symbol/OffsetReference.java | 5 +-- .../grammar/BooleanExpressionDefTest.java | 10 +++--- .../sleigh/grammar/BooleanExpressionTest.java | 10 +++--- ...ARCH64EmulateInstructionStateModifier.java | 27 +++++++++++++-- .../SparcV9_32_O0_EmulatorTest.java | 5 +-- .../SparcV9_32_O3_EmulatorTest.java | 5 +-- .../SparcV9_64_O0_EmulatorTest.java | 5 +-- .../SparcV9_64_O3_EmulatorTest.java | 5 +-- .../TRICORE_BE_O0_EmulatorTest.java | 7 ++-- .../datatree/VersionControlAction2Test.java | 5 +-- .../ghidradev/GhidraRootPreferencePage.java | 5 +-- 449 files changed, 2348 insertions(+), 1276 deletions(-) diff --git a/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterBE.java b/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterBE.java index 14f46e28cc..dbec054b6e 100644 --- a/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterBE.java +++ b/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterBE.java @@ -24,6 +24,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getShort(byte[]) */ + @Override public final short getShort(byte[] b) { return getShort(b, 0); } @@ -31,6 +32,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getShort(byte[], int) */ + @Override public short getShort(byte[] b, int offset) { return (short) (((b[offset] & 0xff) << 8) | (b[offset + 1] & 0xff)); } @@ -38,6 +40,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getInt(byte[]) */ + @Override public final int getInt(byte[] b) { return getInt(b, 0); } @@ -45,6 +48,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getInt(byte[], int) */ + @Override public int getInt(byte[] b, int offset) { int v = b[offset]; for (int i = 1; i < 4; i++) { @@ -56,6 +60,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getLong(byte[]) */ + @Override public final long getLong(byte[] b) { return getLong(b, 0); } @@ -63,6 +68,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getLong(byte[], int) */ + @Override public long getLong(byte[] b, int offset) { long v = b[offset]; for (int i = 1; i < 8; i++) { @@ -74,6 +80,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#getValue(byte[], int) */ + @Override public long getValue(byte[] b, int size) { return getValue(b, 0, size); } @@ -81,6 +88,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#getValue(byte[], int, int) */ + @Override public long getValue(byte[] b, int offset, int size) { if (size > 8) { throw new IndexOutOfBoundsException("size exceeds sizeof long: " + size); @@ -95,6 +103,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getBytes(short, byte[]) */ + @Override public final void getBytes(short value, byte[] b) { getBytes(value, b, 0); } @@ -102,6 +111,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getBytes(short, byte[], int) */ + @Override public void getBytes(short value, byte[] b, int offset) { b[offset] = (byte) (value >> 8); b[offset + 1] = (byte) (value & 0xff); @@ -110,6 +120,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getBytes(int, byte[]) */ + @Override public final void getBytes(int value, byte[] b) { getBytes(value, b, 0); } @@ -117,6 +128,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getBytes(int, byte[], int) */ + @Override public void getBytes(int value, byte[] b, int offset) { b[offset + 3] = (byte) (value); for (int i = 2; i >= 0; i--) { @@ -128,6 +140,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getBytes(long, byte[]) */ + @Override public final void getBytes(long value, byte[] b) { getBytes(value, 8, b, 0); } @@ -135,6 +148,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter#getBytes(long, byte[], int) */ + @Override public void getBytes(long value, byte[] b, int offset) { getBytes(value, 8, b, offset); } @@ -142,6 +156,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#getBytes(long, int, byte[], int) */ + @Override public void getBytes(long value, int size, byte[] b, int offset) { for (int i = size - 1; i >= 0; i--) { b[offset + i] = (byte) value; @@ -152,6 +167,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#putInt(byte[], int, int) */ + @Override public final void putInt(byte[] b, int offset, int value) { getBytes(value, b, offset); } @@ -159,6 +175,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#putInt(byte[], int) */ + @Override public final void putInt(byte[] b, int value) { getBytes(value, b); } @@ -166,6 +183,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#putLong(byte[], int, long) */ + @Override public final void putLong(byte[] b, int offset, long value) { getBytes(value, b, offset); } @@ -173,6 +191,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#putLong(byte[], long) */ + @Override public final void putLong(byte[] b, long value) { getBytes(value, b); } @@ -180,6 +199,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#putShort(byte[], int, short) */ + @Override public final void putShort(byte[] b, int offset, short value) { getBytes(value, b, offset); } @@ -187,6 +207,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#putShort(byte[], short) */ + @Override public final void putShort(byte[] b, short value) { getBytes(value, b); } @@ -194,6 +215,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#getBytes(int) */ + @Override public byte[] getBytes(int value) { byte[] bytes = new byte[4]; getBytes(value, bytes); @@ -203,6 +225,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#getBytes(long) */ + @Override public byte[] getBytes(long value) { byte[] bytes = new byte[8]; getBytes(value, bytes); @@ -212,6 +235,7 @@ public class GDataConverterBE implements GDataConverter { /** * @see GDataConverter.util.DataConverter#getBytes(short) */ + @Override public byte[] getBytes(short value) { byte[] bytes = new byte[2]; getBytes(value, bytes); diff --git a/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterLE.java b/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterLE.java index 9c26f6b344..9489ae2534 100644 --- a/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterLE.java +++ b/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterLE.java @@ -23,6 +23,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getShort(byte[]) */ + @Override public final short getShort(byte[] b) { return getShort(b, 0); } @@ -30,6 +31,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getShort(byte[], int) */ + @Override public short getShort(byte[] b, int offset) { return (short) (((b[offset + 1] & 0xff) << 8) | (b[offset] & 0xff)); } @@ -37,6 +39,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getInt(byte[]) */ + @Override public final int getInt(byte[] b) { return getInt(b, 0); } @@ -44,6 +47,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getInt(byte[], int) */ + @Override public int getInt(byte[] b, int offset) { int v = b[offset + 3]; for (int i = 2; i >= 0; i--) { @@ -55,6 +59,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getLong(byte[]) */ + @Override public final long getLong(byte[] b) { return getLong(b, 0); } @@ -62,6 +67,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getLong(byte[], int) */ + @Override public long getLong(byte[] b, int offset) { long v = b[offset + 7]; for (int i = 6; i >= 0; i--) { @@ -73,6 +79,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#getValue(byte[], int) */ + @Override public long getValue(byte[] b, int size) { return getValue(b, 0, size); } @@ -80,6 +87,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#getValue(byte[], int, int) */ + @Override public long getValue(byte[] b, int offset, int size) { if (size > 8) { throw new IndexOutOfBoundsException("size exceeds sizeof long: " + size); @@ -94,6 +102,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getBytes(short, byte[]) */ + @Override public final void getBytes(short value, byte[] b) { getBytes(value, b, 0); } @@ -101,6 +110,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getBytes(short, byte[], int) */ + @Override public void getBytes(short value, byte[] b, int offset) { b[offset + 1] = (byte) (value >> 8); b[offset] = (byte) (value & 0xff); @@ -109,6 +119,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getBytes(int, byte[]) */ + @Override public final void getBytes(int value, byte[] b) { getBytes(value, b, 0); } @@ -116,6 +127,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getBytes(int, byte[], int) */ + @Override public void getBytes(int value, byte[] b, int offset) { b[offset] = (byte) (value); for (int i = 1; i < 4; i++) { @@ -127,6 +139,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getBytes(long, byte[]) */ + @Override public final void getBytes(long value, byte[] b) { getBytes(value, 8, b, 0); } @@ -134,6 +147,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see GDataConverter#getBytes(long, byte[], int) */ + @Override public void getBytes(long value, byte[] b, int offset) { getBytes(value, 8, b, offset); } @@ -141,6 +155,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#getBytes(long, int, byte[], int) */ + @Override public void getBytes(long value, int size, byte[] b, int offset) { for (int i = 0; i < size; i++) { b[offset + i] = (byte) value; @@ -151,6 +166,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#putInt(byte[], int, int) */ + @Override public final void putInt(byte[] b, int offset, int value) { getBytes(value, b, offset); } @@ -158,6 +174,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#putInt(byte[], int) */ + @Override public final void putInt(byte[] b, int value) { getBytes(value, b); } @@ -165,6 +182,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#putLong(byte[], int, long) */ + @Override public final void putLong(byte[] b, int offset, long value) { getBytes(value, b, offset); } @@ -172,6 +190,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#putLong(byte[], long) */ + @Override public final void putLong(byte[] b, long value) { getBytes(value, b); } @@ -179,6 +198,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#putShort(byte[], int, short) */ + @Override public final void putShort(byte[] b, int offset, short value) { getBytes(value, b, offset); } @@ -186,6 +206,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#putShort(byte[], short) */ + @Override public final void putShort(byte[] b, short value) { getBytes(value, b); } @@ -193,6 +214,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#getBytes(int) */ + @Override public byte[] getBytes(int value) { byte[] bytes = new byte[4]; getBytes(value, bytes); @@ -202,6 +224,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#getBytes(long) */ + @Override public byte[] getBytes(long value) { byte[] bytes = new byte[8]; getBytes(value, bytes); @@ -211,6 +234,7 @@ public class GDataConverterLE implements GDataConverter { /** * @see ghidra.util.GDataConverter#getBytes(short) */ + @Override public byte[] getBytes(short value) { byte[] bytes = new byte[2]; getBytes(value, bytes); diff --git a/Ghidra/Debug/Debugger-isf/src/main/java/ghidra/program/model/data/ISF/AbstractIsfWriter.java b/Ghidra/Debug/Debugger-isf/src/main/java/ghidra/program/model/data/ISF/AbstractIsfWriter.java index 00286cd8a9..0680c64195 100644 --- a/Ghidra/Debug/Debugger-isf/src/main/java/ghidra/program/model/data/ISF/AbstractIsfWriter.java +++ b/Ghidra/Debug/Debugger-isf/src/main/java/ghidra/program/model/data/ISF/AbstractIsfWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -98,6 +98,7 @@ public abstract class AbstractIsfWriter implements Closeable { gson.toJson(object, writer); } + @Override public void close() throws IOException { if (writer != null) { writer.flush(); diff --git a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/memory/TraceObjectMemoryRegion.java b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/memory/TraceObjectMemoryRegion.java index 447df47de7..62695177a7 100644 --- a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/memory/TraceObjectMemoryRegion.java +++ b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/memory/TraceObjectMemoryRegion.java @@ -49,10 +49,13 @@ public interface TraceObjectMemoryRegion extends TraceMemoryRegion, TraceObjectI void setRange(Lifespan lifespan, AddressRange range); + @Override AddressRange getRange(long snap); + @Override Address getMinAddress(long snap); + @Override Address getMaxAddress(long snap); void setFlags(Lifespan lifespan, Collection flags); @@ -61,5 +64,6 @@ public interface TraceObjectMemoryRegion extends TraceMemoryRegion, TraceObjectI void clearFlags(Lifespan lifespan, Collection flags); + @Override Set getFlags(long snap); } diff --git a/Ghidra/Debug/ProposedUtils/src/main/java/ghidra/util/database/spatial/rect/Rectangle2D.java b/Ghidra/Debug/ProposedUtils/src/main/java/ghidra/util/database/spatial/rect/Rectangle2D.java index c201ed4b07..2311bf5c4a 100644 --- a/Ghidra/Debug/ProposedUtils/src/main/java/ghidra/util/database/spatial/rect/Rectangle2D.java +++ b/Ghidra/Debug/ProposedUtils/src/main/java/ghidra/util/database/spatial/rect/Rectangle2D.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -186,6 +186,7 @@ public interface Rectangle2D> extends Bound * @param shape the other (presumably-inner) rectangle * @return true if this rectangle encloses the other */ + @Override default boolean encloses(R shape) { return encloses(this, shape); } diff --git a/Ghidra/Extensions/sample/src/main/java/ghidra/examples/graph/layout/SampleGraphLayoutProvider.java b/Ghidra/Extensions/sample/src/main/java/ghidra/examples/graph/layout/SampleGraphLayoutProvider.java index 9e09fefab3..6b39461813 100644 --- a/Ghidra/Extensions/sample/src/main/java/ghidra/examples/graph/layout/SampleGraphLayoutProvider.java +++ b/Ghidra/Extensions/sample/src/main/java/ghidra/examples/graph/layout/SampleGraphLayoutProvider.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,6 +40,7 @@ public abstract class SampleGraphLayoutProvider public abstract VisualGraphLayout getLayout(SampleGraph g, TaskMonitor monitor) throws CancelledException; + @Override protected void initVertexLocations(SampleGraph g, Layout layout) { Collection vertices = g.getVertices(); for (SampleVertex v : vertices) { diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/filters/MultiChoiceBSimValueEditor.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/filters/MultiChoiceBSimValueEditor.java index 8071100c28..94cbff7f13 100644 --- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/filters/MultiChoiceBSimValueEditor.java +++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/filters/MultiChoiceBSimValueEditor.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -145,6 +145,7 @@ public class MultiChoiceBSimValueEditor implements BSimValueEditor { return component; } + @Override public boolean hasValidValues() { return isValid; } diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/filters/StringBSimValueEditor.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/filters/StringBSimValueEditor.java index 27e3db21f5..ee2263c8c4 100644 --- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/filters/StringBSimValueEditor.java +++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/filters/StringBSimValueEditor.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -105,6 +105,7 @@ public class StringBSimValueEditor implements BSimValueEditor { return textField; } + @Override public boolean hasValidValues() { return isValid; } diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/BSimSearchDialog.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/BSimSearchDialog.java index 9b9318638e..ed17da28f2 100644 --- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/BSimSearchDialog.java +++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/BSimSearchDialog.java @@ -93,6 +93,7 @@ public class BSimSearchDialog extends AbstractBSimSearchDialog { } } + @Override protected JPanel buildServerPanel() { JPanel panel = super.buildServerPanel(); panel.add(new JLabel("Function(s): ")); @@ -100,6 +101,7 @@ public class BSimSearchDialog extends AbstractBSimSearchDialog { return panel; } + @Override protected JPanel buildCenterPanel() { filterPanel = new BSimFilterPanel(this::filterPanelChanged); return createTitledPanel("Filters:", filterPanel, true); diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/IDElasticResolution.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/IDElasticResolution.java index c8961c9e5a..3469da961a 100755 --- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/IDElasticResolution.java +++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/IDElasticResolution.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,6 +32,7 @@ public abstract class IDElasticResolution { idString = null; } + @Override public void resolve(ElasticDatabase database,ExecutableRecord exe) throws ElasticException { if (idString == null) idString = database.recoverExternalFunctionId(exeName, funcName, exe.getArchitecture()); diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/AdjustVectorIndex.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/AdjustVectorIndex.java index 85ef646bcd..497c4414fa 100755 --- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/AdjustVectorIndex.java +++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/AdjustVectorIndex.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,6 +41,7 @@ public class AdjustVectorIndex extends BSimQuery { /* (non-Javadoc) * @see ghidra.query.protocol.QueryResponseRecord#buildResponseTemplate() */ + @Override public void buildResponseTemplate() { if (response == null) response = adjustresponse = new ResponseAdjustIndex(); diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/ChildAtom.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/ChildAtom.java index dc1c592062..5d2b170b69 100755 --- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/ChildAtom.java +++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/ChildAtom.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,6 +27,7 @@ public class ChildAtom extends FilterAtom { public String name = null; // Name of the child function public String exename = null; // Name of the executable (or library) containing the child (or null) + @Override public void saveXml(Writer fwrite) throws IOException { fwrite.append(" bookmarkIter = prog.getBookmarkManager().getBookmarksIterator("Error"); int count = 0; diff --git a/Ghidra/Features/Base/ghidra_scripts/TurnOffStackAnalysis.java b/Ghidra/Features/Base/ghidra_scripts/TurnOffStackAnalysis.java index 8d31a0b4d1..888da99dad 100644 --- a/Ghidra/Features/Base/ghidra_scripts/TurnOffStackAnalysis.java +++ b/Ghidra/Features/Base/ghidra_scripts/TurnOffStackAnalysis.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,6 +23,7 @@ import ghidra.app.script.GhidraScript; public class TurnOffStackAnalysis extends GhidraScript { + @Override public void run() throws Exception { setAnalysisOption(currentProgram, "Stack", "false"); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/analyzers/AbstractBinaryFormatAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/analyzers/AbstractBinaryFormatAnalyzer.java index 5aca55a3d0..70c449bfd6 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/analyzers/AbstractBinaryFormatAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/analyzers/AbstractBinaryFormatAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,6 +32,7 @@ public abstract class AbstractBinaryFormatAnalyzer extends AbstractAnalyzer { this.command = command; } + @Override final public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException { @@ -48,10 +49,12 @@ public abstract class AbstractBinaryFormatAnalyzer extends AbstractAnalyzer { return false; } + @Override final public boolean canAnalyze(Program program) { return command.canApply(program); } + @Override final public boolean getDefaultEnablement(Program program) { return command.canApply(program); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/memory/MoveBlockTask.java b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/memory/MoveBlockTask.java index b19732b2ef..fc6837096e 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/memory/MoveBlockTask.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/memory/MoveBlockTask.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -101,6 +101,7 @@ public class MoveBlockTask extends ProgramTask { throw new RollbackException(statusMessage, cause); } + @Override public boolean isCancelled() { return cancelled; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/UserDefinedPropertyMerger.java b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/UserDefinedPropertyMerger.java index c33250c266..2dc0ea44d8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/UserDefinedPropertyMerger.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/UserDefinedPropertyMerger.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -406,6 +406,7 @@ class UserDefinedPropertyMerger extends AbstractListingMerger { this.currentAddress = addr; try { final ChangeListener changeListener = new ChangeListener() { + @Override public void stateChanged(ChangeEvent e) { conflictOption = conflictPanel.getSelectedOptions(); if (conflictOption == ASK_USER) { @@ -425,12 +426,14 @@ class UserDefinedPropertyMerger extends AbstractListingMerger { } }; SwingUtilities.invokeAndWait(new Runnable() { + @Override public void run() { setupConflictsPanel(listingPanel, UserDefinedPropertyMerger.this.propertyName, UserDefinedPropertyMerger.this.currentAddress, changeListener); } }); SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { listingPanel.clearAllBackgrounds(); listingPanel.paintAllBackgrounds(new AddressSet(addr, addr)); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/propertylist/PropertyListMergeManager.java b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/propertylist/PropertyListMergeManager.java index 76dc92eec8..96272f4482 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/propertylist/PropertyListMergeManager.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/propertylist/PropertyListMergeManager.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -86,6 +86,7 @@ public class PropertyListMergeManager implements MergeResolver { /* (non-Javadoc) * @see ghidra.app.merge.MergeResolver#apply() */ + @Override public void apply() { conflictOption = mergePanel.getSelectedOption(); @@ -99,6 +100,7 @@ public class PropertyListMergeManager implements MergeResolver { /* (non-Javadoc) * @see ghidra.app.merge.MergeResolver#cancel() */ + @Override public void cancel() { conflictOption = CANCELED; } @@ -106,6 +108,7 @@ public class PropertyListMergeManager implements MergeResolver { /* (non-Javadoc) * @see ghidra.app.merge.MergeResolver#getDescription() */ + @Override public String getDescription() { return "Merge Property Lists"; } @@ -113,6 +116,7 @@ public class PropertyListMergeManager implements MergeResolver { /* (non-Javadoc) * @see ghidra.app.merge.MergeResolver#getName() */ + @Override public String getName() { return "Property List Merger"; } @@ -120,6 +124,7 @@ public class PropertyListMergeManager implements MergeResolver { /* (non-Javadoc) * @see ghidra.app.merge.MergeResolver#merge(ghidra.util.task.TaskMonitor) */ + @Override public void merge(TaskMonitor monitor) { mergeManager.setInProgress(PROPERTY_LIST_PHASE); @@ -457,6 +462,7 @@ public class PropertyListMergeManager implements MergeResolver { final int totalNumConflicts) { try { SwingUtilities.invokeAndWait(new Runnable() { + @Override public void run() { if (mergePanel == null) { mergePanel = new PropertyListMergePanel(mergeManager, totalNumConflicts); @@ -478,6 +484,7 @@ public class PropertyListMergeManager implements MergeResolver { // and continue. } + @Override public String[][] getPhases() { return new String[][] { PROPERTY_LIST_PHASE }; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/propertylist/PropertyListMergePanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/propertylist/PropertyListMergePanel.java index 16f140e522..93fea16e99 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/propertylist/PropertyListMergePanel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/propertylist/PropertyListMergePanel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -79,6 +78,7 @@ class PropertyListMergePanel extends JPanel { private ConflictPanel createConflictPanel() { ChangeListener changeListener = new ChangeListener() { + @Override public void stateChanged(ChangeEvent e) { mergeManager.clearStatusText(); mergeManager.setApplyEnabled(true); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/algorithmtree/ModuleAlgorithmPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/algorithmtree/ModuleAlgorithmPlugin.java index 341fdf8461..1de5db3cb6 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/algorithmtree/ModuleAlgorithmPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/algorithmtree/ModuleAlgorithmPlugin.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -187,6 +187,7 @@ public class ModuleAlgorithmPlugin extends ProgramPlugin implements BlockModelSe /** * @see ghidra.app.services.BlockModelServiceListener#modelAdded(java.lang.String, int) */ + @Override public void modelAdded(String modeName, int modelType) { if (modelType == BlockModelService.SUBROUTINE_MODEL) { updateSubroutineActions(); @@ -196,6 +197,7 @@ public class ModuleAlgorithmPlugin extends ProgramPlugin implements BlockModelSe /** * @see ghidra.app.services.BlockModelServiceListener#modelRemoved(java.lang.String, int) */ + @Override public void modelRemoved(String modeName, int modelType) { if (modelType == BlockModelService.SUBROUTINE_MODEL) { updateSubroutineActions(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisTaskList.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisTaskList.java index 56516ad465..f4cade2c04 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisTaskList.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisTaskList.java @@ -34,6 +34,7 @@ public class AnalysisTaskList { private static Comparator priorityComparator = new Comparator() { + @Override public int compare(AnalysisScheduler as1, AnalysisScheduler as2) { Analyzer a1 = as1.getAnalyzer(); Analyzer a2 = as2.getAnalyzer(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ConstantPropagationAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ConstantPropagationAnalyzer.java index 59e90d3a98..34619deed2 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ConstantPropagationAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ConstantPropagationAnalyzer.java @@ -449,6 +449,7 @@ public class ConstantPropagationAnalyzer extends AbstractAnalyzer { * @return - set of addresses actually flowed to * @throws CancelledException */ + @Override public AddressSetView analyzeLocation(final Program program, Address start, AddressSetView set, final TaskMonitor monitor) throws CancelledException { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ObjectiveC2_MessageAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ObjectiveC2_MessageAnalyzer.java index bfbc6d9060..80daa09044 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ObjectiveC2_MessageAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ObjectiveC2_MessageAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,6 +44,7 @@ public class ObjectiveC2_MessageAnalyzer extends AbstractAnalyzer { setPriority(AnalysisPriority.FORMAT_ANALYSIS.after()); } + @Override public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException { AddressIterator iterator = set.getAddresses(true); @@ -63,6 +64,7 @@ public class ObjectiveC2_MessageAnalyzer extends AbstractAnalyzer { return true; } + @Override public boolean canAnalyze(Program program) { return ObjectiveC2_Constants.isObjectiveC2(program); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/UpdateAlignmentAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/UpdateAlignmentAction.java index c15dcdb7f9..8900d2d78b 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/UpdateAlignmentAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/UpdateAlignmentAction.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,10 +55,12 @@ public class UpdateAlignmentAction extends ToggleDockingAction implements Addres } } + @Override public void alignmentChanged() { setSelected(model.getAlignment() == alignment); } + @Override public void alignmentPermissionChanged() { setSelected(model.getAlignment() == alignment); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/validator/PostAnalysisValidator.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/validator/PostAnalysisValidator.java index 87d9e4c61b..aa92865bbd 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/validator/PostAnalysisValidator.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/validator/PostAnalysisValidator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,6 +32,7 @@ public abstract class PostAnalysisValidator implements ConditionTester, Extensio return program; } + @Override public final ConditionResult run(TaskMonitor monitor) throws CancelledException { if (!program.addConsumer(this)) { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/console/CodeCompletion.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/console/CodeCompletion.java index 7c83260bbf..725e8f307a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/console/CodeCompletion.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/console/CodeCompletion.java @@ -134,6 +134,7 @@ public class CodeCompletion implements Comparable { return "CodeCompletion: '" + getDescription() + "' (" + getInsertion() + ")"; } + @Override public int compareTo(CodeCompletion that) { return this.description.compareToIgnoreCase(that.description); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/DataSettingsDialog.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/DataSettingsDialog.java index 73cc281286..f07ef4e1a6 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/DataSettingsDialog.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/DataSettingsDialog.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -356,6 +356,7 @@ public class DataSettingsDialog extends AbstractSettingsDialog { return settingsDefinition.getSuggestedValues(sampleSelectionSettings); } + @Override protected void applySettings() throws CancelledException { int txId = program.startTransaction(getTitle()); try { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/RenameDataFieldDialog.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/RenameDataFieldDialog.java index 54f62ba36b..27283c0b2b 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/RenameDataFieldDialog.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/RenameDataFieldDialog.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -89,6 +89,7 @@ class RenameDataFieldDialog extends DialogComponentProvider { setFocusComponent(recentChoices); recentChoices.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { okCallback(); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/CopyAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/CopyAction.java index 9423d52050..d04959c781 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/CopyAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/CopyAction.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -115,6 +114,7 @@ public class CopyAction extends DockingAction { Transferable contents = new GTreeNodeTransferable(dragNDropHandler, list); clipboard.setContents(contents, new ClipboardOwner() { + @Override public void lostOwnership(Clipboard currentClipboard, Transferable transferable) { // we don't care } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/tree/CenterVerticalIcon.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/tree/CenterVerticalIcon.java index 28fb5435d7..71236bbec7 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/tree/CenterVerticalIcon.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/tree/CenterVerticalIcon.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,14 +31,17 @@ public class CenterVerticalIcon implements Icon { verticalOffset = (height - icon.getIconHeight()) / 2; } + @Override public int getIconHeight() { return height; } + @Override public int getIconWidth() { return icon.getIconWidth(); } + @Override public void paintIcon(Component c, Graphics g, int x, int y) { icon.paintIcon(c, g, x, y + verticalOffset); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataDropOnBrowserHandler.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataDropOnBrowserHandler.java index c9409551fe..2fb377a75d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataDropOnBrowserHandler.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataDropOnBrowserHandler.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,10 +42,12 @@ public class DataDropOnBrowserHandler implements ProgramDropProvider { this.plugin = plugin; } + @Override public int getPriority() { return 20; } + @Override public DataFlavor[] getDataFlavors() { return ACCEPTABLE_FLAVORS; } @@ -53,6 +55,7 @@ public class DataDropOnBrowserHandler implements ProgramDropProvider { /** * @see ghidra.app.util.ProgramDropProvider#isDropOk(java.lang.Object, java.awt.dnd.DropTargetDragEvent) */ + @Override public boolean isDropOk(Object contextObj, DropTargetDragEvent evt) { curService = null; @@ -74,6 +77,7 @@ public class DataDropOnBrowserHandler implements ProgramDropProvider { return false; } + @Override public void add(Object contextObj, Object data, DataFlavor flavor) { if (curService != null) { DataType dt = (DataType)data; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datapreview/DataTypeComponentPreview.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datapreview/DataTypeComponentPreview.java index 3bcedcdcf3..8961e1b612 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datapreview/DataTypeComponentPreview.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datapreview/DataTypeComponentPreview.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -51,7 +51,8 @@ class DataTypeComponentPreview implements Preview { this.parentPreview = parent; } - public String getName() { + @Override + public String getName() { String fieldName = dtc.getFieldName(); if (fieldName == null) { fieldName = dtc.getDefaultFieldName(); @@ -62,7 +63,8 @@ class DataTypeComponentPreview implements Preview { return parentPreview.getName()+"."+fieldName; } - public String getPreview(Memory memory, Address addr) { + @Override + public String getPreview(Memory memory, Address addr) { try { if (parentPreview != null) { addr = addr.add(parentPreview.dtc.getOffset()); @@ -77,6 +79,7 @@ class DataTypeComponentPreview implements Preview { } } + @Override public DataType getDataType() { if (parentPreview != null) { return parentPreview.getDataType(); @@ -89,7 +92,8 @@ class DataTypeComponentPreview implements Preview { return getName(); } - public int compareTo(Preview p) { + @Override + public int compareTo(Preview p) { if (p instanceof DataTypeComponentPreview) { DataTypeComponentPreview that = (DataTypeComponentPreview)p; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/fallthrough/FallThroughModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/fallthrough/FallThroughModel.java index c0ec32641b..43e5022fd4 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/fallthrough/FallThroughModel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/fallthrough/FallThroughModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -256,6 +255,7 @@ class FallThroughModel implements ChangeListener { } } + @Override public void stateChanged(ChangeEvent e) { // do nothing - just a placeholder so that we don't have to check for null listener } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/ExternalEntryFunctionAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/ExternalEntryFunctionAnalyzer.java index 27cf96a020..fde198cad5 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/ExternalEntryFunctionAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/ExternalEntryFunctionAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,6 +38,7 @@ public class ExternalEntryFunctionAnalyzer extends AbstractAnalyzer { * Called when a function has been added. * Looks at address for call reference */ + @Override public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) { AddressSet funcStarts = new AddressSet(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/GroupTransferable.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/GroupTransferable.java index 14cfb45ce2..b31b12becc 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/GroupTransferable.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/GroupTransferable.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -68,21 +67,24 @@ public class GroupTransferable implements Transferable { /** * Return all data flavors that this class supports. */ - public synchronized DataFlavor []getTransferDataFlavors() { + @Override + public synchronized DataFlavor []getTransferDataFlavors() { return flavors; } /** * Return whether the specified data flavor is supported. */ - public boolean isDataFlavorSupported(DataFlavor f) { + @Override + public boolean isDataFlavorSupported(DataFlavor f) { return flavorList.contains(f); } /** * Return the transfer data with the given data flavor. */ - public synchronized Object getTransferData(DataFlavor f) + @Override + public synchronized Object getTransferData(DataFlavor f) throws UnsupportedFlavorException, IOException { if (f.equals(localGroupFlavor)) { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencePanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencePanel.java index 7861d42086..3179771ff2 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencePanel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencePanel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -91,6 +90,7 @@ abstract class EditReferencePanel extends JPanel { @Override public void requestFocus() { SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager(); kfm.focusNextComponent(EditReferencePanel.this); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackEditorManagerPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackEditorManagerPlugin.java index e45b7ca005..641c4db99b 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackEditorManagerPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackEditorManagerPlugin.java @@ -128,6 +128,7 @@ public class StackEditorManagerPlugin extends Plugin return editorMgr.canCloseDomainObject(dObj); } + @Override public void optionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue) { setOptions(options); @@ -155,6 +156,7 @@ public class StackEditorManagerPlugin extends Plugin options.setBoolean(HEX_NUMBERS_OPTION_NAME, showNumbersInHex); } + @Override public boolean showStackNumbersInHex() { return showNumbersInHex; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/debug/propertymanager/PropertyManagerTableModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/debug/propertymanager/PropertyManagerTableModel.java index 1ca2627918..96210ade3a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/debug/propertymanager/PropertyManagerTableModel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/debug/propertymanager/PropertyManagerTableModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -70,6 +69,7 @@ class PropertyManagerTableModel extends AbstractTableModel { /* * @see javax.swing.table.TableModel#getColumnCount() */ + @Override public int getColumnCount() { return 1; } @@ -77,6 +77,7 @@ class PropertyManagerTableModel extends AbstractTableModel { /* * @see javax.swing.table.TableModel#getRowCount() */ + @Override public synchronized int getRowCount() { if (propertyNames != null) { return propertyNames.length; @@ -95,6 +96,7 @@ class PropertyManagerTableModel extends AbstractTableModel { /* * @see javax.swing.table.TableModel#getValueAt(int, int) */ + @Override public synchronized Object getValueAt(int rowIndex, int columnIndex) { if (propertyNames != null && rowIndex < propertyNames.length) { return propertyNames[rowIndex]; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/match/Match.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/match/Match.java index 0e1be75031..380a0e4638 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/match/Match.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/match/Match.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -226,6 +226,7 @@ public class Match implements Comparable /* (non-Javadoc) * @see java.lang.Comparable#compareTo(java.lang.Object) */ + @Override public int compareTo(Match m) { int val = getThisBeginning().compareTo( m.getThisBeginning() ); if( val != 0 ) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/services/AnalyzerAdapter.java b/Ghidra/Features/Base/src/main/java/ghidra/app/services/AnalyzerAdapter.java index 92816334b9..eb96593778 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/services/AnalyzerAdapter.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/services/AnalyzerAdapter.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,11 +28,13 @@ public abstract class AnalyzerAdapter extends AbstractAnalyzer { setPriority(priority); } + @Override public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException { return false; } + @Override public boolean getDefaultEnablement(Program program) { return false; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/CodeUnitInfoTransferable.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/CodeUnitInfoTransferable.java index 3113ee1e02..afc19f627b 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/CodeUnitInfoTransferable.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/CodeUnitInfoTransferable.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -66,6 +65,7 @@ public class CodeUnitInfoTransferable implements Transferable, ClipboardOwner { /** * Return all data flavors that this class supports. */ + @Override public synchronized DataFlavor[] getTransferDataFlavors() { return flavors; } @@ -73,6 +73,7 @@ public class CodeUnitInfoTransferable implements Transferable, ClipboardOwner { /** * Return whether the specified data flavor is supported. */ + @Override public boolean isDataFlavorSupported(DataFlavor f) { return flavorList.contains(f); } @@ -80,6 +81,7 @@ public class CodeUnitInfoTransferable implements Transferable, ClipboardOwner { /** * Return the transfer data with the given data flavor. */ + @Override public synchronized Object getTransferData(DataFlavor f) throws UnsupportedFlavorException, IOException { @@ -101,6 +103,7 @@ public class CodeUnitInfoTransferable implements Transferable, ClipboardOwner { * (non-Javadoc) * @see java.awt.datatransfer.ClipboardOwner#lostOwnership(java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable) */ + @Override public void lostOwnership(Clipboard clipboard, Transferable contents) { } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/AoutHeader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/AoutHeader.java index 5f1c22bc90..b99304d776 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/AoutHeader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/AoutHeader.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,6 +76,7 @@ public class AoutHeader implements StructConverter { return data_start; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(AoutHeader.class); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffLineNumber.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffLineNumber.java index 9f5d36e3de..8b0cbf92a5 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffLineNumber.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffLineNumber.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,6 +44,7 @@ public class CoffLineNumber implements StructConverter { return l_lnno; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(CoffLineNumber.class); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffRelocation.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffRelocation.java index 4971b636a2..db9bb3fcaf 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffRelocation.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffRelocation.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -89,6 +89,7 @@ public class CoffRelocation implements StructConverter { return r_type; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(StructConverterUtil.parseName(CoffRelocation.class), 0); struct.add(DWORD, "r_vaddr", null); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxArray.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxArray.java index af12322318..5e5ef8c348 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxArray.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,6 +76,7 @@ public class CoffSymbolAuxArray implements CoffSymbolAux { return unused; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxBeginningOfBlock.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxBeginningOfBlock.java index 0e5508687f..a3862d1c12 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxBeginningOfBlock.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxBeginningOfBlock.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -58,6 +58,7 @@ public class CoffSymbolAuxBeginningOfBlock implements CoffSymbolAux { return unused3; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxDefault.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxDefault.java index f15761f234..30586684a7 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxDefault.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxDefault.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,6 +34,7 @@ class CoffSymbolAuxDefault implements CoffSymbolAux { return bytes; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxEndOfBlock.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxEndOfBlock.java index 9d33401651..f04a51e5e9 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxEndOfBlock.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxEndOfBlock.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -47,6 +46,7 @@ public class CoffSymbolAuxEndOfBlock implements CoffSymbolAux { return unused2; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxEndOfStruct.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxEndOfStruct.java index db00e61ca5..a4eba72fe6 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxEndOfStruct.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxEndOfStruct.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +52,7 @@ public class CoffSymbolAuxEndOfStruct implements CoffSymbolAux { return unused2; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxFilename.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxFilename.java index f9979f11bd..1310200e50 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxFilename.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxFilename.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,6 +40,7 @@ public class CoffSymbolAuxFilename implements CoffSymbolAux { return unused; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxFunction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxFunction.java index 31c3dda098..6083423d80 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxFunction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxFunction.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,6 +58,7 @@ public class CoffSymbolAuxFunction implements CoffSymbolAux { return unused; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxName.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxName.java index 9dbe2b928b..a4cc2d832a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxName.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxName.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +52,7 @@ public class CoffSymbolAuxName implements CoffSymbolAux { return unused2; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxSection.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxSection.java index 441b381a3e..67bd7ab934 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxSection.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxSection.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +52,7 @@ public class CoffSymbolAuxSection implements CoffSymbolAux { return unused; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxTagName.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxTagName.java index f9bac67a3e..985f3340f7 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxTagName.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/CoffSymbolAuxTagName.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,6 +58,7 @@ public class CoffSymbolAuxTagName implements CoffSymbolAux { return unused3; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/archive/SecondLinkerMember.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/archive/SecondLinkerMember.java index 1ad17997e3..fd559e01ae 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/archive/SecondLinkerMember.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/archive/SecondLinkerMember.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -112,6 +112,7 @@ public final class SecondLinkerMember implements StructConverter { return new ArrayList(stringTable); } + @Override public DataType toDataType() throws DuplicateNameException, IOException { String name = StructConverterUtil.parseName(SecondLinkerMember.class); String uniqueName = name + "_" + numberOfMembers + "_" + numberOfSymbols; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/expression/DWARFExpressionException.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/expression/DWARFExpressionException.java index ada4392161..387c705820 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/expression/DWARFExpressionException.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/expression/DWARFExpressionException.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -70,6 +70,7 @@ public class DWARFExpressionException extends Exception { return step; } + @Override public String getMessage() { return super.getMessage() + (expr != null ? "\n" + expr.toString(step, false, false) : ""); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerdaux.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerdaux.java index c05d7d58ef..a80114a6a0 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerdaux.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerdaux.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -58,7 +57,8 @@ public class GnuVerdaux implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ - public DataType toDataType() throws DuplicateNameException, IOException { + @Override + public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType("Elf_Verdaux", 0); struct.add(DWORD, "vna_name", "Version or dependency names"); struct.add(DWORD, "vna_next", "Offset in bytes to next verdaux entry"); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerdef.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerdef.java index 97a21a1454..d51029290c 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerdef.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerdef.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -93,7 +92,8 @@ public class GnuVerdef implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ - public DataType toDataType() throws DuplicateNameException, IOException { + @Override + public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType("Elf_Verdef", 0); struct.add( WORD, "vd_version", "Version revision"); struct.add( WORD, "vd_flags", "Version information"); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVernaux.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVernaux.java index a7bb25d0e4..feebdf4d81 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVernaux.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVernaux.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -79,7 +78,8 @@ public class GnuVernaux implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ - public DataType toDataType() throws DuplicateNameException, IOException { + @Override + public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType("Elf_Verdef", 0); struct.add(DWORD, "vna_hash", "Hash value of dependency name"); struct.add( WORD, "vna_flags", "Dependency specific information"); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerneed.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerneed.java index ade364d024..07a3afdef3 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerneed.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/GnuVerneed.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -79,7 +78,8 @@ public class GnuVerneed implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ - public DataType toDataType() throws DuplicateNameException, IOException { + @Override + public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType("Elf_Verneed", 0); struct.add( WORD, "vd_version", "Version of structure"); struct.add( WORD, "vd_cnt", "Number of associated aux entries"); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/types/GoMethod.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/types/GoMethod.java index 9413ca1cf2..f7ce371f3c 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/types/GoMethod.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/types/GoMethod.java @@ -199,6 +199,7 @@ public class GoMethod implements StructureMarkup { return funcAddr.equals(method.getTfn()); } + @Override public String toString() { return type.getMethodPrototypeString(method.getName(), getMethodFuncType()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/asd/AppleSingleDouble.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/asd/AppleSingleDouble.java index 18a1651c62..9af2d2ed05 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/asd/AppleSingleDouble.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/asd/AppleSingleDouble.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,6 +73,7 @@ public class AppleSingleDouble implements StructConverter { return entryList; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { String name = StructConverterUtil.parseName(AppleSingleDouble.class); Structure struct = new StructureDataType(name, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/asd/EntryDescriptor.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/asd/EntryDescriptor.java index 3db8e35683..1690c64935 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/asd/EntryDescriptor.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/asd/EntryDescriptor.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -73,6 +73,7 @@ public class EntryDescriptor implements StructConverter { return _entry; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(EntryDescriptor.class); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragResource.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragResource.java index d84d7f9aeb..ed3a81cb66 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragResource.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragResource.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -75,6 +74,7 @@ public class CFragResource implements StructConverter { return _members; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(CFragResource.class); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragResourceMember.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragResourceMember.java index 6dbf9aa41f..4d51ab3ecf 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragResourceMember.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragResourceMember.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -131,6 +130,7 @@ public class CFragResourceMember implements StructConverter { return name; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { String structName = StructConverterUtil.parseName(CFragResourceMember.class); Structure struct = new StructureDataType(structName, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragUsage1Union.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragUsage1Union.java index f60e09bf1d..0c04361a6d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragUsage1Union.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragUsage1Union.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,6 +39,7 @@ public class CFragUsage1Union implements StructConverter { return appStackSize; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(getClass()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragUsage2Union.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragUsage2Union.java index 97002d53a8..575c35407d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragUsage2Union.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragUsage2Union.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,6 +34,7 @@ public class CFragUsage2Union implements StructConverter { return appSubdirID; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(getClass()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragWhere1Union.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragWhere1Union.java index 01885d134e..446a7382d2 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragWhere1Union.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragWhere1Union.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,6 +32,7 @@ public class CFragWhere1Union implements StructConverter { return spaceID; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(getClass()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragWhere2Union.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragWhere2Union.java index 5edd72f6b5..980e39bab5 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragWhere2Union.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/cfm/CFragWhere2Union.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,6 +33,7 @@ public class CFragWhere2Union implements StructConverter { return reserved; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(getClass()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ReferenceListEntry.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ReferenceListEntry.java index 5572db5a0b..25285647b9 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ReferenceListEntry.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ReferenceListEntry.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -98,6 +97,7 @@ public class ReferenceListEntry implements StructConverter { return handle; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { String name = StructConverterUtil.parseName(ReferenceListEntry.class); Structure struct = new StructureDataType(name, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ResourceHeader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ResourceHeader.java index 329a6ce019..80630c56b5 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ResourceHeader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ResourceHeader.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -102,6 +101,7 @@ public class ResourceHeader extends Entry implements StructConverter { return _map; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(ResourceHeader.class); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ResourceType.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ResourceType.java index 4d942bdfa7..6bb48d2ddf 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ResourceType.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macos/rm/ResourceType.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -100,6 +99,7 @@ public class ResourceType implements StructConverter { return _referenceList; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { String name = StructConverterUtil.parseName(ResourceType.class); Structure struct = new StructureDataType(name, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Cache.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Cache.java index 6b562b9173..f35f63fe13 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Cache.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Cache.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,6 +43,7 @@ public class ObjectiveC2_Cache implements StructConverter { return cache; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { if (_state.is32bit) { return new TypedefDataType("Cache", DWORD); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Category.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Category.java index f7dc4877cb..bc90883ffd 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Category.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Category.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -143,6 +143,7 @@ public class ObjectiveC2_Category implements StructConverter { } } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StringBuffer buffer = new StringBuffer(); buffer.append(NAME); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Class.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Class.java index f51ef59801..f4a8505416 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Class.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Class.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -191,6 +191,7 @@ public class ObjectiveC2_Class implements StructConverter { } } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ClassRW.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ClassRW.java index 2c2c4d48fb..b65bba65b8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ClassRW.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ClassRW.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -161,6 +160,7 @@ public class ObjectiveC2_ClassRW implements StructConverter { } } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ImageInfo.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ImageInfo.java index 4d2b41d570..9b34f0d90a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ImageInfo.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ImageInfo.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -68,6 +67,7 @@ public class ObjectiveC2_ImageInfo implements StructConverter { return _index; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType("objc_image_info", 0); struct.add(DWORD, "version", null); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Implementation.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Implementation.java index 5f487d9005..a390618938 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Implementation.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Implementation.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -63,6 +63,7 @@ public class ObjectiveC2_Implementation implements StructConverter { return _index; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { if (_isSmall) { return new TypedefDataType("ImplementationOffset", DWORD); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_InstanceVariable.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_InstanceVariable.java index e64d819817..7c315ca9e5 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_InstanceVariable.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_InstanceVariable.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -80,6 +79,7 @@ public class ObjectiveC2_InstanceVariable implements StructConverter { return size; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType("ivar_t", 0); if (_state.is32bit) { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_InstanceVariableList.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_InstanceVariableList.java index 6c674377fa..76797560bd 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_InstanceVariableList.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_InstanceVariableList.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,6 +74,7 @@ public class ObjectiveC2_InstanceVariableList implements StructConverter { return struct; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(NAME+'_'+count+'_', 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_MessageReference.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_MessageReference.java index 2c6e16a3d6..ab26fc56d1 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_MessageReference.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_MessageReference.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -61,6 +60,7 @@ public class ObjectiveC2_MessageReference implements StructConverter { return selector; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(NAME, 0); struct.add(new PointerDataType(VOID), _state.pointerSize, "imp", null); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Property.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Property.java index 5fd786d334..48c7475a74 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Property.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Property.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -49,6 +48,7 @@ public class ObjectiveC2_Property implements StructConverter { return attributes; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType("objc_property", 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_PropertyList.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_PropertyList.java index b7940bdae9..99252e67c7 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_PropertyList.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_PropertyList.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -75,6 +75,7 @@ public class ObjectiveC2_PropertyList implements StructConverter { return struct; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(NAME+'_'+count+'_', 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Protocol.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Protocol.java index bd23e9edbf..b84798cdef 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Protocol.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_Protocol.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -181,6 +181,7 @@ public class ObjectiveC2_Protocol implements StructConverter { } } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ProtocolList.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ProtocolList.java index c29dcef40a..913285e6c7 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ProtocolList.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objc2/ObjectiveC2_ProtocolList.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,6 +77,7 @@ public class ObjectiveC2_ProtocolList implements StructConverter { return struct; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(NAME+'_'+protocols.size()+'_', 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Category.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Category.java index 203ea6c8d4..a61c122aae 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Category.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Category.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -82,6 +81,7 @@ public class ObjectiveC1_Category implements StructConverter { return unknown1; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { String name = "objc_category"; StructureDataType struct = new StructureDataType(name, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Class.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Class.java index ff62d28e6f..f270646ffd 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Class.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Class.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -114,6 +114,7 @@ public class ObjectiveC1_Class implements StructConverter { return unknown1; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType(NAME, 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_InstanceVariable.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_InstanceVariable.java index b36c955c73..db6cf0e639 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_InstanceVariable.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_InstanceVariable.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +52,7 @@ public class ObjectiveC1_InstanceVariable implements StructConverter { return offset; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType("objc_ivar", 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_InstanceVariableList.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_InstanceVariableList.java index 84cb0d9dbe..1be33a708c 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_InstanceVariableList.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_InstanceVariableList.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -63,6 +63,7 @@ public class ObjectiveC1_InstanceVariableList implements StructConverter { return struct; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType("objc_ivar_list"+"_"+ivar_count+"_", 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_MetaClass.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_MetaClass.java index 86438408b7..517aa109a1 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_MetaClass.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_MetaClass.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -97,6 +96,7 @@ public class ObjectiveC1_MetaClass implements StructConverter { return unknown1; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { String name = "objc_metaclass"; StructureDataType struct = new StructureDataType(name, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Method.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Method.java index 0e96c63da3..ba77697b8a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Method.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Method.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -49,6 +48,7 @@ public class ObjectiveC1_Method extends ObjectiveC_Method { return address & Conv.INT_MASK; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType("objc_method", 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_MethodList.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_MethodList.java index b922bb1629..511dccf806 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_MethodList.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_MethodList.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -60,6 +60,7 @@ public class ObjectiveC1_MethodList extends ObjectiveC_MethodList { return struct; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType(NAME+"_"+method_count+"_", 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Protocol.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Protocol.java index 62b2d592d1..57633438fd 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Protocol.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Protocol.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -70,6 +69,7 @@ public class ObjectiveC1_Protocol implements StructConverter { return classMethods; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType(NAME, 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolList.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolList.java index 4fdd6d251c..e0fc19abb8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolList.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolList.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -76,6 +76,7 @@ public class ObjectiveC1_ProtocolList implements StructConverter { return struct; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType(NAME+"_"+count+"_", 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolMethod.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolMethod.java index 0469db492f..48f0a583b2 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolMethod.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolMethod.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -54,6 +53,7 @@ public class ObjectiveC1_ProtocolMethod implements StructConverter { return _methodType; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType(NAME, 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolMethodList.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolMethodList.java index a3038af8c0..8fc8454999 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolMethodList.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_ProtocolMethodList.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -64,6 +64,7 @@ public class ObjectiveC1_ProtocolMethodList implements StructConverter { return struct; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType(NAME+"_"+method_count+"_", 0); struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/debug/DebugCodeViewSymbolTable.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/debug/DebugCodeViewSymbolTable.java index 47bbc173e9..e81cd7c802 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/debug/DebugCodeViewSymbolTable.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/debug/DebugCodeViewSymbolTable.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -182,7 +182,8 @@ public class DebugCodeViewSymbolTable implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ - public DataType toDataType() throws DuplicateNameException { + @Override + public DataType toDataType() throws DuplicateNameException { return null; } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/debug/DebugMisc.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/debug/DebugMisc.java index 46d608bbe4..aea4bf97b5 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/debug/DebugMisc.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/debug/DebugMisc.java @@ -162,6 +162,7 @@ public class DebugMisc implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceDataEntry.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceDataEntry.java index 5d08dc844a..1a13b76c4e 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceDataEntry.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceDataEntry.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -80,6 +80,7 @@ public class ResourceDataEntry implements StructConverter { return reserved; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType(NAME, 0); struct.add(DWORD, "OffsetToData", null); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceDirectory.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceDirectory.java index 9987f52453..f608a4afa2 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceDirectory.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceDirectory.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -154,6 +154,7 @@ public class ResourceDirectory implements StructConverter { return minorVersion; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = new StructureDataType(NAME, 0); struct.add(DWORD, "Characteristics", null); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceInfo.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceInfo.java index efe1568b10..d8c72cc8b8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceInfo.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/resource/ResourceInfo.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -93,7 +93,8 @@ public class ResourceInfo implements Comparable { return name+" - 0x"+Integer.toHexString(address); } - public int compareTo(ResourceInfo that) { + @Override + public int compareTo(ResourceInfo that) { return this.typeID - that.typeID; } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ContainerHeader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ContainerHeader.java index cc9891542c..511fab80d8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ContainerHeader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ContainerHeader.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -197,6 +197,7 @@ public class ContainerHeader implements StructConverter { return _loader; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType("ContainerHeader", 0); struct.add(STRING, 4, "tag1", null); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbol.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbol.java index a593ad266d..2b7e8321e6 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbol.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbol.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -89,6 +89,7 @@ public class ExportedSymbol extends AbstractSymbol { return sectionIndex; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(getClass()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbolHashSlot.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbolHashSlot.java index f6bc54f7a9..8be8601c85 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbolHashSlot.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbolHashSlot.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,6 +50,7 @@ public class ExportedSymbolHashSlot implements StructConverter { return indexOfFirstExportKey; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return new TypedefDataType("ExportedSymbolHashSlot", DWORD); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbolKey.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbolKey.java index 056622eeb9..7def5b4b05 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbolKey.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ExportedSymbolKey.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -64,6 +64,7 @@ public class ExportedSymbolKey implements StructConverter { return hashValue; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return new TypedefDataType("ExportedSymbolKey", DWORD); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ImportedLibrary.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ImportedLibrary.java index 3b2e00db92..61300b0926 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ImportedLibrary.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ImportedLibrary.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -161,6 +161,7 @@ public class ImportedLibrary implements StructConverter { return _name; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(getClass()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ImportedSymbol.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ImportedSymbol.java index be35f613a7..11ea322c00 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ImportedSymbol.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/ImportedSymbol.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -67,6 +67,7 @@ public class ImportedSymbol extends AbstractSymbol { return symbolNameOffset; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return new TypedefDataType("ImportedSymbol", DWORD); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/LoaderInfoHeader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/LoaderInfoHeader.java index f2553cd343..adcde9d803 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/LoaderInfoHeader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/LoaderInfoHeader.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -290,6 +290,7 @@ public class LoaderInfoHeader implements StructConverter { return _exportedSymbols; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(getClass()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/PefDebug.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/PefDebug.java index 0e29f36d14..bbc9816680 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/PefDebug.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/PefDebug.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -84,6 +83,7 @@ public class PefDebug implements StructConverter { return true; } + @Override public DataType toDataType() throws DuplicateNameException { String structureName = "PEF_Debug_0x"+Integer.toHexString(nameLength); StructureDataType structure = new StructureDataType(structureName, 0); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/Relocation.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/Relocation.java index 1e8924c69b..84d8552972 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/Relocation.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pef/Relocation.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -70,6 +70,7 @@ public abstract class Relocation implements StructConverter { return 0; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { DataType dt = getSizeInBytes() == 2 ? WORD : DWORD; return new TypedefDataType(toString(), dt); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffFileHeader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffFileHeader.java index 35105c1037..43a8306440 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffFileHeader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffFileHeader.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -123,6 +122,7 @@ public class XCoffFileHeader implements StructConverter { return buffer.toString(); } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(XCoffFileHeader.class); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffOptionalHeader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffOptionalHeader.java index c505a226f1..35b3d60cd8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffOptionalHeader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffOptionalHeader.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -324,6 +324,7 @@ public final class XCoffOptionalHeader implements StructConverter { return o_sntbss; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(XCoffOptionalHeader.class); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffSectionHeader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffSectionHeader.java index 84fef5b7e9..f9552118bd 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffSectionHeader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/xcoff/XCoffSectionHeader.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -73,6 +72,7 @@ public final class XCoffSectionHeader implements StructConverter { return _sizeof; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(XCoffSectionHeader.class); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/exporter/GzfExporter.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/exporter/GzfExporter.java index e8b185bdcd..7ed69e1672 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/exporter/GzfExporter.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/exporter/GzfExporter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,6 +45,7 @@ public class GzfExporter extends Exporter { return canExportDomainObject(domainFile.getDomainObjectClass()); } + @Override public boolean canExportDomainObject(Class domainObjectClass) { return ProgramDB.class.isAssignableFrom(domainObjectClass); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BoundedBufferedReader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BoundedBufferedReader.java index 8b313a929a..9c1732f0be 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BoundedBufferedReader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BoundedBufferedReader.java @@ -130,6 +130,7 @@ public class BoundedBufferedReader extends Reader { * @exception IOException * If an I/O error occurs */ + @Override public int read() throws IOException { synchronized (lock) { ensureOpen(); @@ -239,6 +240,7 @@ public class BoundedBufferedReader extends Reader { * @exception IOException * If an I/O error occurs */ + @Override public int read(char cbuf[], int off, int len) throws IOException { synchronized (lock) { ensureOpen(); @@ -373,6 +375,7 @@ public class BoundedBufferedReader extends Reader { * @exception IOException * If an I/O error occurs */ + @Override public long skip(long n) throws IOException { if (n < 0L) { throw new IllegalArgumentException("skip value is negative"); @@ -412,6 +415,7 @@ public class BoundedBufferedReader extends Reader { * @exception IOException * If an I/O error occurs */ + @Override public boolean ready() throws IOException { synchronized (lock) { ensureOpen(); @@ -441,6 +445,7 @@ public class BoundedBufferedReader extends Reader { /** * Tells whether this stream supports the mark() operation, which it does. */ + @Override public boolean markSupported() { return true; } @@ -462,6 +467,7 @@ public class BoundedBufferedReader extends Reader { * @exception IOException * If an I/O error occurs */ + @Override public void mark(int readAheadLimit) throws IOException { if (readAheadLimit < 0) { throw new IllegalArgumentException("Read-ahead limit < 0"); @@ -481,6 +487,7 @@ public class BoundedBufferedReader extends Reader { * If the stream has never been marked, or if the mark has * been invalidated */ + @Override public void reset() throws IOException { synchronized (lock) { ensureOpen(); @@ -493,6 +500,7 @@ public class BoundedBufferedReader extends Reader { } } + @Override public void close() throws IOException { synchronized (lock) { if (in == null) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/recognizer/RecognizerService.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/recognizer/RecognizerService.java index eb44e338bd..93937ae850 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/recognizer/RecognizerService.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/recognizer/RecognizerService.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,6 +21,7 @@ import java.util.*; public class RecognizerService { private static final Comparator DESCENDING = new Comparator() { + @Override public int compare(Recognizer o1, Recognizer o2) { return o2.getPriority() - o1.getPriority(); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OpenCloseFieldMouseHandler.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OpenCloseFieldMouseHandler.java index 29d9bea07d..4cc0329431 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OpenCloseFieldMouseHandler.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OpenCloseFieldMouseHandler.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,6 +24,7 @@ import java.awt.event.MouseEvent; public class OpenCloseFieldMouseHandler implements FieldMouseHandlerExtension { private final static Class[] SUPPORTED_CLASSES = new Class[] { OpenCloseField.class }; + @Override public boolean fieldElementClicked(Object clickedObject, Navigatable sourceNavigatable, ProgramLocation location, MouseEvent mouseEvent, ServiceProvider serviceProvider) { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/framework/data/GhidraToolState.java b/Ghidra/Features/Base/src/main/java/ghidra/framework/data/GhidraToolState.java index 1266775114..e949a70179 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/framework/data/GhidraToolState.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/framework/data/GhidraToolState.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,7 +39,8 @@ public class GhidraToolState extends ToolState implements NavigatableRemovalList } } - public void navigatableRemoved(Navigatable nav) { + @Override + public void navigatableRemoved(Navigatable nav) { navigatable = null; beforeMemento = null; afterMemento = null; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/state/analysis/MySwitchAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/util/state/analysis/MySwitchAnalyzer.java index 52d038b1fb..741f06203d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/util/state/analysis/MySwitchAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/util/state/analysis/MySwitchAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -276,6 +276,7 @@ System.out.println("Time to build ResultState = " + t + " msec."); return null; } + @Override public void dataReference(PcodeOp op, int instrOpIndex, Varnode storageVarnode, RefType refType, TaskMonitor monitor) throws CancelledException { @@ -283,6 +284,7 @@ System.out.println("Time to build ResultState = " + t + " msec."); } + @Override public void indirectDataReference(PcodeOp op, int instrOpIndex, Varnode offsetVarnode, int size, int storageSpaceID, RefType refType, TaskMonitor monitor) throws CancelledException { @@ -290,6 +292,7 @@ System.out.println("Time to build ResultState = " + t + " msec."); } + @Override public boolean resolvedFlow(PcodeOp op, int instrOpIndex, Address destAddr, ContextState currentState, ResultsState results, TaskMonitor monitor) throws CancelledException { @@ -297,6 +300,7 @@ System.out.println("Time to build ResultState = " + t + " msec."); return false; } + @Override public void stackReference(PcodeOp op, int instrOpIndex, int stackOffset, int size, int storageSpaceID, RefType refType, TaskMonitor monitor) throws CancelledException { @@ -304,6 +308,7 @@ System.out.println("Time to build ResultState = " + t + " msec."); } + @Override public void stackReference(PcodeOp op, int instrOpIndex, VarnodeOperation computedStackOffset, int size, int storageSpaceID, RefType refType, TaskMonitor monitor) throws CancelledException { @@ -311,6 +316,7 @@ System.out.println("Time to build ResultState = " + t + " msec."); } + @Override public List
unresolvedIndirectFlow(PcodeOp op, int instrOpIndex, Varnode destination, ContextState currentState, ResultsState results, TaskMonitor monitor) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/AddressTableLengthTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/AddressTableLengthTableColumn.java index e65879bb22..d0073d22dc 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/AddressTableLengthTableColumn.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/AddressTableLengthTableColumn.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,7 +43,8 @@ public class AddressTableLengthTableColumn return Integer.valueOf(rowObject.getNumberAddressEntries()); } - public ProgramLocation getProgramLocation(AddressTable rowObject, Settings settings, + @Override + public ProgramLocation getProgramLocation(AddressTable rowObject, Settings settings, Program program, ServiceProvider serviceProvider) { return new ProgramLocation(program, rowObject.getTopAddress()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromAddressTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromAddressTableColumn.java index f5efaf1219..e5c73353bf 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromAddressTableColumn.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromAddressTableColumn.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,6 +45,7 @@ public class ReferenceFromAddressTableColumn return rowObject.getSource(); } + @Override public ProgramLocation getProgramLocation(ReferenceAddressPair rowObject, Settings settings, Program program, ServiceProvider serviceProvider) { Address address = getValue(rowObject, null, program, serviceProvider); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromFunctionTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromFunctionTableColumn.java index 7b31fb8dc7..e35ffe6c5b 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromFunctionTableColumn.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromFunctionTableColumn.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -47,6 +47,7 @@ public class ReferenceFromFunctionTableColumn return (fromFunction != null) ? fromFunction.toString() : null; } + @Override public ProgramLocation getProgramLocation(ReferenceAddressPair rowObject, Settings settings, Program program, ServiceProvider serviceProvider) { Address address = getFromAddress(rowObject); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromLabelTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromLabelTableColumn.java index e15752abbd..2408ca0274 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromLabelTableColumn.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceFromLabelTableColumn.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,6 +59,7 @@ public class ReferenceFromLabelTableColumn return symbolTable.getPrimarySymbol(fromAddress); } + @Override public ProgramLocation getProgramLocation(ReferenceAddressPair rowObject, Settings settings, Program program, ServiceProvider serviceProvider) { Symbol symbol = getSymbol( rowObject, program ); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceToAddressTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceToAddressTableColumn.java index 06f88e7ff3..cfa8b752ff 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceToAddressTableColumn.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceToAddressTableColumn.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,6 +45,7 @@ public class ReferenceToAddressTableColumn return rowObject.getDestination(); } + @Override public ProgramLocation getProgramLocation(ReferenceAddressPair rowObject, Settings settings, Program program, ServiceProvider serviceProvider) { Address address = getValue(rowObject,null,program,serviceProvider); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/BookmarkMergeManagerTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/BookmarkMergeManagerTest.java index 7afef7b6d0..23e8ee23fc 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/BookmarkMergeManagerTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/BookmarkMergeManagerTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,6 +44,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testAddLatest() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr = addr(program, "0x10028b1"); @@ -51,6 +52,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { "Test bookmark @ 0x10028b1"); } + @Override public void modifyPrivate(ProgramDB program) { } }); @@ -65,9 +67,11 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testAddMy() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr = addr(program, "0x10028b1"); @@ -86,6 +90,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testAddSame() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr = addr(program, "0x10028b1"); @@ -93,6 +98,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { "Test bookmark @ 0x10028b1"); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr = addr(program, "0x10028b1"); @@ -111,6 +117,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testAddDiffPickLatest() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr = addr(program, "0x10028b1"); @@ -118,6 +125,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { "Test bookmark @ 0x10028b1"); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr = addr(program, "0x10028b1"); @@ -136,6 +144,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testAddDiffPickMy() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr = addr(program, "0x10028b1"); @@ -143,6 +152,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { "Test bookmark @ 0x10028b1"); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr = addr(program, "0x10028b1"); @@ -161,6 +171,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testChangeLatest() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr; @@ -182,6 +193,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { bookmarks[0].set("NewCat", "This is a new analysis comment."); } + @Override public void modifyPrivate(ProgramDB program) { } }); @@ -201,9 +213,11 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testChangeMy() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr; @@ -241,6 +255,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testChangeSame() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr; @@ -262,6 +277,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { bookmarks[0].set("NewCat", "This is a new analysis comment."); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Address addr; @@ -299,6 +315,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testChangeDiff() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); bookMgr.setBookmark(addr(program, "0x1001978"), BookmarkType.ANALYSIS, @@ -307,6 +324,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { "Found Code", "Latest bookmark @ 0x100248f"); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); bookMgr.setBookmark(addr(program, "0x1001978"), BookmarkType.ANALYSIS, @@ -330,6 +348,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testRemoveLatest() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Bookmark[] bookmarks; @@ -338,6 +357,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { bookMgr.removeBookmark(bookmarks[0]); } + @Override public void modifyPrivate(ProgramDB program) { } }); @@ -355,9 +375,11 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testRemoveMy() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Bookmark[] bookmarks; @@ -380,6 +402,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testRemoveSame() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Bookmark[] bookmarks; @@ -388,6 +411,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { bookMgr.removeBookmark(bookmarks[0]); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Bookmark[] bookmarks; @@ -410,6 +434,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testChangeLatestRemoveMy() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); bookMgr.setBookmark(addr(program, "0x1001978"), BookmarkType.ANALYSIS, @@ -418,6 +443,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { "Found Code", "Latest bookmark @ 0x100248f"); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Bookmark[] bookmarks; @@ -444,6 +470,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { public void testChangeMyRemoveLatest() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Bookmark[] bookmarks; @@ -455,6 +482,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { bookMgr.removeBookmark(bookmarks[0]); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); bookMgr.setBookmark(addr(program, "0x1001978"), BookmarkType.ANALYSIS, @@ -476,6 +504,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { private void setupUseForAll() throws Exception { mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); Bookmark[] bookmarks; @@ -487,6 +516,7 @@ public class BookmarkMergeManagerTest extends AbstractListingMergeManagerTest { bookMgr.removeBookmark(bookmarks[0]); } + @Override public void modifyPrivate(ProgramDB program) { BookmarkManager bookMgr = program.getBookmarkManager(); bookMgr.setBookmark(addr(program, "0x1001978"), BookmarkType.ANALYSIS, diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/CodeUnitMergeManagerOverrideTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/CodeUnitMergeManagerOverrideTest.java index c38d3eb274..6ad9fa5a27 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/CodeUnitMergeManagerOverrideTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/CodeUnitMergeManagerOverrideTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,12 +45,14 @@ public class CodeUnitMergeManagerOverrideTest extends AbstractListingMergeManage public void testAddLatestFlowOverride() throws Exception { mtf.initialize("DiffTestPgm1", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); instruction.setFlowOverride(FlowOverride.BRANCH); } + @Override public void modifyPrivate(ProgramDB program) { // Do nothing. } @@ -67,10 +69,12 @@ public class CodeUnitMergeManagerOverrideTest extends AbstractListingMergeManage public void testAddMyFlowOverride() throws Exception { mtf.initialize("DiffTestPgm1", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { // Do nothing. } + @Override public void modifyPrivate(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); @@ -89,12 +93,14 @@ public class CodeUnitMergeManagerOverrideTest extends AbstractListingMergeManage public void testAddLatestFlowOverrideMyFlowOverridePickLatest() throws Exception { mtf.initialize("DiffTestPgm1", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); instruction.setFlowOverride(FlowOverride.BRANCH); } + @Override public void modifyPrivate(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); @@ -114,12 +120,14 @@ public class CodeUnitMergeManagerOverrideTest extends AbstractListingMergeManage public void testAddLatestFlowOverrideMyFlowOverridePickMy() throws Exception { mtf.initialize("DiffTestPgm1", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); instruction.setFlowOverride(FlowOverride.BRANCH); } + @Override public void modifyPrivate(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); @@ -139,12 +147,14 @@ public class CodeUnitMergeManagerOverrideTest extends AbstractListingMergeManage public void testAddLatestFlowOverrideMyFlowOverridePickOrig() throws Exception { mtf.initialize("DiffTestPgm1", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); instruction.setFlowOverride(FlowOverride.BRANCH); } + @Override public void modifyPrivate(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); @@ -164,12 +174,14 @@ public class CodeUnitMergeManagerOverrideTest extends AbstractListingMergeManage public void testSameFlowOverrideLatestMy() throws Exception { mtf.initialize("DiffTestPgm1", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); instruction.setFlowOverride(FlowOverride.BRANCH); } + @Override public void modifyPrivate(ProgramDB program) { Instruction instruction = program.getListing().getInstructionAt(addr(program, "0100354f")); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/DelaySlotCodeUnitMergeManagerTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/DelaySlotCodeUnitMergeManagerTest.java index 4a8a30a003..7e93ce7898 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/DelaySlotCodeUnitMergeManagerTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/DelaySlotCodeUnitMergeManagerTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,6 +44,7 @@ public class DelaySlotCodeUnitMergeManagerTest extends AbstractListingMergeManag mtf.initialize("r4000", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) throws Exception { Listing listing = program.getListing(); listing.clearCodeUnits(addr(program, "80b4"), addr(program, "80bb"), false); @@ -53,6 +54,7 @@ public class DelaySlotCodeUnitMergeManagerTest extends AbstractListingMergeManag disassembler.disassemble(addr(program, "80b4"), null); } + @Override public void modifyPrivate(ProgramDB program) throws Exception { Listing listing = program.getListing(); listing.clearCodeUnits(addr(program, "80b0"), addr(program, "80bf"), false); @@ -76,6 +78,7 @@ public class DelaySlotCodeUnitMergeManagerTest extends AbstractListingMergeManag public void testAddLatestDelaySlot2() throws Exception { mtf.initialize("r4000", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) throws Exception { Listing listing = program.getListing(); listing.clearCodeUnits(addr(program, "80b4"), addr(program, "80bb"), false); @@ -85,6 +88,7 @@ public class DelaySlotCodeUnitMergeManagerTest extends AbstractListingMergeManag disassembler.disassemble(addr(program, "80b4"), null); } + @Override public void modifyPrivate(ProgramDB program) throws Exception { Listing listing = program.getListing(); listing.clearCodeUnits(addr(program, "80b0"), addr(program, "80bf"), false); @@ -109,6 +113,7 @@ public class DelaySlotCodeUnitMergeManagerTest extends AbstractListingMergeManag mtf.initialize("r4000", new ProgramModifierListener() { + @Override public void modifyLatest(ProgramDB program) throws Exception { Listing listing = program.getListing(); listing.clearCodeUnits(addr(program, "80b4"), addr(program, "80bb"), false); @@ -118,6 +123,7 @@ public class DelaySlotCodeUnitMergeManagerTest extends AbstractListingMergeManag disassembler.disassemble(addr(program, "80b4"), null); } + @Override public void modifyPrivate(ProgramDB program) throws Exception { Listing listing = program.getListing(); listing.clearCodeUnits(addr(program, "80b0"), addr(program, "80bf"), false); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap32BitTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap32BitTest.java index 7b0f4dbbaf..e2589ecfb8 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap32BitTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap32BitTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,6 +22,7 @@ import ghidra.program.model.lang.*; public class AddressRangeMap32BitTest extends AbstractAddressRangeMapTest { + @Override protected ProgramDB createProgram() throws IOException { LanguageService service = getLanguageService(); Language language = service.getLanguage(new LanguageID("sparc:BE:32:default")); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap64BitTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap64BitTest.java index 952a7cc70a..c92836585a 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap64BitTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap64BitTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,6 +24,7 @@ import ghidra.program.model.lang.*; public class AddressRangeMap64BitTest extends AbstractAddressRangeMapTest { + @Override protected ProgramDB createProgram() throws IOException { LanguageService service = getLanguageService(); Language language = service.getLanguage(new LanguageID("sparc:BE:64:default")); diff --git a/Ghidra/Features/Base/src/test/java/ghidra/JunitTestScan.java b/Ghidra/Features/Base/src/test/java/ghidra/JunitTestScan.java index 38670ddb7c..c6956c91f5 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/JunitTestScan.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/JunitTestScan.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,6 +24,7 @@ import java.io.*; public class JunitTestScan { private static final FilenameFilter TEST_XML_FILTER = new FilenameFilter() { + @Override public boolean accept(File dir, String name) { return (name.startsWith("TEST-") && name.endsWith(".xml")); } diff --git a/Ghidra/Features/Base/src/test/java/ghidra/program/database/ProgramVolatilityTest.java b/Ghidra/Features/Base/src/test/java/ghidra/program/database/ProgramVolatilityTest.java index b598e6155a..6331adfbd4 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/program/database/ProgramVolatilityTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/program/database/ProgramVolatilityTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +36,7 @@ public class ProgramVolatilityTest extends SleighLanguageVolatilityTest { boolean isPORTFDataVolatile; boolean isPORTGDataVolatile; + @Override public void setUp(Boolean symbolVolatile, Integer symbolSize, Boolean memoryVolatile, boolean reverse) throws Exception { super.setUp(symbolVolatile, symbolSize, memoryVolatile, reverse); diff --git a/Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/ClosedPatternTableModel.java b/Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/ClosedPatternTableModel.java index be2d50dd9f..d9fd226962 100644 --- a/Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/ClosedPatternTableModel.java +++ b/Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/ClosedPatternTableModel.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,6 +56,7 @@ public class ClosedPatternTableModel extends ThreadedTableModelStub monospacedRenderer = new AbstractGColumnRenderer() { + @Override public java.awt.Component getTableCellRendererComponent( docking.widgets.table.GTableCellRenderingData data) { Component component = super.getTableCellRendererComponent(data); diff --git a/Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/PatternInfoTableModel.java b/Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/PatternInfoTableModel.java index 51720e1cd3..769f830f44 100644 --- a/Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/PatternInfoTableModel.java +++ b/Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/PatternInfoTableModel.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -54,6 +54,7 @@ public class PatternInfoTableModel extends ThreadedTableModelStub monospacedRenderer = new AbstractGColumnRenderer() { + @Override public Component getTableCellRendererComponent( docking.widgets.table.GTableCellRenderingData data) { Component component = super.getTableCellRendererComponent(data); diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/FileByteBlock.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/FileByteBlock.java index 704aaf62b0..02dfa7765d 100644 --- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/FileByteBlock.java +++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/FileByteBlock.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,6 +41,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#getLocationRepresentation(int) */ + @Override public String getLocationRepresentation(BigInteger bigIndex) { int index = bigIndex.intValue(); if (index < buf.length) { @@ -49,6 +50,7 @@ class FileByteBlock implements ByteBlock { return null; } + @Override public int getMaxLocationRepresentationSize() { return 8; } @@ -56,6 +58,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#getIndexName() */ + @Override public String getIndexName() { return "Bytes"; } @@ -63,6 +66,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#getLength() */ + @Override public BigInteger getLength() { return BigInteger.valueOf(buf.length); } @@ -70,6 +74,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#getByte(int) */ + @Override public byte getByte(BigInteger bigIndex) throws ByteBlockAccessException { int index = bigIndex.intValue(); if (index < buf.length) { @@ -81,6 +86,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#getShort(int) */ + @Override public short getShort(BigInteger bigIndex) throws ByteBlockAccessException { int index = bigIndex.intValue(); if (index < buf.length) { @@ -94,6 +100,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#getInt(int) */ + @Override public int getInt(BigInteger bigIndex) throws ByteBlockAccessException { int index = bigIndex.intValue(); if (index < buf.length) { @@ -107,6 +114,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#getLong(int) */ + @Override public long getLong(BigInteger bigIndex) throws ByteBlockAccessException { int index = bigIndex.intValue(); if (index < buf.length) { @@ -120,6 +128,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#setByte(int, byte) */ + @Override public void setByte(BigInteger bigIndex, byte value) throws ByteBlockAccessException { int index = bigIndex.intValue(); if (index < buf.length) { @@ -130,6 +139,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#setShort(int, short) */ + @Override public void setShort(BigInteger bigIndex, short value) throws ByteBlockAccessException { int index = bigIndex.intValue(); if (index < buf.length) { @@ -142,6 +152,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#setInt(int, int) */ + @Override public void setInt(BigInteger bigIndex, int value) throws ByteBlockAccessException { int index = bigIndex.intValue(); if (index < buf.length) { @@ -154,6 +165,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#setLong(int, long) */ + @Override public void setLong(BigInteger bigIndex, long value) throws ByteBlockAccessException { int index = bigIndex.intValue(); if (index < buf.length) { @@ -167,6 +179,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#isEditable() */ + @Override public boolean isEditable() { return false; } @@ -174,6 +187,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#setBigEndian(boolean) */ + @Override public void setBigEndian(boolean bigEndian) { if (this.bigEndian != bigEndian) { this.bigEndian = bigEndian; @@ -184,6 +198,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#isBigEndian() */ + @Override public boolean isBigEndian() { return bigEndian; } @@ -191,6 +206,7 @@ class FileByteBlock implements ByteBlock { /* (non-Javadoc) * @see ghidra.app.plugin.core.format.ByteBlock#getAlignment(int) */ + @Override public int getAlignment(int radix) { return 0; } diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/AddressFormatModel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/AddressFormatModel.java index fae50cc1e0..85f0e6fe69 100644 --- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/AddressFormatModel.java +++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/AddressFormatModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -46,6 +45,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { /** * Get the name of this formatter. */ + @Override public String getName() { return "Address"; } @@ -54,6 +54,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { * Get the number of bytes to make a unit; in this case it * takes 1 byte to make an Ascii value. */ + @Override public int getUnitByteSize() { return 1; } @@ -63,6 +64,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { * it returns a number from 0 to unit byte size - 1 indicating which * byte the character position was obtained from. */ + @Override public int getByteOffset(ByteBlock block, int position) { return 0; } @@ -70,6 +72,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { /** * Given the byte offset into a unit, get the column position. */ + @Override public int getColumnPosition(ByteBlock block, int byteOffset) { return 0; } @@ -78,6 +81,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { * Gets the number of characters required to display a * unit. */ + @Override public int getDataUnitSymbolSize() { return symbolSize; } @@ -90,6 +94,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public String getDataRepresentation(ByteBlock block, BigInteger index) throws ByteBlockAccessException { @@ -175,6 +180,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { /** * Returns true if the formatter allows values to be changed. */ + @Override public boolean isEditable() { return false; } @@ -191,6 +197,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { * attempt to put a 'z' in a hex unit. * block */ + @Override public boolean replaceValue(ByteBlock block, BigInteger index, int charPosition, char c) { return false; } @@ -198,6 +205,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { /** * Get the number of characters separating units. */ + @Override public int getUnitDelimiterSize() { return 0; } @@ -207,6 +215,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { * multiple units shown as one entity. This format does not * support groups. */ + @Override public int getGroupSize() { return 0; } @@ -216,6 +225,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { * support groups. * @throws UnsupportedOperationException */ + @Override public void setGroupSize(int groupSize) { throw new UnsupportedOperationException("groups are not supported"); } @@ -223,6 +233,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { /** * @see ghidra.app.plugin.core.format.DataFormatModel#validateBytesPerLine(int) */ + @Override public boolean validateBytesPerLine(int bytesPerLine) { return true; } @@ -233,6 +244,7 @@ public class AddressFormatModel implements ProgramDataFormatModel { * are added as a view to Memory Viewer are created via a Factory within their * respective Formatter Plugin. */ + @Override public void setProgram(Program program) { if (program == null) { listing = null; @@ -247,10 +259,12 @@ public class AddressFormatModel implements ProgramDataFormatModel { /* (non-Javadoc) * @see ghidra.app.plugin.format.DataFormatModel#getHelpLocation() */ + @Override public HelpLocation getHelpLocation() { return new HelpLocation("ByteViewerPlugin", "Address"); } + @Override public void dispose() { listing = null; memory = null; diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/AsciiFormatModel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/AsciiFormatModel.java index f2e81a2569..10246fb473 100644 --- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/AsciiFormatModel.java +++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/AsciiFormatModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,6 +34,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { /** * Get the name of this formatter. */ + @Override public String getName() { return "Ascii"; } @@ -43,6 +43,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { * Get the number of bytes to make a unit; in this case it * takes 1 byte to make an Ascii value. */ + @Override public int getUnitByteSize() { return 1; } @@ -52,6 +53,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { * it returns a number from 0 to unit byte size - 1 indicating which * byte the character position was obtained from. */ + @Override public int getByteOffset(ByteBlock block, int position) { return 0; } @@ -59,6 +61,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { /** * Given the byte offset into a unit, get the column position. */ + @Override public int getColumnPosition(ByteBlock block, int byteOffset) { return 0; } @@ -67,6 +70,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { * Gets the number of characters required to display a * unit. */ + @Override public int getDataUnitSymbolSize() { return symbolSize; } @@ -79,6 +83,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public String getDataRepresentation(ByteBlock block, BigInteger index) throws ByteBlockAccessException { @@ -99,6 +104,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { /** * Returns true if the formatter allows values to be changed. */ + @Override public boolean isEditable() { return true; } @@ -117,6 +123,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public boolean replaceValue(ByteBlock block, BigInteger index, int charPosition, char c) throws ByteBlockAccessException { @@ -141,6 +148,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { * support groups. * @throws UnsupportedOperationException */ + @Override public int getGroupSize() { return 0; } @@ -150,6 +158,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { * support groups. * @throws UnsupportedOperationException */ + @Override public void setGroupSize(int groupSize) { throw new UnsupportedOperationException("groups are not supported"); } @@ -157,6 +166,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { /** * Get the number of characters separating units. */ + @Override public int getUnitDelimiterSize() { return 0; } @@ -164,6 +174,7 @@ public class AsciiFormatModel implements UniversalDataFormatModel { /** * @see ghidra.app.plugin.core.format.DataFormatModel#validateBytesPerLine(int) */ + @Override public boolean validateBytesPerLine(int bytesPerLine) { return true; } @@ -171,10 +182,12 @@ public class AsciiFormatModel implements UniversalDataFormatModel { /* (non-Javadoc) * @see ghidra.app.plugin.format.DataFormatModel#getHelpLocation() */ + @Override public HelpLocation getHelpLocation() { return new HelpLocation("ByteViewerPlugin", "Ascii"); } + @Override public void dispose() { } diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/BinaryFormatModel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/BinaryFormatModel.java index d251c28f45..15587231fa 100644 --- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/BinaryFormatModel.java +++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/BinaryFormatModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +35,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { /** * Get the name of this formatter. */ + @Override public String getName() { return "Binary"; } @@ -44,6 +44,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { * Get the number of bytes to make a unit; in this case, * returns 1. */ + @Override public int getUnitByteSize() { return 1; } @@ -53,6 +54,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { * it returns a number from 0 to unit byte size - 1 indicating which * byte the character position was obtained from. */ + @Override public int getByteOffset(ByteBlock block, int position) { return 0; } @@ -60,6 +62,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { /** * Given the byte offset into a unit, get the column position. */ + @Override public int getColumnPosition(ByteBlock block, int byteOffset) { return 0; } @@ -69,6 +72,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { * unit. * @return 8 for number of characters in the binary representation. */ + @Override public int getDataUnitSymbolSize() { return symbolSize; } @@ -81,6 +85,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public String getDataRepresentation(ByteBlock block, BigInteger index) throws ByteBlockAccessException { @@ -101,6 +106,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { /** * Returns true to allow values to be changed. */ + @Override public boolean isEditable() { return (true); } @@ -119,6 +125,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public boolean replaceValue(ByteBlock block, BigInteger index, int charPosition, char c) throws ByteBlockAccessException { @@ -152,6 +159,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { * multiple units shown as one entity. This format does not * support groups. */ + @Override public int getGroupSize() { return 1; } @@ -161,6 +169,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { * support groups. * @throws UnsupportedOperationException */ + @Override public void setGroupSize(int groupSize) { throw new UnsupportedOperationException("groups are not supported"); } @@ -168,6 +177,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { /** * Get the number of characters separating units. */ + @Override public int getUnitDelimiterSize() { return 1; } @@ -175,6 +185,7 @@ public class BinaryFormatModel implements UniversalDataFormatModel { /** * @see ghidra.app.plugin.core.format.DataFormatModel#validateBytesPerLine(int) */ + @Override public boolean validateBytesPerLine(int bytesPerLine) { return true; } @@ -196,10 +207,12 @@ public class BinaryFormatModel implements UniversalDataFormatModel { /* (non-Javadoc) * @see ghidra.app.plugin.format.DataFormatModel#getHelpLocation() */ + @Override public HelpLocation getHelpLocation() { return new HelpLocation("ByteViewerPlugin", "Binary"); } + @Override public void dispose() { // nothing to do } diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/HexFormatModel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/HexFormatModel.java index 0dbdfc46d7..8bdf8f91e8 100644 --- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/HexFormatModel.java +++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/HexFormatModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,6 +49,7 @@ public class HexFormatModel implements UniversalDataFormatModel { /** * Get the name of this formatter. */ + @Override public String getName() { return NAME; } @@ -58,6 +58,7 @@ public class HexFormatModel implements UniversalDataFormatModel { * Get the number of bytes to make a unit; in this case, * returns 1. */ + @Override public int getUnitByteSize() { return unitByteSize; } @@ -67,6 +68,7 @@ public class HexFormatModel implements UniversalDataFormatModel { * unit. * @return 2 for number of characters in a unit */ + @Override public int getDataUnitSymbolSize() { return symbolSize; } @@ -74,6 +76,7 @@ public class HexFormatModel implements UniversalDataFormatModel { /** * Get number of units in a group. */ + @Override public int getGroupSize() { return groupSize; } @@ -81,6 +84,7 @@ public class HexFormatModel implements UniversalDataFormatModel { /** * Set the number of units in a group. */ + @Override public void setGroupSize(int groupSize) { this.groupSize = groupSize; unitByteSize = groupSize; @@ -98,6 +102,7 @@ public class HexFormatModel implements UniversalDataFormatModel { * Returns the byte used to generate the character at a given * position. */ + @Override public int getByteOffset(ByteBlock block, int pos) { if (prefixEnabled) { if (pos <= 3) { @@ -117,6 +122,7 @@ public class HexFormatModel implements UniversalDataFormatModel { /** * Given the byte offset into a unit, get the column position. */ + @Override public int getColumnPosition(ByteBlock block, int byteOffset) { if (prefixEnabled) { return byteOffset * 2 + 2; @@ -161,6 +167,7 @@ public class HexFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public String getDataRepresentation(ByteBlock block, BigInteger index) throws ByteBlockAccessException { @@ -227,6 +234,7 @@ public class HexFormatModel implements UniversalDataFormatModel { /** * Returns true to allow values to be changed. */ + @Override public boolean isEditable() { return true; } @@ -234,6 +242,7 @@ public class HexFormatModel implements UniversalDataFormatModel { /** * Get the number of characters separating units for display purposes. */ + @Override public int getUnitDelimiterSize() { return 1; } @@ -252,6 +261,7 @@ public class HexFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public boolean replaceValue(ByteBlock block, BigInteger index, int charPosition, char c) throws ByteBlockAccessException { @@ -287,6 +297,7 @@ public class HexFormatModel implements UniversalDataFormatModel { /** * @see ghidra.app.plugin.core.format.DataFormatModel#validateBytesPerLine(int) */ + @Override public boolean validateBytesPerLine(int bytesPerLine) { return true; } @@ -315,10 +326,12 @@ public class HexFormatModel implements UniversalDataFormatModel { /* (non-Javadoc) * @see ghidra.app.plugin.format.DataFormatModel#getHelpLocation() */ + @Override public HelpLocation getHelpLocation() { return new HelpLocation("ByteViewerPlugin", "Hex"); } + @Override public void dispose() { } diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/IntegerFormatModel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/IntegerFormatModel.java index 931c5093f1..1c0ac4962d 100644 --- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/IntegerFormatModel.java +++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/IntegerFormatModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +35,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { /** * Get the name of this formatter. */ + @Override public String getName() { return "Integer"; } @@ -44,6 +44,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { * Get the number of bytes to make a unit; in this case, * returns 4. */ + @Override public int getUnitByteSize() { return 4; } @@ -53,6 +54,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { * it returns a number from 0 to unit byte size - 1 indicating which * byte the character position was obtained from. */ + @Override public int getByteOffset(ByteBlock block, int position) { return 0; @@ -61,6 +63,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { /** * Given the byte offset into a unit, get the column position. */ + @Override public int getColumnPosition(ByteBlock block, int byteOffset) { return 0; } @@ -70,6 +73,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { * unit. * @return 4 for number of characters in the integer representation. */ + @Override public int getDataUnitSymbolSize() { return symbolSize; } @@ -82,6 +86,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public String getDataRepresentation(ByteBlock block, BigInteger index) throws ByteBlockAccessException { @@ -97,6 +102,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { /** * Returns false to allow no values to be changed. */ + @Override public boolean isEditable() { return false; } @@ -115,6 +121,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public boolean replaceValue(ByteBlock block, BigInteger index, int pos, char c) throws ByteBlockAccessException { @@ -126,6 +133,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { * multiple units shown as one entity. This format does not * support groups. */ + @Override public int getGroupSize() { return 1; } @@ -135,6 +143,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { * support groups. * @throws UnsupportedOperationException */ + @Override public void setGroupSize(int groupSize) { throw new UnsupportedOperationException("groups are not supported"); } @@ -142,6 +151,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { /** * Get the number of characters separating units. */ + @Override public int getUnitDelimiterSize() { return 1; } @@ -149,6 +159,7 @@ public class IntegerFormatModel implements UniversalDataFormatModel { /** * @see ghidra.app.plugin.core.format.DataFormatModel#validateBytesPerLine(int) */ + @Override public boolean validateBytesPerLine(int bytesPerLine) { return bytesPerLine % 4 == 0; } @@ -177,10 +188,12 @@ public class IntegerFormatModel implements UniversalDataFormatModel { /* (non-Javadoc) * @see ghidra.app.plugin.format.DataFormatModel#getHelpLocation() */ + @Override public HelpLocation getHelpLocation() { return new HelpLocation("ByteViewerPlugin", "Integer"); } + @Override public void dispose() { // nothing to do } diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/OctalFormatModel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/OctalFormatModel.java index 3802d936a5..993d9204a6 100644 --- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/OctalFormatModel.java +++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/OctalFormatModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +35,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { /** * Get the name of this formatter. */ + @Override public String getName() { return "Octal"; } @@ -44,6 +44,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { * Get the number of bytes to make a unit; in this case, * returns 1. */ + @Override public int getUnitByteSize() { return 1; } @@ -53,6 +54,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { * it returns a number from 0 to unit byte size - 1 indicating which * byte the character position was obtained from. */ + @Override public int getByteOffset(ByteBlock block, int position) { return 0; } @@ -60,6 +62,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { /** * Given the byte offset into a unit, get the column position. */ + @Override public int getColumnPosition(ByteBlock block, int byteOffset) { return 0; } @@ -69,6 +72,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { * unit. * @return 3 for number of characters in the octal representation. */ + @Override public int getDataUnitSymbolSize() { return symbolSize; } @@ -81,6 +85,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public String getDataRepresentation(ByteBlock block, BigInteger index) throws ByteBlockAccessException { @@ -101,6 +106,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { /** * Returns true to allow values to be changed. */ + @Override public boolean isEditable() { return (true); } @@ -119,6 +125,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { * @throws IndexOutOfBoundsException if index is not valid for the * block */ + @Override public boolean replaceValue(ByteBlock block, BigInteger index, int charPosition, char c) throws ByteBlockAccessException { @@ -162,6 +169,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { * multiple units shown as one entity. This format does not * support groups. */ + @Override public int getGroupSize() { return 1; } @@ -171,6 +179,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { * support groups. * @throws UnsupportedOperationException */ + @Override public void setGroupSize(int groupSize) { throw new UnsupportedOperationException("groups are not supported"); } @@ -178,6 +187,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { /** * Get the number of characters separating units. */ + @Override public int getUnitDelimiterSize() { return 1; } @@ -185,6 +195,7 @@ public class OctalFormatModel implements UniversalDataFormatModel { /** * @see ghidra.app.plugin.core.format.DataFormatModel#validateBytesPerLine(int) */ + @Override public boolean validateBytesPerLine(int bytesPerLine) { return true; } @@ -206,10 +217,12 @@ public class OctalFormatModel implements UniversalDataFormatModel { /* (non-Javadoc) * @see ghidra.app.plugin.format.DataFormatModel#getHelpLocation() */ + @Override public HelpLocation getHelpLocation() { return new HelpLocation("ByteViewerPlugin", "Octal"); } + @Override public void dispose() { // nothing to do } diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/GraphASTAndFlowScript.java b/Ghidra/Features/Decompiler/ghidra_scripts/GraphASTAndFlowScript.java index 93b4c5b933..a2e4c1c655 100644 --- a/Ghidra/Features/Decompiler/ghidra_scripts/GraphASTAndFlowScript.java +++ b/Ghidra/Features/Decompiler/ghidra_scripts/GraphASTAndFlowScript.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,6 +22,7 @@ import ghidra.app.services.GraphDisplayBroker; public class GraphASTAndFlowScript extends GraphASTScript { + @Override protected PCodeDfgGraphTask createTask(GraphDisplayBroker graphDisplayBroker) { return new PCodeCombinedGraphTask(state.getTool(), graphDisplayBroker, high); } diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/GraphSelectedASTScript.java b/Ghidra/Features/Decompiler/ghidra_scripts/GraphSelectedASTScript.java index 928fa6260e..063d22e6ba 100644 --- a/Ghidra/Features/Decompiler/ghidra_scripts/GraphSelectedASTScript.java +++ b/Ghidra/Features/Decompiler/ghidra_scripts/GraphSelectedASTScript.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,6 +21,7 @@ import ghidra.app.plugin.core.decompile.actions.SelectedPCodeDfgGraphTask; import ghidra.app.services.GraphDisplayBroker; public class GraphSelectedASTScript extends GraphASTScript { + @Override protected PCodeDfgGraphTask createTask(GraphDisplayBroker graphDisplayBroker) { return new SelectedPCodeDfgGraphTask(state.getTool(), graphDisplayBroker, high, currentAddress); diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/GccTypeinfoRef.java b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/GccTypeinfoRef.java index 0a1d8d0730..52f2f876a4 100644 --- a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/GccTypeinfoRef.java +++ b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/GccTypeinfoRef.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,10 +30,12 @@ public class GccTypeinfoRef extends TypeinfoRef{ this.inVtable = inVtable; } + @Override public void setIsInVtable(Boolean setting) { inVtable = setting; } + @Override public Boolean isInVtable() { return inVtable; } diff --git a/Ghidra/Features/Decompiler/src/main/java/decompiler/DecompilerInitializer.java b/Ghidra/Features/Decompiler/src/main/java/decompiler/DecompilerInitializer.java index 005899ae39..15879ceffc 100644 --- a/Ghidra/Features/Decompiler/src/main/java/decompiler/DecompilerInitializer.java +++ b/Ghidra/Features/Decompiler/src/main/java/decompiler/DecompilerInitializer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +19,8 @@ import ghidra.app.plugin.core.comments.*; import ghidra.framework.*; public class DecompilerInitializer implements ModuleInitializer { - public void run() { + @Override + public void run() { PluggableServiceRegistry.registerPluggableService(CommentsActionFactory.class, new DecompilerCommentsActionFactory()); } diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/flatapi/FlatDecompilerAPI.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/flatapi/FlatDecompilerAPI.java index 9313260470..5e47319457 100644 --- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/flatapi/FlatDecompilerAPI.java +++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/flatapi/FlatDecompilerAPI.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -91,6 +90,7 @@ public class FlatDecompilerAPI implements Disposable { /** * Disposes of the decompiler resources by calling currentDecompiler.dispose(). */ + @Override public void dispose() { if (decompiler != null) { decompiler.dispose(); diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/SelectedPCodeDfgGraphTask.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/SelectedPCodeDfgGraphTask.java index a9a21e5ce7..ebb0bb24c9 100644 --- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/SelectedPCodeDfgGraphTask.java +++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/SelectedPCodeDfgGraphTask.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +36,7 @@ public class SelectedPCodeDfgGraphTask extends PCodeDfgGraphTask { this.address = address; } + @Override protected Iterator getPcodeOpIterator() { Iterator opiter = hfunction.getPcodeOps(address); return opiter; diff --git a/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerPspecVolatilityTest.java b/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerPspecVolatilityTest.java index d36e0adc93..ca3cb9198f 100644 --- a/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerPspecVolatilityTest.java +++ b/Ghidra/Features/Decompiler/src/test.slow/java/ghidra/app/plugin/core/decompile/DecompilerPspecVolatilityTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,6 +43,7 @@ public class DecompilerPspecVolatilityTest extends SleighLanguageVolatilityTest private boolean decompilerPORTFVolatile; private boolean decompilerPORTGVolatile; + @Override public void setUp(Boolean symbolVolatile, Integer symbolSize, Boolean memoryVolatile, boolean reverse) throws Exception { super.setUp(symbolVolatile, symbolSize, memoryVolatile, reverse); diff --git a/Ghidra/Features/DecompilerDependent/ghidra_scripts/ExportPCodeForCTADL.java b/Ghidra/Features/DecompilerDependent/ghidra_scripts/ExportPCodeForCTADL.java index 345fe10790..ca831332cd 100644 --- a/Ghidra/Features/DecompilerDependent/ghidra_scripts/ExportPCodeForCTADL.java +++ b/Ghidra/Features/DecompilerDependent/ghidra_scripts/ExportPCodeForCTADL.java @@ -60,10 +60,12 @@ class PcodeBlockBasicEdge implements GEdge { this.end = end; } + @Override public PcodeBlockBasicVertex getStart() { return start; } + @Override public PcodeBlockBasicVertex getEnd() { return end; } diff --git a/Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/string/variadic/FormatArgument.java b/Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/string/variadic/FormatArgument.java index f71909e425..1f2a5e2453 100644 --- a/Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/string/variadic/FormatArgument.java +++ b/Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/string/variadic/FormatArgument.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,6 +56,7 @@ public class FormatArgument { * * @return FormatArgument as String */ + @Override public String toString() { return String.format("[%s, %s]", this.lengthModifier, this.conversionSpecifier); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/art/headers/ArtHeader_005.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/art/headers/ArtHeader_005.java index f57bd52964..7026c9906d 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/art/headers/ArtHeader_005.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/art/headers/ArtHeader_005.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -87,6 +87,7 @@ public class ArtHeader_005 extends ArtHeader { /** * Checksum of the oat file we link to for load time sanity check. */ + @Override public int getOatChecksum() { return oat_checksum_; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v1/FBPKv1_Partition.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v1/FBPKv1_Partition.java index 9dc0a074c6..453a35de66 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v1/FBPKv1_Partition.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v1/FBPKv1_Partition.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -78,6 +78,7 @@ public class FBPKv1_Partition extends FBPK_Partition { return dataSize; } + @Override public int getOffsetToNextPartitionTable() { return offsetToNextPartitionTable; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v1/FBPTv1_Entry.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v1/FBPTv1_Entry.java index 7b1c2b5756..535cd673e4 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v1/FBPTv1_Entry.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v1/FBPTv1_Entry.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,6 +52,7 @@ public class FBPTv1_Entry extends FBPT_Entry { } } + @Override public String getName() { return name; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v2/FBPTv2_Entry.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v2/FBPTv2_Entry.java index 9c5091b7cb..b13a6cb08b 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v2/FBPTv2_Entry.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/fbpk/v2/FBPTv2_Entry.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -46,6 +46,7 @@ public class FBPTv2_Entry extends FBPT_Entry { unknown3 = reader.readNextInt(); } + @Override public String getName() { return name; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_007.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_007.java index 8266a14b51..b25d81e08a 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_007.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_007.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -72,6 +72,7 @@ public class OatHeader_007 extends OatHeader { return -1;//not supported } + @Override public int getChecksum() { return adler32_checksum_; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Lollipop.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Lollipop.java index 9f5702c4c5..f657cd3af4 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Lollipop.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Lollipop.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -84,6 +84,7 @@ public class OatClass_Lollipop extends OatClass { * @param methodIndex the method index * @return true if this method index is declared native in the bitmap */ + @Override public boolean isMethodNative(int methodIndex) { int bytePos = methodIndex / 8; int bitPos = methodIndex % 8; diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_S_T.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_S_T.java index cfd989e76c..639b691a15 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_S_T.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_S_T.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -88,6 +88,7 @@ public class OatClass_S_T extends OatClass { * @param methodIndex the method index * @return true if this method index is declared native in the bitmap */ + @Override public boolean isMethodNative(int methodIndex) { int bytePos = (methodIndex / 8); int bitPos = methodIndex % 8; diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Lollipop.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Lollipop.java index c803618280..9e322ae3b8 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Lollipop.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Lollipop.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -65,6 +65,7 @@ public class OatQuickMethodHeader_Lollipop extends OatQuickMethodHeader { * The code size in bytes. * @return the code size in bytes */ + @Override public int getCodeSize() { return code_size_; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_LollipopMR1.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_LollipopMR1.java index 93e276a5cf..b709cc975d 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_LollipopMR1.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_LollipopMR1.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -79,6 +79,7 @@ public class OatQuickMethodHeader_LollipopMR1 extends OatQuickMethodHeader { * The code size in bytes. * @return code size in bytes */ + @Override public int getCodeSize() { return code_size_; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Nougat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Nougat.java index 9a692f9841..2344433aa3 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Nougat.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Nougat.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,6 +62,7 @@ public class OatQuickMethodHeader_Nougat extends OatQuickMethodHeader { * The code size in bytes. * @return the code size */ + @Override public int getCodeSize() { return code_size_; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Oreo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Oreo.java index 2a827e60ce..de44b943bd 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Oreo.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Oreo.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -79,6 +79,7 @@ public class OatQuickMethodHeader_Oreo extends OatQuickMethodHeader { * The code size in bytes. The highest bit is used to signify if the compiled * code with the method header has should_deoptimize flag. */ + @Override public int getCodeSize() { return code_size_; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Q_R.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Q_R.java index 3b41837bab..fb86e572b0 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Q_R.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Q_R.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -49,6 +49,7 @@ public class OatQuickMethodHeader_Q_R extends OatQuickMethodHeader { * The code size in bytes. * @return the code size */ + @Override public int getCodeSize() { return code_size_; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_006.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_006.java index af7498d12f..2940559071 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_006.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_006.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,6 +52,7 @@ public class VdexHeader_006 extends VdexHeader { dex_checksums_ = reader.readNextIntArray(number_of_dex_files_); } + @Override public void parse(BinaryReader reader, TaskMonitor monitor) throws IOException, CancelledException { monitor.setMessage("Parsing DEX files inside VDEX (oreo)..."); @@ -75,6 +76,7 @@ public class VdexHeader_006 extends VdexHeader { //stringTable = new VdexStringTable( reader ); } + @Override public String getVersion() { return version_; } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_019.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_019.java index dc8cb3f677..9d48f606b5 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_019.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_019.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -91,6 +91,7 @@ public class VdexHeader_019 extends VdexHeader { return verifier_deps_version_; } + @Override public void parse(BinaryReader reader, TaskMonitor monitor) throws IOException, CancelledException { //do nothing diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_021.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_021.java index b3b58c3922..8334bba7c1 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_021.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/vdex/headers/VdexHeader_021.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -96,6 +96,7 @@ public class VdexHeader_021 extends VdexHeader { return verifier_deps_version_; } + @Override public void parse(BinaryReader reader, TaskMonitor monitor) throws IOException, CancelledException { //do nothing diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/bplist/NSObject.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/bplist/NSObject.java index 007fec307f..64eb91a98d 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/bplist/NSObject.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/bplist/NSObject.java @@ -36,6 +36,7 @@ public abstract class NSObject implements StructConverter { public abstract String getType(); + @Override public abstract String toString(); protected void addHeader( Structure structure, int size ) { diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/apport/ApportHeader.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/apport/ApportHeader.java index 8ba095f892..52fa61fb5b 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/apport/ApportHeader.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/apport/ApportHeader.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -127,6 +127,7 @@ public class ApportHeader implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() { StructureDataType struct = new StructureDataType(NAME, 0); for (int i = 0; i < lineCount; i++) { diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/cmd/DumpPeShim.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/cmd/DumpPeShim.java index 086caebd72..2b3642c968 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/cmd/DumpPeShim.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/cmd/DumpPeShim.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -100,10 +100,12 @@ public class DumpPeShim extends PeLoader { } } + @Override protected SectionLayout getSectionLayout() { return SectionLayout.MEMORY; } + @Override protected FileBytes createFileBytes(ByteProvider provider, Program pgm, TaskMonitor monitor) throws IOException, CancelledException { List fileBytesList = pgm.getMemory().getAllFileBytes(); @@ -130,6 +132,7 @@ public class DumpPeShim extends PeLoader { } } + @Override protected Map processMemoryBlocks(PortableExecutable pe, Program prog, FileBytes fileBytes, TaskMonitor monitor, MessageLog log) throws AddressOverflowException { diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CommentStreamA.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CommentStreamA.java index eded172745..ad3a22e461 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CommentStreamA.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CommentStreamA.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -51,6 +51,7 @@ public class CommentStreamA implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CommentStreamW.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CommentStreamW.java index 45d644559f..49f488e8f0 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CommentStreamW.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CommentStreamW.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -51,6 +51,7 @@ public class CommentStreamW implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CvRecord.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CvRecord.java index d91b7b5fb4..e718604287 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CvRecord.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/CvRecord.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,6 +62,7 @@ public class CvRecord implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Directory.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Directory.java index 7ed49b260f..898ed733f9 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Directory.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Directory.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,6 +74,7 @@ public class Directory implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ExceptionStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ExceptionStream.java index 7d2837aa79..02b784d0c0 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ExceptionStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ExceptionStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -101,6 +101,7 @@ public class ExceptionStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/FunctionTable.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/FunctionTable.java index 6db48cd025..29948d89c1 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/FunctionTable.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/FunctionTable.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,6 +56,7 @@ public class FunctionTable implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/FunctionTableStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/FunctionTableStream.java index 2d5e3d6988..6977dc1808 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/FunctionTableStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/FunctionTableStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,6 +62,7 @@ public class FunctionTableStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Handle.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Handle.java index 755a32312d..5873222015 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Handle.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Handle.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -69,6 +69,7 @@ public class Handle implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/HandleDataStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/HandleDataStream.java index 0fbb61573a..5c73198612 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/HandleDataStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/HandleDataStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -57,6 +57,7 @@ public class HandleDataStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/HandleOperationListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/HandleOperationListStream.java index 12c59299df..fbda5fcbe1 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/HandleOperationListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/HandleOperationListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,6 +56,7 @@ public class HandleOperationListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MdmpFileHeader.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MdmpFileHeader.java index 7617a65690..23f6f1a503 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MdmpFileHeader.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MdmpFileHeader.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,6 +59,7 @@ public class MdmpFileHeader implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Memory64ListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Memory64ListStream.java index 0924e78243..327e4918dc 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Memory64ListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Memory64ListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -54,6 +54,7 @@ public class Memory64ListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryInfo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryInfo.java index bf9da14b1d..5555ee34c6 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryInfo.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryInfo.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,6 +62,7 @@ public class MemoryInfo implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryInfoListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryInfoListStream.java index 931366f68f..0e65628eb5 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryInfoListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryInfoListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,6 +56,7 @@ public class MemoryInfoListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryListStream.java index bc6ba3a85b..e5e62c41bf 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,6 +52,7 @@ public class MemoryListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryRange64.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryRange64.java index d61659c0d0..887b5d65db 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryRange64.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MemoryRange64.java @@ -56,6 +56,7 @@ public class MemoryRange64 implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MiscInfoStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MiscInfoStream.java index a4de5f92dc..de858c5dc2 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MiscInfoStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/MiscInfoStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -124,6 +124,7 @@ public class MiscInfoStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ModuleListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ModuleListStream.java index 279b77fd45..575f0fb83f 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ModuleListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ModuleListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,6 +52,7 @@ public class ModuleListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ProcessVmCountersStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ProcessVmCountersStream.java index 58665918cd..5fd4a94d54 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ProcessVmCountersStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ProcessVmCountersStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -96,6 +96,7 @@ public class ProcessVmCountersStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/SystemInfoStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/SystemInfoStream.java index dad620084a..50a38aaa18 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/SystemInfoStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/SystemInfoStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -94,6 +94,7 @@ public class SystemInfoStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadExListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadExListStream.java index 02cf5b91ec..effd49f12f 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadExListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadExListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,6 +52,7 @@ public class ThreadExListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadInfo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadInfo.java index 8b16cb304f..ac5b0da519 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadInfo.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadInfo.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -66,6 +66,7 @@ public class ThreadInfo implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadInfoListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadInfoListStream.java index a83a7fa7b2..6e255b3431 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadInfoListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadInfoListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,6 +56,7 @@ public class ThreadInfoListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadListStream.java index 191472c0cd..fc76277f5d 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/ThreadListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,6 +52,7 @@ public class ThreadListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Token.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Token.java index 69228c3905..8f508c0cf2 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Token.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Token.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Token implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/TokenListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/TokenListStream.java index db4d23e2ca..b23314e77e 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/TokenListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/TokenListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -58,6 +58,7 @@ public class TokenListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/UnloadedModuleListStream.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/UnloadedModuleListStream.java index 31b7a0b06f..63fb3f7bfb 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/UnloadedModuleListStream.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/UnloadedModuleListStream.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,6 +56,7 @@ public class UnloadedModuleListStream implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/ExceptionRecord.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/ExceptionRecord.java index b2edcc0d2c..95ac23d1da 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/ExceptionRecord.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/ExceptionRecord.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -56,6 +56,7 @@ public class ExceptionRecord implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/MmPfn.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/MmPfn.java index dc13ea9cc5..0f679834ad 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/MmPfn.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/MmPfn.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -60,6 +60,7 @@ public class MmPfn implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/PhysicalMemoryDescriptor.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/PhysicalMemoryDescriptor.java index 6886bdb1d3..d8c6513d48 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/PhysicalMemoryDescriptor.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/PhysicalMemoryDescriptor.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,6 +59,7 @@ public class PhysicalMemoryDescriptor implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/PhysicalMemoryRun.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/PhysicalMemoryRun.java index b831922982..886ff564f7 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/PhysicalMemoryRun.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/PhysicalMemoryRun.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,6 +50,7 @@ public class PhysicalMemoryRun implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/SummaryHeader.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/SummaryHeader.java index abb9feb4a7..4492c54a8a 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/SummaryHeader.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/SummaryHeader.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,6 +62,7 @@ public class SummaryHeader implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/DebugInfo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/DebugInfo.java index 04491e852b..60b4f3ec09 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/DebugInfo.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/DebugInfo.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -66,6 +66,7 @@ public class DebugInfo implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/MemoryInfo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/MemoryInfo.java index 916d237606..9646d214a2 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/MemoryInfo.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/MemoryInfo.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,6 +62,7 @@ public class MemoryInfo implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/MemoryRange.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/MemoryRange.java index 836ef5cff9..cb84c5b91b 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/MemoryRange.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/MemoryRange.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,6 +52,7 @@ public class MemoryRange implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { StructureDataType struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/UserdumpFileHeader.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/UserdumpFileHeader.java index 71a299dab7..20e06d3dba 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/UserdumpFileHeader.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/UserdumpFileHeader.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -75,6 +75,7 @@ public class UserdumpFileHeader implements StructConverter { /** * @see ghidra.app.util.bin.StructConverter#toDataType() */ + @Override public DataType toDataType() throws DuplicateNameException { Structure struct = new StructureDataType(NAME, 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/apple8900/Apple8900Decryptor.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/apple8900/Apple8900Decryptor.java index ee3598cf79..1389854c15 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/apple8900/Apple8900Decryptor.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/apple8900/Apple8900Decryptor.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,11 +29,13 @@ import ghidra.util.task.TaskMonitor; public class Apple8900Decryptor implements Decryptor { + @Override public boolean isValid( ByteProvider provider ) throws IOException { byte [] bytes = provider.readBytes( 0, 4 ); return Arrays.equals( bytes, Apple8900Constants.MAGIC_BYTES ); } + @Override public DecryptedPacket decrypt( String firmwareName, String firmwarePath, ByteProvider provider, TaskMonitor monitor ) throws IOException, CryptoException { BinaryReader reader = new BinaryReader( provider, true ); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgHeaderV2.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgHeaderV2.java index 88022576b1..ae5b933051 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgHeaderV2.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgHeaderV2.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -58,6 +58,7 @@ public class DmgHeaderV2 extends DmgHeader { public byte [] getSignature() { return signature; } + @Override public int getVersion() { return version; } @@ -85,13 +86,16 @@ public class DmgHeaderV2 extends DmgHeader { public int getBlockSize() { return blockSize; } + @Override public long getDataOffset() { return dataOffset; } + @Override public long getDataSize() { return dataSize; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType struct = (StructureDataType)StructConverterUtil.toDataType( this ); DataTypeComponent component0 = struct.getComponent(0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/ibootim/iBootImHeader.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/ibootim/iBootImHeader.java index e9dfec0626..d7edfbfb2e 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/ibootim/iBootImHeader.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/ibootim/iBootImHeader.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -65,6 +65,7 @@ public class iBootImHeader implements StructConverter { return padding; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure struct = new StructureDataType(StructConverterUtil.parseName(iBootImHeader.class), 0); struct.add(STRING, iBootImConstants.SIGNATURE_LENGTH, "signature", null); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/img3/AbstractImg3Tag.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/img3/AbstractImg3Tag.java index 58e5c6665c..22b5b7ea9c 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/img3/AbstractImg3Tag.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/img3/AbstractImg3Tag.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -47,6 +47,7 @@ public abstract class AbstractImg3Tag implements StructConverter { return dataLength; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/img3/Img3.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/img3/Img3.java index fc627f542d..e7d8ccf082 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/img3/Img3.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/img3/Img3.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -86,6 +86,7 @@ public class Img3 implements StructConverter { return tmp; } + @Override public DataType toDataType() throws DuplicateNameException, IOException { return StructConverterUtil.toDataType(this); } diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2Data.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2Data.java index 2f98adbf63..180d4bc2b3 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2Data.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2Data.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,6 +27,7 @@ public class YAFFS2Data implements StructConverter { } // an array to hold data bytes for one record + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure structure = new StructureDataType("yaffs2Data", 0); structure.add(new ArrayDataType(BYTE, YAFFS2Constants.DATA_BUFFER_SIZE, BYTE.getLength()), diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2ExtendedTags.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2ExtendedTags.java index c155de32b3..e2dbfae907 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2ExtendedTags.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2ExtendedTags.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,6 +77,7 @@ public class YAFFS2ExtendedTags implements StructConverter { } // extended tags structure for analyzer + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure structure = new StructureDataType("yaffs2Tags", 0); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2Header.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2Header.java index e5a04fa79e..a765d3adbb 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2Header.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/yaffs2/YAFFS2Header.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -186,6 +186,7 @@ public class YAFFS2Header implements StructConverter { } // header structure for analyzer + @Override public DataType toDataType() throws DuplicateNameException, IOException { Structure structure = new StructureDataType( "yaffs2Hdr", 0 ); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/image/GImageConverter.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/image/GImageConverter.java index a98f4974af..4e91483473 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/image/GImageConverter.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/image/GImageConverter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -111,6 +111,7 @@ public class GImageConverter { final Icon icon = image.toPNG(); SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { JOptionPane.showMessageDialog(null, icon, "icon", JOptionPane.INFORMATION_MESSAGE); } diff --git a/Ghidra/Features/FunctionGraph/src/test.slow/java/ghidra/app/plugin/core/functiongraph/FunctionGraphGroupVertices3Test.java b/Ghidra/Features/FunctionGraph/src/test.slow/java/ghidra/app/plugin/core/functiongraph/FunctionGraphGroupVertices3Test.java index c2c6ee8cd2..ea0b2ab4b7 100644 --- a/Ghidra/Features/FunctionGraph/src/test.slow/java/ghidra/app/plugin/core/functiongraph/FunctionGraphGroupVertices3Test.java +++ b/Ghidra/Features/FunctionGraph/src/test.slow/java/ghidra/app/plugin/core/functiongraph/FunctionGraphGroupVertices3Test.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -262,6 +262,7 @@ public class FunctionGraphGroupVertices3Test extends AbstractFunctionGraphTest { // Private Methods //================================================================================================== + @Override protected void doTestAddingToGroup() { FGData graphData = graphFunction("01002cf5"); FunctionGraph functionGraph = graphData.getFunctionGraph(); @@ -319,6 +320,7 @@ public class FunctionGraphGroupVertices3Test extends AbstractFunctionGraphTest { assertSelected(ungroupedVertices); } + @Override protected void doTestGroupingProperlyTranslatesEdgesFromGroupedVerticesToRealVertices() { // // WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! diff --git a/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/GhidraGoPlugin.java b/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/GhidraGoPlugin.java index dff030734b..da8a6f685d 100644 --- a/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/GhidraGoPlugin.java +++ b/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/GhidraGoPlugin.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -88,6 +88,7 @@ public class GhidraGoPlugin extends Plugin implements ApplicationLevelOnlyPlugin * @param url a {@link GhidraURL} * @return true if handled successfully, false otherwise. */ + @Override public boolean accept(URL url) { Msg.info(this, "GhidraGo accepting the resource at " + GhidraURL.getProjectURL(url)); FrontEndTool frontEndTool = AppInfo.getFrontEndTool(); diff --git a/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForFileProcessedRunnable.java b/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForFileProcessedRunnable.java index 01d39e44e1..38a21eab32 100644 --- a/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForFileProcessedRunnable.java +++ b/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForFileProcessedRunnable.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -61,6 +61,7 @@ public class CheckForFileProcessedRunnable extends CheckPeriodicallyRunnable { this.filePath = filePath; } + @Override public void run() { try { if (checkCondition.call()) { @@ -113,6 +114,7 @@ public class CheckForFileProcessedRunnable extends CheckPeriodicallyRunnable { } } + @Override public void awaitTermination() throws StopWaitingException { try { executor.awaitTermination(MAX_WAIT_FOR_PROCESSING_MIN, TimeUnit.MINUTES); diff --git a/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForListenerRunnable.java b/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForListenerRunnable.java index 4421ff8a6b..4bd71d4165 100644 --- a/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForListenerRunnable.java +++ b/Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForListenerRunnable.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -55,6 +55,7 @@ public class CheckForListenerRunnable extends CheckPeriodicallyRunnable { this.process = p; } + @Override public void run() { try { if (checkCondition.call()) { diff --git a/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/mouse/JgtEdgeNavigationPlugin.java b/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/mouse/JgtEdgeNavigationPlugin.java index 03c0942f43..78edc90aa6 100644 --- a/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/mouse/JgtEdgeNavigationPlugin.java +++ b/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/mouse/JgtEdgeNavigationPlugin.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,6 +43,7 @@ public class JgtEdgeNavigationPlugin extends AbstractJgtGraphMousePlugin this.cursor = Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR); } + @Override public boolean checkModifiers(MouseEvent e) { return e.getModifiersEx() == translatingMask; } diff --git a/Ghidra/Features/MicrosoftDmang/src/main/java/mdemangler/datatype/modifier/MDManagedProperty.java b/Ghidra/Features/MicrosoftDmang/src/main/java/mdemangler/datatype/modifier/MDManagedProperty.java index ea08d67272..07af05d86d 100644 --- a/Ghidra/Features/MicrosoftDmang/src/main/java/mdemangler/datatype/modifier/MDManagedProperty.java +++ b/Ghidra/Features/MicrosoftDmang/src/main/java/mdemangler/datatype/modifier/MDManagedProperty.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,6 +31,7 @@ public class MDManagedProperty extends MDParsableItem { super(dmang); } + @Override protected void parseInternal() { // Do nothing } diff --git a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffServiceProvider.java b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffServiceProvider.java index 7f5fa50f3d..42fac7689f 100644 --- a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffServiceProvider.java +++ b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffServiceProvider.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,10 +35,12 @@ public class DiffServiceProvider implements ServiceProvider { this.diffGoToService = new DiffGoToService(goToService, programDiffPlugin); } + @Override public void addServiceListener(ServiceListener listener) { serviceProvider.addServiceListener(listener); } + @Override public T getService(Class serviceClass) { if (serviceClass == ProgramManager.class) { return serviceClass.cast( diffProgramManager ); @@ -50,6 +51,7 @@ public class DiffServiceProvider implements ServiceProvider { return serviceProvider.getService(serviceClass); } + @Override public void removeServiceListener(ServiceListener listener) { serviceProvider.removeServiceListener(listener); } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/AceRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/AceRecognizer.java index 3147cb8617..293f7d5b51 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/AceRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/AceRecognizer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,7 +16,8 @@ package ghidra.app.util.recognizer; public class AceRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x2a && bytes[1] == (byte) 0x2a && @@ -31,11 +32,13 @@ public class AceRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 7; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ArjRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ArjRecognizer.java index 07feaf2cd4..ce8820d914 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ArjRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ArjRecognizer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,7 +16,8 @@ package ghidra.app.util.recognizer; public class ArjRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x60 && bytes[1] == (byte) 0xea) { @@ -26,11 +27,13 @@ public class ArjRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 2; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/Bzip2Recognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/Bzip2Recognizer.java index 9e4079a1fb..8ca998d391 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/Bzip2Recognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/Bzip2Recognizer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,8 @@ package ghidra.app.util.recognizer; public class Bzip2Recognizer implements Recognizer { public static final int MAGIC_BYTES = 0x5a42; - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x42 && bytes[1] == (byte) 0x5a && @@ -29,11 +30,13 @@ public class Bzip2Recognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 3; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CHMRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CHMRecognizer.java index 0b21e928d9..8f65b4b07a 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CHMRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CHMRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class CHMRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x49 && bytes[1] == (byte) 0x54 && @@ -29,11 +29,13 @@ public class CHMRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CabarcRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CabarcRecognizer.java index b9347c0f42..e9e81878c1 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CabarcRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CabarcRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class CabarcRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x4d && bytes[1] == (byte) 0x53 && @@ -29,11 +29,13 @@ public class CabarcRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CompressiaRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CompressiaRecognizer.java index 6e1ac41c00..2970cf9e10 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CompressiaRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CompressiaRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class CompressiaRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x43 && bytes[1] == (byte) 0x4d && @@ -33,11 +33,13 @@ public class CompressiaRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 8; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CramFSRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CramFSRecognizer.java index 8ed2c2ed3d..581eb4aae4 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CramFSRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/CramFSRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class CramFSRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x45 && bytes[1] == (byte) 0x3d && @@ -29,11 +29,13 @@ public class CramFSRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/DebRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/DebRecognizer.java index 6b6eb3bbbd..17686d0a39 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/DebRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/DebRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class DebRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x21 && bytes[1] == (byte) 0x0a && @@ -33,11 +33,13 @@ public class DebRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 8; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/DmgRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/DmgRecognizer.java index 31e6f82fb7..83bd0bad1a 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/DmgRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/DmgRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class DmgRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x47 && bytes[1] == (byte) 0x4d && @@ -29,11 +29,13 @@ public class DmgRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/EmptyPkzipRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/EmptyPkzipRecognizer.java index ee9b3f2622..b44e525654 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/EmptyPkzipRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/EmptyPkzipRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class EmptyPkzipRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x50 && bytes[1] == (byte) 0x4b && @@ -29,11 +29,13 @@ public class EmptyPkzipRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/FreezeRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/FreezeRecognizer.java index b89f01712f..02a01183b1 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/FreezeRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/FreezeRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class FreezeRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x1f && bytes[1] == (byte) 0x9e) { @@ -27,11 +27,13 @@ public class FreezeRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 2; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/GzipRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/GzipRecognizer.java index e6701809b7..416c2486ba 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/GzipRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/GzipRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class GzipRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x1f && bytes[1] == (byte) 0x8b) { @@ -27,11 +27,13 @@ public class GzipRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 2; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ISO9660Recognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ISO9660Recognizer.java index a995624046..fecfbb18a7 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ISO9660Recognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ISO9660Recognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class ISO9660Recognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= 32774) { if (bytes[32769] == (byte) 0x43 && bytes[32770] == (byte) 0x44 && @@ -48,11 +48,13 @@ public class ISO9660Recognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 36870; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ImpRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ImpRecognizer.java index b8159dfe7c..fd437b0d9a 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ImpRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ImpRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class ImpRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x49 && bytes[1] == (byte) 0x4d && @@ -29,11 +29,13 @@ public class ImpRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/JarRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/JarRecognizer.java index d9ed44b52e..fe0b1f357b 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/JarRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/JarRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class JarRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x50 && bytes[1] == (byte) 0x4b && @@ -29,11 +29,13 @@ public class JarRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/LhaRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/LhaRecognizer.java index 3ff4c0fd59..38e24658ba 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/LhaRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/LhaRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class LhaRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[2] == (byte) 0x2d && bytes[3] == (byte) 0x6c && @@ -28,11 +28,13 @@ public class LhaRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 5; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/MSWIMRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/MSWIMRecognizer.java index 9abfdb750f..aaea3d0215 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/MSWIMRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/MSWIMRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class MSWIMRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x4d && bytes[1] == (byte) 0x53 && @@ -32,11 +32,13 @@ public class MSWIMRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 7; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/MacromediaFlashRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/MacromediaFlashRecognizer.java index 0f3f5b81c9..9d81c497ed 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/MacromediaFlashRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/MacromediaFlashRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class MacromediaFlashRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x43 && bytes[1] == (byte) 0x57 && @@ -28,11 +28,13 @@ public class MacromediaFlashRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 3; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PakArcRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PakArcRecognizer.java index fa8f0b9e5c..2068253da3 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PakArcRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PakArcRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class PakArcRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x1a && (bytes[1] & 0xf0) == (byte) 0x00 ) { @@ -27,11 +27,13 @@ public class PakArcRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 2; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PkzipRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PkzipRecognizer.java index b072b95c87..58fd9023ae 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PkzipRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PkzipRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class PkzipRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x50 && bytes[1] == (byte) 0x4b && @@ -29,11 +29,13 @@ public class PkzipRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PpmdRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PpmdRecognizer.java index 769345f419..e353e4f835 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PpmdRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/PpmdRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class PpmdRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x8f && bytes[1] == (byte) 0xaf && @@ -29,11 +29,13 @@ public class PpmdRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/RPMRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/RPMRecognizer.java index 0b9beb3dff..5badc593a1 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/RPMRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/RPMRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class RPMRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0xed && bytes[1] == (byte) 0xab && @@ -29,11 +29,13 @@ public class RPMRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/RarRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/RarRecognizer.java index 4265b3de06..0078c0853b 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/RarRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/RarRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class RarRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x52 && bytes[1] == (byte) 0x61 && @@ -29,11 +29,13 @@ public class RarRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SbcRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SbcRecognizer.java index 603f19388c..81fd6c7e7a 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SbcRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SbcRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class SbcRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x53 && bytes[1] == (byte) 0x42 && @@ -29,11 +29,13 @@ public class SbcRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SbxRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SbxRecognizer.java index c99c2fe5e6..990860f0f5 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SbxRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SbxRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class SbxRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x53 && bytes[1] == (byte) 0x42 && @@ -29,11 +29,13 @@ public class SbxRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SevenZipRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SevenZipRecognizer.java index 24217a600c..aac7f948c3 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SevenZipRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SevenZipRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class SevenZipRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x37 && bytes[1] == (byte) 0x7a && @@ -31,11 +31,13 @@ public class SevenZipRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 6; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SpannedPkzipRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SpannedPkzipRecognizer.java index 7c9ca7a756..ae16a4c2e9 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SpannedPkzipRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SpannedPkzipRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class SpannedPkzipRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x50 && bytes[1] == (byte) 0x4b && @@ -29,11 +29,13 @@ public class SpannedPkzipRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SqzRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SqzRecognizer.java index 1c4a0e66b8..070a25e35f 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SqzRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SqzRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class SqzRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x48 && bytes[1] == (byte) 0x4c && @@ -31,11 +31,13 @@ public class SqzRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 6; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/StuffIt1Recognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/StuffIt1Recognizer.java index e85efea9a2..b4509f206e 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/StuffIt1Recognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/StuffIt1Recognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class StuffIt1Recognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x53 && bytes[1] == (byte) 0x49 && @@ -29,11 +29,13 @@ public class StuffIt1Recognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/StuffIt5Recognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/StuffIt5Recognizer.java index 53a0ea30ef..87190b27bb 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/StuffIt5Recognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/StuffIt5Recognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class StuffIt5Recognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x53 && bytes[1] == (byte) 0x74 && @@ -33,11 +33,13 @@ public class StuffIt5Recognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 8; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SzipRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SzipRecognizer.java index ef47d27823..1728680987 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SzipRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/SzipRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class SzipRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x53 && bytes[1] == (byte) 0x5a && @@ -29,11 +29,13 @@ public class SzipRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/TarRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/TarRecognizer.java index 37c10a1f18..d2d32be12d 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/TarRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/TarRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class TarRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[257] == (byte) 0x75 && bytes[258] == (byte) 0x73 && @@ -31,11 +31,13 @@ public class TarRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 263; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UharcRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UharcRecognizer.java index ddd47e59fb..85a3593b14 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UharcRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UharcRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class UharcRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if ((bytes[0] == (byte) 0x55) && (bytes[1] == (byte) 0x48) && @@ -29,11 +29,13 @@ public class UharcRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UnixCompressRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UnixCompressRecognizer.java index bdecc31987..a4c78a6e22 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UnixCompressRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UnixCompressRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class UnixCompressRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x1f && bytes[1] == (byte) 0x9d) { @@ -27,11 +27,13 @@ public class UnixCompressRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 2; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UnixPackRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UnixPackRecognizer.java index c8892058a0..bc3d5daf30 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UnixPackRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/UnixPackRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class UnixPackRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x1f && bytes[1] == (byte) 0x1e && @@ -28,11 +28,13 @@ public class UnixPackRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 3; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/VHDRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/VHDRecognizer.java index e2eeec0972..bbff9541e9 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/VHDRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/VHDRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class VHDRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x63 && bytes[1] == (byte) 0x6f && @@ -33,11 +33,13 @@ public class VHDRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 8; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/XZRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/XZRecognizer.java index a0cc8bb2e2..9c6b1de388 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/XZRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/XZRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class XZRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0xfd && bytes[1] == (byte) 0x37 && @@ -31,11 +31,13 @@ public class XZRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 6; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/XarRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/XarRecognizer.java index ab6d53683e..fa1e69571e 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/XarRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/XarRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class XarRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x78 && bytes[1] == (byte) 0x61 && @@ -29,11 +29,13 @@ public class XarRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/YbsRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/YbsRecognizer.java index 7d9c1befc4..976e625474 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/YbsRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/YbsRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class YbsRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x59 && bytes[1] == (byte) 0x42 && @@ -29,11 +29,13 @@ public class YbsRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 4; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ZlibRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ZlibRecognizer.java index ec82db7f79..3a5c2e9787 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ZlibRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/ZlibRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class ZlibRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if (bytes[0] == (byte) 0x78) { return "File appears to be a ZLIB compressed file"; @@ -26,11 +26,13 @@ public class ZlibRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 1; } } diff --git a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/sitxRecognizer.java b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/sitxRecognizer.java index 2a15596f00..667b0c7a1a 100644 --- a/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/sitxRecognizer.java +++ b/Ghidra/Features/Recognizers/src/main/java/ghidra/app/util/recognizer/sitxRecognizer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +16,8 @@ package ghidra.app.util.recognizer; public class sitxRecognizer implements Recognizer { - public String recognize(byte[] bytes) { + @Override + public String recognize(byte[] bytes) { if (bytes.length >= numberOfBytesRequired()) { if ((bytes[0] == (byte) 0x53 && bytes[1] == (byte) 0x74 && @@ -42,11 +42,13 @@ public class sitxRecognizer implements Recognizer { return null; } - public int getPriority() { + @Override + public int getPriority() { return 100; } - public int numberOfBytesRequired() { + @Override + public int numberOfBytesRequired() { return 8; } } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/data/ExtIsfDataTypeWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/data/ExtIsfDataTypeWriter.java index 800ae08147..6ff2d0f4c9 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/data/ExtIsfDataTypeWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/data/ExtIsfDataTypeWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,6 +52,7 @@ public class ExtIsfDataTypeWriter extends IsfDataTypeWriter { STRICT = false; } + @Override public JsonObject getRootObject(TaskMonitor monitor) throws CancelledException, IOException { genRoot(monitor); return root; @@ -133,6 +134,7 @@ public class ExtIsfDataTypeWriter extends IsfDataTypeWriter { return new ExtIsfTypedefPointer(typeDef); } + @Override public IsfObject newTypedefUser(TypeDef typeDef, IsfObject object) { return new ExtIsfTypedefUser(typeDef, object); } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/data/SarifDataTypeWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/data/SarifDataTypeWriter.java index 9adaaf0fdd..80fa63c0b5 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/data/SarifDataTypeWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/data/SarifDataTypeWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -57,6 +57,7 @@ public class SarifDataTypeWriter extends ExtIsfDataTypeWriter { return jobj; } + @Override public JsonArray getResults() { return types; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/extlib/SarifClassesNamespaceWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/extlib/SarifClassesNamespaceWriter.java index 688691a108..324fcc90b6 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/extlib/SarifClassesNamespaceWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/extlib/SarifClassesNamespaceWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -89,6 +89,7 @@ public class SarifClassesNamespaceWriter extends AbstractExtWriter { } } + @Override public JsonArray getResults() { return objects; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/extlib/SarifExternalLibraryWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/extlib/SarifExternalLibraryWriter.java index 52aa70e5fd..7e902e05ab 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/extlib/SarifExternalLibraryWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/extlib/SarifExternalLibraryWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -72,6 +72,7 @@ public class SarifExternalLibraryWriter extends AbstractExtWriter { } } + @Override public JsonArray getResults() { return objects; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/func/SarifFunctionWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/func/SarifFunctionWriter.java index 6542b66bbc..33ec4601e0 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/func/SarifFunctionWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/func/SarifFunctionWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -78,6 +78,7 @@ public class SarifFunctionWriter extends AbstractExtWriter { objects.add(getTree(sarif)); } + @Override public JsonArray getResults() { return objects; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifEquateRefWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifEquateRefWriter.java index 6a7534d2d7..7b97c0f7aa 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifEquateRefWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifEquateRefWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,6 +74,7 @@ public class SarifEquateRefWriter extends AbstractExtWriter { } } + @Override public JsonArray getResults() { return objects; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifEquateWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifEquateWriter.java index a5f1dbbdce..0c45cd8c94 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifEquateWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifEquateWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -74,6 +74,7 @@ public class SarifEquateWriter extends AbstractExtWriter { } } + @Override public JsonArray getResults() { return objects; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifReferenceWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifReferenceWriter.java index f6b5bd457d..63a6f5dba0 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifReferenceWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/ref/SarifReferenceWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -107,6 +107,7 @@ public class SarifReferenceWriter extends AbstractExtWriter { } } + @Override public JsonArray getResults() { return objects; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/export/symbols/SarifSymbolWriter.java b/Ghidra/Features/Sarif/src/main/java/sarif/export/symbols/SarifSymbolWriter.java index b9960545f5..b044c58e36 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/export/symbols/SarifSymbolWriter.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/export/symbols/SarifSymbolWriter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -73,6 +73,7 @@ public class SarifSymbolWriter extends AbstractExtWriter { objects.add(getTree(sarif)); } + @Override public JsonArray getResults() { return objects; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/handlers/result/SarifProgramResultHandler.java b/Ghidra/Features/Sarif/src/main/java/sarif/handlers/result/SarifProgramResultHandler.java index 0292c3c22f..40d9eeebda 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/handlers/result/SarifProgramResultHandler.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/handlers/result/SarifProgramResultHandler.java @@ -87,6 +87,7 @@ public class SarifProgramResultHandler extends SarifResultHandler { programMgr.addManagers(); } + @Override protected void doRun(TaskMonitor monitor) { int[] selected = provider.filterTable.getTable().getSelectedRows(); Map>> results = new HashMap<>(); diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/io/SarifGsonIO.java b/Ghidra/Features/Sarif/src/main/java/sarif/io/SarifGsonIO.java index 9f59efe4fb..5d022e83eb 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/io/SarifGsonIO.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/io/SarifGsonIO.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,11 +25,13 @@ import com.google.gson.JsonSyntaxException; public class SarifGsonIO implements SarifIO { + @Override public SarifSchema210 readSarif(File file) throws JsonSyntaxException, IOException { Gson gson = new Gson(); return gson.fromJson(Files.readString(file.toPath()), SarifSchema210.class); } + @Override public SarifSchema210 readSarif(String str) throws JsonSyntaxException, IOException { Gson gson = new Gson(); return gson.fromJson(str, SarifSchema210.class); diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/io/SarifJacksonIO.java b/Ghidra/Features/Sarif/src/main/java/sarif/io/SarifJacksonIO.java index f0c4f68c48..ec10bdb3ed 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/io/SarifJacksonIO.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/io/SarifJacksonIO.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,12 +23,14 @@ import com.google.gson.JsonSyntaxException; public class SarifJacksonIO implements SarifIO { + @Override public SarifSchema210 readSarif(File file) throws JsonSyntaxException, IOException { // ObjectMapper mapper = new ObjectMapper(); // return mapper.readValue(Files.readString(file.toPath()), SarifSchema210.class); throw new IOException("Jackson not currently supported"); } + @Override public SarifSchema210 readSarif(String str) throws JsonSyntaxException, IOException { // ObjectMapper mapper = new ObjectMapper(); // return mapper.readValue(str, SarifSchema210.class); diff --git a/Ghidra/Features/Sarif/src/test/java/sarif/MergeCalcOverlaySarifTest.java b/Ghidra/Features/Sarif/src/test/java/sarif/MergeCalcOverlaySarifTest.java index 87ea4ca2c6..b564bd921e 100644 --- a/Ghidra/Features/Sarif/src/test/java/sarif/MergeCalcOverlaySarifTest.java +++ b/Ghidra/Features/Sarif/src/test/java/sarif/MergeCalcOverlaySarifTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -47,6 +47,7 @@ public class MergeCalcOverlaySarifTest extends AbstractSarifTest { assert(differences.isEmpty()); } + @Override protected Program getProgram(String progName) throws Exception { return buildOverlayCalcExeProgram(); } diff --git a/Ghidra/Features/Sarif/src/test/java/sarif/MergeCalcSarifTest.java b/Ghidra/Features/Sarif/src/test/java/sarif/MergeCalcSarifTest.java index 6bd76dac90..99454b30f9 100644 --- a/Ghidra/Features/Sarif/src/test/java/sarif/MergeCalcSarifTest.java +++ b/Ghidra/Features/Sarif/src/test/java/sarif/MergeCalcSarifTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -47,6 +47,7 @@ public class MergeCalcSarifTest extends AbstractSarifTest { assert(differences.isEmpty()); } + @Override protected Program getProgram(String progName) throws Exception { return buildCalcExeProgram(); } diff --git a/Ghidra/Features/Sarif/src/test/java/sarif/MergeMipsSarifTest.java b/Ghidra/Features/Sarif/src/test/java/sarif/MergeMipsSarifTest.java index a49de87487..40a1981306 100644 --- a/Ghidra/Features/Sarif/src/test/java/sarif/MergeMipsSarifTest.java +++ b/Ghidra/Features/Sarif/src/test/java/sarif/MergeMipsSarifTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -47,10 +47,12 @@ public class MergeMipsSarifTest extends AbstractSarifTest { assert(differences.isEmpty()); } + @Override protected Program getProgram(String progName) throws Exception { return buildR4000Program(); } + @Override public void reset() throws Exception { if (program != null) { if (txIdOut != -1) { diff --git a/Ghidra/Features/Sarif/src/test/java/sarif/MergeNotepadSarifTest.java b/Ghidra/Features/Sarif/src/test/java/sarif/MergeNotepadSarifTest.java index 5c0a87e53f..ff97de6557 100644 --- a/Ghidra/Features/Sarif/src/test/java/sarif/MergeNotepadSarifTest.java +++ b/Ghidra/Features/Sarif/src/test/java/sarif/MergeNotepadSarifTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -58,6 +58,7 @@ public class MergeNotepadSarifTest extends AbstractSarifTest { assert(differences.isEmpty()); } + @Override protected Program getProgram(String progName) throws Exception { return buildNotepadMergeListingTest_X86Program(); } diff --git a/Ghidra/Features/Sarif/src/test/java/sarif/MergeWallaceSarifTest.java b/Ghidra/Features/Sarif/src/test/java/sarif/MergeWallaceSarifTest.java index 26b861ce5b..2735955a0d 100644 --- a/Ghidra/Features/Sarif/src/test/java/sarif/MergeWallaceSarifTest.java +++ b/Ghidra/Features/Sarif/src/test/java/sarif/MergeWallaceSarifTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -55,6 +55,7 @@ public class MergeWallaceSarifTest extends AbstractSarifTest { assert(differences.isEmpty()); } + @Override protected Program getProgram(String progName) throws Exception { return buildWallaceSrcProgram(); } diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/program/ImpliedMatchProgramCorrelator.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/program/ImpliedMatchProgramCorrelator.java index 75fe5d83fc..4daeb357fb 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/program/ImpliedMatchProgramCorrelator.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/program/ImpliedMatchProgramCorrelator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,6 +38,7 @@ public class ImpliedMatchProgramCorrelator extends VTAbstractProgramCorrelator { // Do Nothing } + @Override public String getName() { return NAME; } diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/program/ManualMatchProgramCorrelator.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/program/ManualMatchProgramCorrelator.java index d3e13804fe..9776879c7c 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/program/ManualMatchProgramCorrelator.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/program/ManualMatchProgramCorrelator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,6 +38,7 @@ public class ManualMatchProgramCorrelator extends VTAbstractProgramCorrelator { // Do Nothing } + @Override public String getName() { return NAME; } diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/db/VTMatchTagDB.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/db/VTMatchTagDB.java index a0adfa7afa..ef107ce293 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/db/VTMatchTagDB.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/db/VTMatchTagDB.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -83,6 +83,7 @@ public class VTMatchTagDB extends DatabaseObject implements VTMatchTag { return record.getString(TAG_NAME_COL.column()); } + @Override public int compareTo(VTMatchTag otherTag) { return getName().compareTo(otherTag.getName()); } diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/impl/MarkupItemStorageImpl.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/impl/MarkupItemStorageImpl.java index 86f7e0ec5a..47707fccd7 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/impl/MarkupItemStorageImpl.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/impl/MarkupItemStorageImpl.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -90,6 +89,7 @@ public class MarkupItemStorageImpl implements MarkupItemStorage { return statusDescription; } + @Override public Stringable getSourceValue() { return sourceValue; } diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/impl/VTRelatedMatchImpl.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/impl/VTRelatedMatchImpl.java index c358a2a20b..e21c34ffd3 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/impl/VTRelatedMatchImpl.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/impl/VTRelatedMatchImpl.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -55,23 +54,28 @@ public class VTRelatedMatchImpl implements VTRelatedMatch { this.sourceFunction = sourceFunction; } - public VTRelatedMatchType getCorrelation() { + @Override + public VTRelatedMatchType getCorrelation() { return correlation; } - public Address getDestinationAddress() { + @Override + public Address getDestinationAddress() { return destinationAddress; } - public Function getDestinationFunction() { + @Override + public Function getDestinationFunction() { return destinationFunction; } - public Address getSourceAddress() { + @Override + public Address getSourceAddress() { return sourceAddress; } - public Function getSourceFunction() { + @Override + public Function getSourceFunction() { return sourceFunction; } } diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/main/VTMatchTag.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/main/VTMatchTag.java index 993ac020f4..eded5fd6f2 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/main/VTMatchTag.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/main/VTMatchTag.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,6 +31,7 @@ public interface VTMatchTag extends Comparable { return ""; } + @Override public int compareTo(VTMatchTag o) { return getName().compareTo(o.getName()); } diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/ProviderToggleAction.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/ProviderToggleAction.java index d123a09a55..c9ebae78c3 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/ProviderToggleAction.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/ProviderToggleAction.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -46,7 +45,8 @@ public class ProviderToggleAction extends ToggleDockingAction { JComponent component = provider.getComponent(); component.addHierarchyListener( new HierarchyListener() { - public void hierarchyChanged( HierarchyEvent e ) { + @Override + public void hierarchyChanged( HierarchyEvent e ) { long changeFlags = e.getChangeFlags(); if ( HierarchyEvent.SHOWING_CHANGED == (changeFlags & HierarchyEvent.SHOWING_CHANGED) ) { diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/editors/DisplayableOffset.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/editors/DisplayableOffset.java index c3dea737e8..3ee4ebef89 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/editors/DisplayableOffset.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/editors/DisplayableOffset.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,6 +25,7 @@ public interface DisplayableOffset extends DisplayStringProvider, Comparable extends Timer implements ActionListener { addActionListener(this); } + @Override public void actionPerformed(ActionEvent event) { if (!filterDialog.isFiltered()) { stop(); diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/validator/VTPreconditionValidator.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/validator/VTPreconditionValidator.java index 50763387ac..d123eefc9b 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/validator/VTPreconditionValidator.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/validator/VTPreconditionValidator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,6 +44,7 @@ public abstract class VTPreconditionValidator implements ConditionTester, Extens return getName(); } + @Override public final ConditionResult run(TaskMonitor monitor) throws CancelledException { // make sure the program isn't closed while we are working diff --git a/Ghidra/Framework/DB/src/main/java/db/ConvertedRecordIterator.java b/Ghidra/Framework/DB/src/main/java/db/ConvertedRecordIterator.java index a2ce328435..add7c0dd05 100644 --- a/Ghidra/Framework/DB/src/main/java/db/ConvertedRecordIterator.java +++ b/Ghidra/Framework/DB/src/main/java/db/ConvertedRecordIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,6 +41,7 @@ public abstract class ConvertedRecordIterator implements RecordIterator { /** * @see db.RecordIterator#delete() */ + @Override public boolean delete() throws IOException { if (!deleteAllowed) { throw new UnsupportedOperationException("record delete not allowed"); @@ -51,6 +52,7 @@ public abstract class ConvertedRecordIterator implements RecordIterator { /** * @see db.RecordIterator#hasNext() */ + @Override public boolean hasNext() throws IOException { return originalIterator.hasNext(); } @@ -58,6 +60,7 @@ public abstract class ConvertedRecordIterator implements RecordIterator { /** * @see db.RecordIterator#hasPrevious() */ + @Override public boolean hasPrevious() throws IOException { return originalIterator.hasPrevious(); } @@ -65,6 +68,7 @@ public abstract class ConvertedRecordIterator implements RecordIterator { /** * @see db.RecordIterator#next() */ + @Override public DBRecord next() throws IOException { return convertRecord(originalIterator.next()); } @@ -72,6 +76,7 @@ public abstract class ConvertedRecordIterator implements RecordIterator { /** * @see db.RecordIterator#previous() */ + @Override public DBRecord previous() throws IOException { return convertRecord(originalIterator.previous()); } diff --git a/Ghidra/Framework/DB/src/main/java/db/DBInitializer.java b/Ghidra/Framework/DB/src/main/java/db/DBInitializer.java index 691fee11ea..1550cb4e7a 100644 --- a/Ghidra/Framework/DB/src/main/java/db/DBInitializer.java +++ b/Ghidra/Framework/DB/src/main/java/db/DBInitializer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +19,8 @@ import ghidra.framework.ModuleInitializer; import db.buffers.BufferMgr; public class DBInitializer implements ModuleInitializer { - public void run() { + @Override + public void run() { BufferMgr.cleanupOldCacheFiles(); diff --git a/Ghidra/Framework/DB/src/test/java/db/buffers/DummyBufferFileMgr.java b/Ghidra/Framework/DB/src/test/java/db/buffers/DummyBufferFileMgr.java index e31389705a..95fe217d16 100644 --- a/Ghidra/Framework/DB/src/test/java/db/buffers/DummyBufferFileMgr.java +++ b/Ghidra/Framework/DB/src/test/java/db/buffers/DummyBufferFileMgr.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,30 +37,37 @@ public class DummyBufferFileMgr implements BufferFileManager { this.enableChangeFiles = enableChangeFiles; } + @Override public int getCurrentVersion() { return cur; } + @Override public File getBufferFile(int version) { return new File(dir, name + version + ".bf" ); } + @Override public File getVersionFile(int version) { if (enableVersionFiles) { return new File(dir, name + version + ".vf" ); } return null; } + @Override public File getChangeDataFile(int version) { if (enableChangeFiles) { return new File(dir, name + version + ".cf" ); } return null; } + @Override public File getChangeMapFile() { return null; } + @Override public void versionCreated(int version, String comment, long checkinId) { cur = version; } + @Override public void updateEnded(long checkinId) { } } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/ComponentTransferable.java b/Ghidra/Framework/Docking/src/main/java/docking/ComponentTransferable.java index 6694cc8d3d..f750b5dc85 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/ComponentTransferable.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/ComponentTransferable.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -57,6 +57,7 @@ class ComponentTransferable implements Transferable, ClipboardOwner { /** * Return all data flavors that this class supports. */ + @Override public synchronized DataFlavor []getTransferDataFlavors() { return flavors; } @@ -64,6 +65,7 @@ class ComponentTransferable implements Transferable, ClipboardOwner { /** * Return whether the specifed data flavor is supported. */ + @Override public boolean isDataFlavorSupported(DataFlavor f) { return f == localComponentProviderFlavor; } @@ -71,6 +73,7 @@ class ComponentTransferable implements Transferable, ClipboardOwner { /** * Return the transfer data with the given data flavor. */ + @Override public synchronized Object getTransferData(DataFlavor f) throws UnsupportedFlavorException, IOException { @@ -91,6 +94,7 @@ class ComponentTransferable implements Transferable, ClipboardOwner { /** * ClipboardOwner interface method. */ + @Override public void lostOwnership(Clipboard clipboard, Transferable contents) { } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/DockingWindowsContextSensitiveHelpListener.java b/Ghidra/Framework/Docking/src/main/java/docking/DockingWindowsContextSensitiveHelpListener.java index 7f245255ca..ca731c7ce3 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/DockingWindowsContextSensitiveHelpListener.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/DockingWindowsContextSensitiveHelpListener.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +30,8 @@ class DockingWindowsContextSensitiveHelpListener { private DockingWindowsContextSensitiveHelpListener() { Toolkit toolkit = Toolkit.getDefaultToolkit(); AWTEventListener listener = new AWTEventListener() { - public void eventDispatched( AWTEvent event ) { + @Override + public void eventDispatched( AWTEvent event ) { DockingWindowManager.setMouseOverObject( event.getSource() ); } }; diff --git a/Ghidra/Framework/Docking/src/main/java/docking/dnd/DragDropTreeTransferable.java b/Ghidra/Framework/Docking/src/main/java/docking/dnd/DragDropTreeTransferable.java index c4b93e2720..cbd1439bbc 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/dnd/DragDropTreeTransferable.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/dnd/DragDropTreeTransferable.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -66,7 +65,8 @@ public class DragDropTreeTransferable implements Transferable, ClipboardOwner { /** * Return all data flavors that this class supports. */ - public synchronized DataFlavor []getTransferDataFlavors() { + @Override + public synchronized DataFlavor []getTransferDataFlavors() { return flavors; } @@ -74,7 +74,8 @@ public class DragDropTreeTransferable implements Transferable, ClipboardOwner { * Return whether the specifed data flavor is supported. * @param f the DataFlavor to check if supported. */ - public boolean isDataFlavorSupported(DataFlavor f) { + @Override + public boolean isDataFlavorSupported(DataFlavor f) { return flavorList.contains(f); } @@ -82,7 +83,8 @@ public class DragDropTreeTransferable implements Transferable, ClipboardOwner { * Return the transfer data with the given data flavor. * @param f the DataFlavor for which to get a Transferable. */ - public synchronized Object getTransferData(DataFlavor f) + @Override + public synchronized Object getTransferData(DataFlavor f) throws UnsupportedFlavorException, IOException { if (f.equals(localTreeNodeFlavor)) { @@ -105,7 +107,8 @@ public class DragDropTreeTransferable implements Transferable, ClipboardOwner { * @param clipboard the system clipboard. * @param contents the Transferable lost in the clipboard. */ - public void lostOwnership(Clipboard clipboard, Transferable contents) { + @Override + public void lostOwnership(Clipboard clipboard, Transferable contents) { } } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/menu/InvertableImageIcon.java b/Ghidra/Framework/Docking/src/main/java/docking/menu/InvertableImageIcon.java index 4c441bab8a..8769311cd6 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/menu/InvertableImageIcon.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/menu/InvertableImageIcon.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -63,6 +62,7 @@ class InvertableImageIcon implements Icon { /** * @see javax.swing.Icon#getIconHeight() */ + @Override public int getIconHeight() { return icon.getIconHeight(); } @@ -70,6 +70,7 @@ class InvertableImageIcon implements Icon { /** * @see javax.swing.Icon#getIconWidth() */ + @Override public int getIconWidth() { return icon.getIconWidth(); } @@ -77,6 +78,7 @@ class InvertableImageIcon implements Icon { /** * @see javax.swing.Icon#paintIcon(java.awt.Component, java.awt.Graphics, int, int) */ + @Override public void paintIcon(Component c, Graphics g, int x, int y) { icon.paintIcon(c, g, x, y); } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/menu/MenuHandler.java b/Ghidra/Framework/Docking/src/main/java/docking/menu/MenuHandler.java index cb7d08dd76..bcd61e1515 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/menu/MenuHandler.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/menu/MenuHandler.java @@ -54,6 +54,7 @@ public abstract class MenuHandler implements MenuListener, PopupMenuListener { * Invoked when a menu is cancelled (not sure if this is ever invoked) * @see javax.swing.event.MenuListener#menuCanceled(javax.swing.event.MenuEvent) */ + @Override public void menuCanceled(MenuEvent e) { } @@ -63,6 +64,7 @@ public abstract class MenuHandler implements MenuListener, PopupMenuListener { * if an action item is selected. * @see javax.swing.event.MenuListener#menuDeselected(javax.swing.event.MenuEvent) */ + @Override public void menuDeselected(MenuEvent e) { } @@ -70,6 +72,7 @@ public abstract class MenuHandler implements MenuListener, PopupMenuListener { * Invoked when a menu is selected. * @see javax.swing.event.MenuListener#menuSelected(javax.swing.event.MenuEvent) */ + @Override public void menuSelected(MenuEvent e) { } @@ -77,7 +80,8 @@ public abstract class MenuHandler implements MenuListener, PopupMenuListener { * This method is called before the popup menu becomes visible * @see javax.swing.event.PopupMenuListener#popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent) */ - public void popupMenuWillBecomeVisible(PopupMenuEvent e) { + @Override + public void popupMenuWillBecomeVisible(PopupMenuEvent e) { } /** @@ -85,14 +89,16 @@ public abstract class MenuHandler implements MenuListener, PopupMenuListener { * Note that a JPopupMenu can become invisible any time * @see javax.swing.event.PopupMenuListener#popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent) */ - public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { + @Override + public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { } /** * This method is called when the popup menu is canceled * @see javax.swing.event.PopupMenuListener#popupMenuCanceled(javax.swing.event.PopupMenuEvent) */ - public void popupMenuCanceled(PopupMenuEvent e) { + @Override + public void popupMenuCanceled(PopupMenuEvent e) { } } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ColorSorter.java b/Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ColorSorter.java index 02d65576f5..8dbe1638ef 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ColorSorter.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ColorSorter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -48,6 +48,7 @@ public enum ColorSorter implements Comparator { return name; } + @Override public String toString() { return name; } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/CursorBlinker.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/CursorBlinker.java index 490705bcf6..c0a82c14a3 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/CursorBlinker.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/CursorBlinker.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,6 +38,7 @@ public class CursorBlinker { this.fieldPanel = panel; timer = new Timer(500, new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { if (paintBounds != null) { showCursor = !showCursor; diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/DefaultBackgroundColorModel.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/DefaultBackgroundColorModel.java index 74098047eb..9b62836a95 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/DefaultBackgroundColorModel.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/DefaultBackgroundColorModel.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,12 +31,15 @@ public class DefaultBackgroundColorModel implements BackgroundColorModel { public Color getBackgroundColor(int index) { return backgroundColor; } + @Override public Color getBackgroundColor(BigInteger index) { return backgroundColor; } + @Override public Color getDefaultBackgroundColor() { return backgroundColor; } + @Override public void setDefaultBackgroundColor(Color color) { this.backgroundColor = color; } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/EmptyFieldBackgroundColorManager.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/EmptyFieldBackgroundColorManager.java index 78fab77002..d0b1e2e250 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/EmptyFieldBackgroundColorManager.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/EmptyFieldBackgroundColorManager.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,14 +29,17 @@ public class EmptyFieldBackgroundColorManager implements FieldBackgroundColorMan private EmptyFieldBackgroundColorManager() { } + @Override public List getSelectionHighlights(int row) { return EMPTY_HIGHLIGHT_LIST; } + @Override public Color getBackgroundColor() { return null; } + @Override public Color getPaddingColor(int padIndex) { return null; } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/EmptyLayoutBackgroundColorManager.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/EmptyLayoutBackgroundColorManager.java index 1e319b6b78..c3e88e19d9 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/EmptyLayoutBackgroundColorManager.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/EmptyLayoutBackgroundColorManager.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,18 +27,22 @@ public class EmptyLayoutBackgroundColorManager implements LayoutBackgroundColorM this.background = background; } + @Override public FieldBackgroundColorManager getFieldBackgroundColorManager(int fieldNum) { return EmptyFieldBackgroundColorManager.EMPTY_INSTANCE; } + @Override public Color getBackgroundColor() { return background; } + @Override public Color getPaddingColor(int gap) { return null; } + @Override public Color getBackgroundColor(FieldLocation location) { return background; } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/FullySelectedFieldBackgroundColorManager.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/FullySelectedFieldBackgroundColorManager.java index e311bf0113..4af3db3f97 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/FullySelectedFieldBackgroundColorManager.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/FullySelectedFieldBackgroundColorManager.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,14 +27,17 @@ public class FullySelectedFieldBackgroundColorManager implements FieldBackground this.selectionColor = selectionColor; } + @Override public Color getBackgroundColor() { return selectionColor; } + @Override public List getSelectionHighlights(int row) { return EmptyFieldBackgroundColorManager.EMPTY_HIGHLIGHT_LIST; } + @Override public Color getPaddingColor(int padIndex) { return null; } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/LayoutBackgroundColorManagerAdapter.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/LayoutBackgroundColorManagerAdapter.java index 942cbf6539..c266388f31 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/LayoutBackgroundColorManagerAdapter.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/LayoutBackgroundColorManagerAdapter.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,10 +29,12 @@ public class LayoutBackgroundColorManagerAdapter implements LayoutBackgroundColo public LayoutBackgroundColorManagerAdapter(LayoutBackgroundColorManager layoutColorMap) { this.layoutSelectionMap = layoutColorMap; } + @Override public Color getBackgroundColor() { return layoutSelectionMap.getBackgroundColor(); } + @Override public FieldBackgroundColorManager getFieldBackgroundColorManager(int fieldNum) { return layoutSelectionMap.getFieldBackgroundColorManager(fieldNum+start); } @@ -42,6 +43,7 @@ public class LayoutBackgroundColorManagerAdapter implements LayoutBackgroundColo this.end = end; this.isLastRow = isLastRow; } + @Override public Color getPaddingColor(int gap) { if (gap == -1) { if (isLastRow) { @@ -51,6 +53,7 @@ public class LayoutBackgroundColorManagerAdapter implements LayoutBackgroundColo } return layoutSelectionMap.getPaddingColor(gap+start); } + @Override public Color getBackgroundColor(FieldLocation location) { return layoutSelectionMap.getBackgroundColor(location); } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/MixedFieldBackgroundColorManager.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/MixedFieldBackgroundColorManager.java index db211efbbe..8abdf6a79c 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/MixedFieldBackgroundColorManager.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/MixedFieldBackgroundColorManager.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,6 +42,7 @@ public class MixedFieldBackgroundColorManager implements FieldBackgroundColorMan this.selectionColor = selectionColor; } + @Override public List getSelectionHighlights(int row) { FieldLocation start = new FieldLocation(index, fieldNum, row, 0); FieldLocation end = new FieldLocation(index, fieldNum, row + 1, 0); @@ -57,6 +57,7 @@ public class MixedFieldBackgroundColorManager implements FieldBackgroundColorMan return highlights; } + @Override public Color getBackgroundColor() { if (layoutSelection.getBackgroundColor() == backgroundColor) { return null; @@ -64,6 +65,7 @@ public class MixedFieldBackgroundColorManager implements FieldBackgroundColorMan return backgroundColor; } + @Override public Color getPaddingColor(int padIndex) { return layoutSelection.getPaddingColor(fieldNum + padIndex); } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/MixedLayoutBackgroundColorManager.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/MixedLayoutBackgroundColorManager.java index a1e56347af..7a7ce5f25d 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/MixedLayoutBackgroundColorManager.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/internal/MixedLayoutBackgroundColorManager.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -48,6 +48,7 @@ public class MixedLayoutBackgroundColorManager implements LayoutBackgroundColorM this.rightBorderColor = rightBorderColor; } + @Override public FieldBackgroundColorManager getFieldBackgroundColorManager(int fieldNum) { FieldLocation start = new FieldLocation(index, fieldNum, 0, 0); FieldLocation end = new FieldLocation(index, fieldNum+1, 0, 0); @@ -67,10 +68,12 @@ public class MixedLayoutBackgroundColorManager implements LayoutBackgroundColorM return new MixedFieldBackgroundColorManager(index, fieldNum, this, selectionColor, fieldBackgroundColor); } + @Override public Color getBackgroundColor() { return backgroundColor; } + @Override public Color getPaddingColor(int padIndex) { Color paddingColor = null; if (padIndex == 0) { @@ -112,6 +115,7 @@ public class MixedLayoutBackgroundColorManager implements LayoutBackgroundColorM return selection; } + @Override public Color getBackgroundColor(FieldLocation location) { boolean isSelected = selection.contains(location); boolean isHighlighted = highlight.contains(location); diff --git a/Ghidra/Framework/Docking/src/test/java/docking/widgets/fieldpanel/AccessibleFieldTest.java b/Ghidra/Framework/Docking/src/test/java/docking/widgets/fieldpanel/AccessibleFieldTest.java index 678bb9ab63..f11e5f744f 100644 --- a/Ghidra/Framework/Docking/src/test/java/docking/widgets/fieldpanel/AccessibleFieldTest.java +++ b/Ghidra/Framework/Docking/src/test/java/docking/widgets/fieldpanel/AccessibleFieldTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,6 +39,7 @@ public class AccessibleFieldTest extends AbstractGenericTest { private static final int FIELD_WIDTH = 75; private JPanel parent = new JPanel() { + @Override public Point getLocationOnScreen() { return new Point(PARENT_X, PARENT_Y); } diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ServerConnectTask.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ServerConnectTask.java index b1da86b4cd..c14e328eb8 100644 --- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ServerConnectTask.java +++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ServerConnectTask.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -368,6 +368,7 @@ class ServerConnectTask extends Task { super(host, port); } + @Override public void connect(SocketAddress endpoint) throws IOException { connect(endpoint, LIVENESS_CHECK_TIMEOUT_MS); } diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/GhidraPrincipal.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/GhidraPrincipal.java index de27c0797e..7b37d87b0f 100644 --- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/GhidraPrincipal.java +++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/GhidraPrincipal.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,6 +41,7 @@ public class GhidraPrincipal implements Principal, java.io.Serializable { /* * @see java.security.Principal#getName() */ + @Override public String getName() { return username; } diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/FileSystemInitializer.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/FileSystemInitializer.java index 61e8f004b6..4658686256 100644 --- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/FileSystemInitializer.java +++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/FileSystemInitializer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +19,8 @@ import ghidra.framework.ModuleInitializer; import ghidra.framework.store.db.PackedDatabase; public class FileSystemInitializer implements ModuleInitializer { - public void run() { + @Override + public void run() { PackedDatabase.cleanupOldTempDatabases(); diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/LocalDataFileHandle.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/LocalDataFileHandle.java index e2ba7005dc..5719ea55aa 100644 --- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/LocalDataFileHandle.java +++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/LocalDataFileHandle.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,6 +43,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#read(byte[]) */ + @Override public void read(byte[] b) throws IOException { raf.readFully(b); } @@ -51,6 +51,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#read(byte[], int, int) */ + @Override public void read(byte[] b, int off, int len) throws IOException { raf.readFully(b, off, len); } @@ -58,6 +59,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#skipBytes(int) */ + @Override public int skipBytes(int n) throws IOException { return raf.skipBytes(n); } @@ -65,6 +67,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#write(int) */ + @Override public void write(int b) throws IOException { raf.write(b); } @@ -72,6 +75,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#write(byte[]) */ + @Override public void write(byte[] b) throws IOException { raf.write(b); } @@ -79,6 +83,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#write(byte[], int, int) */ + @Override public void write(byte[] b, int off, int len) throws IOException { raf.write(b, off, len); } @@ -86,6 +91,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#seek(long) */ + @Override public void seek(long pos) throws IOException { raf.seek(pos); } @@ -93,6 +99,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#length() */ + @Override public long length() throws IOException { return raf.length(); } @@ -100,6 +107,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#setLength(long) */ + @Override public void setLength(long newLength) throws IOException { raf.setLength(newLength); } @@ -107,6 +115,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#close() */ + @Override public void close() throws IOException { raf.close(); } @@ -114,6 +123,7 @@ public class LocalDataFileHandle implements DataFileHandle { /* * @see ghidra.framework.store.DataFileHandle#isReadOnly() */ + @Override public boolean isReadOnly() throws IOException { return readOnly; } diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/UnknownFolderItem.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/UnknownFolderItem.java index d1ec4f62d7..c630e32ae3 100644 --- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/UnknownFolderItem.java +++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/UnknownFolderItem.java @@ -157,6 +157,7 @@ public class UnknownFolderItem extends LocalFolderItem { /* * @see ghidra.framework.store.FolderItem#output(java.io.File, int, ghidra.util.task.TaskMonitor) */ + @Override public void output(File outputFile, int version, TaskMonitor monitor) throws IOException { throw new UnsupportedOperationException("Output not supported for UnknownFolderItems"); @@ -174,6 +175,7 @@ public class UnknownFolderItem extends LocalFolderItem { /* * @see ghidra.framework.store.FolderItem#getCurrentVersion() */ + @Override public int getCurrentVersion() { return -1; } @@ -181,6 +183,7 @@ public class UnknownFolderItem extends LocalFolderItem { /* * @see ghidra.framework.store.FolderItem#canRecover() */ + @Override public boolean canRecover() { return false; } diff --git a/Ghidra/Framework/Generic/src/main/java/generic/json/Json.java b/Ghidra/Framework/Generic/src/main/java/generic/json/Json.java index 263e1916fc..ea742c5dfe 100644 --- a/Ghidra/Framework/Generic/src/main/java/generic/json/Json.java +++ b/Ghidra/Framework/Generic/src/main/java/generic/json/Json.java @@ -218,6 +218,7 @@ public class Json extends ToStringStyle { * @param includeFieldNamesParam the names * @return this builder */ + @Override public ReflectionToStringBuilder setIncludeFieldNames(String... includeFieldNamesParam) { if (includeFieldNamesParam == null) { this.includedNames = new String[0]; diff --git a/Ghidra/Framework/Generic/src/main/java/generic/stl/EmptyIteratorSTL.java b/Ghidra/Framework/Generic/src/main/java/generic/stl/EmptyIteratorSTL.java index 85ef9d551b..98aee535cf 100644 --- a/Ghidra/Framework/Generic/src/main/java/generic/stl/EmptyIteratorSTL.java +++ b/Ghidra/Framework/Generic/src/main/java/generic/stl/EmptyIteratorSTL.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,6 +18,7 @@ package generic.stl; public class EmptyIteratorSTL implements IteratorSTL { + @Override public IteratorSTL copy() { return this; } @@ -31,38 +31,47 @@ public class EmptyIteratorSTL implements IteratorSTL { throw new UnsupportedOperationException(); } + @Override public T get() { return null; } + @Override public IteratorSTL increment() { throw new IndexOutOfBoundsException(); } + @Override public IteratorSTL decrement() { throw new IndexOutOfBoundsException(); } + @Override public void insert( T value ) { throw new UnsupportedOperationException(); } + @Override public boolean isBegin() { return true; } + @Override public boolean isEnd() { return true; } + @Override public void set( T value ) { throw new UnsupportedOperationException(); } + @Override public IteratorSTL decrement( int n ) { throw new UnsupportedOperationException(); } + @Override public IteratorSTL increment( int n ) { throw new UnsupportedOperationException(); } @@ -75,6 +84,7 @@ public class EmptyIteratorSTL implements IteratorSTL { return true; } + @Override public void assign( IteratorSTL otherIterator ) { throw new UnsupportedOperationException(); } diff --git a/Ghidra/Framework/Generic/src/main/java/generic/stl/ListIterator.java b/Ghidra/Framework/Generic/src/main/java/generic/stl/ListIterator.java index 9d799fa795..c243e6602d 100644 --- a/Ghidra/Framework/Generic/src/main/java/generic/stl/ListIterator.java +++ b/Ghidra/Framework/Generic/src/main/java/generic/stl/ListIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,25 +28,30 @@ public class ListIterator implements IteratorSTL { this.node = node; } + @Override public void assign( IteratorSTL otherIterator ) { ListIterator other = (ListIterator)otherIterator; this.list = other.list; this.root = other.root; this.node = other.node; } + @Override public IteratorSTL copy() { return new ListIterator( list, root, node ); } + @Override public boolean isBegin() { return node == root.next; } + @Override public boolean isEnd() { return node == root; } + @Override public IteratorSTL decrement() { if (node.prev == root) { throw new IndexOutOfBoundsException(); @@ -55,6 +60,7 @@ public class ListIterator implements IteratorSTL { return this; } + @Override public T get() { if (node == root) { throw new IndexOutOfBoundsException(); @@ -62,20 +68,24 @@ public class ListIterator implements IteratorSTL { return node.value; } + @Override public IteratorSTL increment() { node = node.next; return this; } + @Override public IteratorSTL increment(int count) { for(int i=0;i decrement( int n ) { throw new UnsupportedOperationException(); } + @Override public void insert(T value) { ListNodeSTL newNode = new ListNodeSTL(node.prev, node, value); node.prev.next = newNode; @@ -84,6 +94,7 @@ public class ListIterator implements IteratorSTL { list.adjustSize(1); } + @Override public void set(T value) { if (root == node) { throw new IndexOutOfBoundsException(); diff --git a/Ghidra/Framework/Generic/src/main/java/generic/stl/MapIteratorSTL.java b/Ghidra/Framework/Generic/src/main/java/generic/stl/MapIteratorSTL.java index 4a59ac5b6e..e91beadd4c 100644 --- a/Ghidra/Framework/Generic/src/main/java/generic/stl/MapIteratorSTL.java +++ b/Ghidra/Framework/Generic/src/main/java/generic/stl/MapIteratorSTL.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,12 +32,14 @@ public class MapIteratorSTL implements IteratorSTL> { this.node = node; } + @Override public void assign( IteratorSTL> otherIterator ) { MapIteratorSTL other = (MapIteratorSTL)otherIterator; this.tree = other.tree; this.node = other.node; this.erased = other.erased; } + @Override public IteratorSTL> decrement() { if (node == null && tree.isEmpty()) { throw new IndexOutOfBoundsException(); @@ -53,6 +54,7 @@ public class MapIteratorSTL implements IteratorSTL> { return this; } + @Override public Pair get() { if (erased) { throw new IndexOutOfBoundsException("element erased"); @@ -64,6 +66,7 @@ public class MapIteratorSTL implements IteratorSTL> { return new Pair(node.getKey(), node.getValue()); } + @Override public IteratorSTL> increment() { if (!erased && node == null) { throw new IndexOutOfBoundsException(); @@ -75,10 +78,12 @@ public class MapIteratorSTL implements IteratorSTL> { return this; } + @Override public void insert(Pair value) { throw new UnsupportedOperationException(); } + @Override public boolean isBegin() { if (erased) { throw new RuntimeException("Iterater in invalid state"); @@ -86,6 +91,7 @@ public class MapIteratorSTL implements IteratorSTL> { return node == tree.getFirst(); } + @Override public boolean isEnd() { if (erased) { throw new RuntimeException("Iterater in invalid state"); @@ -93,16 +99,20 @@ public class MapIteratorSTL implements IteratorSTL> { return node == null; } + @Override public void set(Pair value) { throw new UnsupportedOperationException(); } + @Override public IteratorSTL> copy() { return new MapIteratorSTL(tree, node); } + @Override public IteratorSTL> decrement( int n ) { throw new UnsupportedOperationException(); } + @Override public IteratorSTL> increment( int n ) { throw new UnsupportedOperationException(); } diff --git a/Ghidra/Framework/Generic/src/main/java/generic/stl/SetIterator.java b/Ghidra/Framework/Generic/src/main/java/generic/stl/SetIterator.java index b01952e934..7aa1a90978 100644 --- a/Ghidra/Framework/Generic/src/main/java/generic/stl/SetIterator.java +++ b/Ghidra/Framework/Generic/src/main/java/generic/stl/SetIterator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,16 +31,19 @@ public class SetIterator implements IteratorSTL { this.node = node; this.erased = erased; } + @Override public void assign( IteratorSTL otherIterator ) { SetIterator other = (SetIterator) otherIterator; this.tree = other.tree; this.node = other.node; this.erased = other.erased; } + @Override public IteratorSTL copy() { return new SetIterator( tree, node, erased); } + @Override public IteratorSTL decrement() { if (node == null && tree.isEmpty()) { throw new IndexOutOfBoundsException(); @@ -56,6 +58,7 @@ public class SetIterator implements IteratorSTL { return this; } + @Override public T get() { if (erased) { throw new IndexOutOfBoundsException("element erased"); @@ -66,6 +69,7 @@ public class SetIterator implements IteratorSTL { return node.getKey(); } + @Override public IteratorSTL increment() { if (!erased && node == null) { throw new IndexOutOfBoundsException(); @@ -77,10 +81,12 @@ public class SetIterator implements IteratorSTL { return this; } + @Override public void insert(T value) { throw new UnsupportedOperationException(); } + @Override public boolean isBegin() { if (erased) { throw new RuntimeException("Iterater in invalid state"); @@ -88,6 +94,7 @@ public class SetIterator implements IteratorSTL { return node == tree.getFirst(); } + @Override public boolean isEnd() { if (erased) { throw new RuntimeException("Iterater in invalid state"); @@ -95,6 +102,7 @@ public class SetIterator implements IteratorSTL { return node == null; } + @Override public void set(T value) { throw new UnsupportedOperationException(); } @@ -117,9 +125,11 @@ public class SetIterator implements IteratorSTL { public int hashCode() { return tree.hashCode(); } + @Override public IteratorSTL decrement( int n ) { throw new UnsupportedOperationException(); } + @Override public IteratorSTL increment( int n ) { throw new UnsupportedOperationException(); } diff --git a/Ghidra/Framework/Generic/src/main/java/generic/stl/VectorIterator.java b/Ghidra/Framework/Generic/src/main/java/generic/stl/VectorIterator.java index e34c18f4cd..d9220fcaac 100644 --- a/Ghidra/Framework/Generic/src/main/java/generic/stl/VectorIterator.java +++ b/Ghidra/Framework/Generic/src/main/java/generic/stl/VectorIterator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,21 +32,26 @@ public class VectorIterator implements IteratorSTL { return "VectorIterator: [index=" + index + " - " + value + "]"; } + @Override public void assign( IteratorSTL otherIterator ) { VectorIterator other = (VectorIterator) otherIterator; this.index = other.index; this.data = other.data; } + @Override public boolean isBegin() { return index == 0; } + @Override public boolean isEnd() { return index >= data.size(); } + @Override public T get() { return data.get(index); } + @Override public void set(T value) { data.set(index, value); } @@ -56,6 +60,7 @@ public class VectorIterator implements IteratorSTL { return data.get(index+offset); } + @Override public IteratorSTL decrement() { if (index == 0) { throw new IndexOutOfBoundsException(); @@ -65,6 +70,7 @@ public class VectorIterator implements IteratorSTL { } + @Override public IteratorSTL increment() { if (index >= data.size()) { throw new IndexOutOfBoundsException(); @@ -73,6 +79,7 @@ public class VectorIterator implements IteratorSTL { return this; } + @Override public IteratorSTL increment(int count) { if (index+count > data.size()) { throw new IndexOutOfBoundsException(); @@ -80,6 +87,7 @@ public class VectorIterator implements IteratorSTL { index += count; return this; } + @Override public IteratorSTL decrement(int count) { if (index-count < 0) { throw new IndexOutOfBoundsException(); @@ -89,6 +97,7 @@ public class VectorIterator implements IteratorSTL { } + @Override public void insert(T value) { data.add(index, value); } @@ -112,6 +121,7 @@ public class VectorIterator implements IteratorSTL { public int hashCode() { return data.hashCode(); } + @Override public IteratorSTL copy() { return new VectorIterator(data, index); } diff --git a/Ghidra/Framework/Generic/src/main/java/generic/timer/GhidraSwinglessTimer.java b/Ghidra/Framework/Generic/src/main/java/generic/timer/GhidraSwinglessTimer.java index 67472ad139..efc6ebe4e0 100644 --- a/Ghidra/Framework/Generic/src/main/java/generic/timer/GhidraSwinglessTimer.java +++ b/Ghidra/Framework/Generic/src/main/java/generic/timer/GhidraSwinglessTimer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -114,6 +114,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { * Returns the delay for all callbacks after the first callback. * @return the delay for all callbacks after the first callback. */ + @Override public int getDelay() { return delay; } @@ -122,6 +123,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { * Returns the delay for the first callback. * @return the delay for the first callback. */ + @Override public int getInitialDelay() { return initialDelay; } @@ -130,6 +132,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { * Returns true if this timer is set to repeating. * @return true if this timer is set to repeating. */ + @Override public boolean isRepeats() { return repeats; } @@ -137,6 +140,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { /** * Sets the delay for all callbacks after the first callback */ + @Override public synchronized void setDelay(int delay) { this.delay = delay; if (isRunning()) { @@ -148,6 +152,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { /** * Sets the delay for the first callbacks. */ + @Override public synchronized void setInitialDelay(int initialDelay) { this.initialDelay = initialDelay; } @@ -156,6 +161,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { * Sets whether this timer repeats. * @param repeats if true, the timer will repeat, if false the timer will only fire once. */ + @Override public synchronized void setRepeats(boolean repeats) { this.repeats = repeats; } @@ -163,6 +169,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { /** * Sets the callback to be called when the timer fires. */ + @Override public synchronized void setTimerCallback(TimerCallback callback) { this.callback = callback; } @@ -170,6 +177,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { /** * Starts the timer. */ + @Override public synchronized void start() { if (timerTask != null) { return; @@ -182,6 +190,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { /** * Stops the timer. */ + @Override public synchronized void stop() { if (timerTask != null) { timerTask.cancel(); @@ -193,6 +202,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { /** * Returns true if the timer is running. */ + @Override public synchronized boolean isRunning() { return timerTask != null; } @@ -228,6 +238,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { TimerCallback callback1 = new TimerCallback() { int i = 0; + @Override public void timerFired() { System.out.println("A: "+i); if (++i == 20) { @@ -242,6 +253,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { TimerCallback callback2 = new TimerCallback() { int i = 0; + @Override public void timerFired() { System.out.println("B: "+i); if (++i == 100) { @@ -266,6 +278,7 @@ public class GhidraSwinglessTimer implements GhidraTimer { TimerCallback callback3 = new TimerCallback() { int i = 0; + @Override public void timerFired() { System.out.println("C: "+i); if (++i == 100) { diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/ShutdownHookRegistry.java b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/ShutdownHookRegistry.java index 13f0394535..651dc5d772 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/ShutdownHookRegistry.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/ShutdownHookRegistry.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -55,6 +55,7 @@ public class ShutdownHookRegistry { return; } Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { + @Override public void run() { notifyHooks(); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/LongIterator.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/LongIterator.java index 4af91f0bec..8f728408cb 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/LongIterator.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/LongIterator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,15 +24,19 @@ public interface LongIterator { * A default implementation of LongIterator that has no values. */ public final static LongIterator EMPTY = new LongIterator() { + @Override public boolean hasNext() { return false; } + @Override public long next() { return 0; } + @Override public boolean hasPrevious() { return false; } + @Override public long previous() { return 0; } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BitTree.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BitTree.java index 3fad67bdae..1342756c4d 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BitTree.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BitTree.java @@ -110,7 +110,8 @@ public class BitTree implements ShortKeySet, Serializable { /** * Removes all keys from the set. */ - public void removeAll() { + @Override + public void removeAll() { Arrays.fill(bits,0); numKeys = 0; } @@ -118,7 +119,8 @@ public class BitTree implements ShortKeySet, Serializable { /** * Returns the number of keys currently in the set. */ - public int size() { + @Override + public int size() { return numKeys; } @@ -128,7 +130,8 @@ public class BitTree implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException if the given key is not * in the range [0, size-1]. */ - public void put(short key) { + @Override + public void put(short key) { if ((key < 0) || (key >= size)) { throw new IndexOutOfBoundsException(); @@ -165,7 +168,8 @@ public class BitTree implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException if the given key is not * in the range [0, size-1]. */ - public boolean remove(short key) { + @Override + public boolean remove(short key) { if ((key < 0) || (key >= size)) { throw new IndexOutOfBoundsException(); @@ -204,7 +208,8 @@ public class BitTree implements ShortKeySet, Serializable { * @param key the key to check if it is in this set. * @return true if the key is in the set. */ - public boolean containsKey(short key) { + @Override + public boolean containsKey(short key) { if ((key < 0) || (key >= size)) { return false; } @@ -219,7 +224,8 @@ public class BitTree implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException if the given key is not * in the range [0, size-1]. */ - public short getNext(short key) { + @Override + public short getNext(short key) { if ((key < 0) || (key >= size)) { throw new IndexOutOfBoundsException(); } @@ -278,7 +284,8 @@ public class BitTree implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException if the given key is not * in the range [0, size-1]. */ - public short getPrevious(short key) { + @Override + public short getPrevious(short key) { if ((key < 0) || (key >= size)) { throw new IndexOutOfBoundsException(); } @@ -323,14 +330,16 @@ public class BitTree implements ShortKeySet, Serializable { * Checks if the set is empty. * @return true if the set is empty. */ - public boolean isEmpty() { + @Override + public boolean isEmpty() { return numKeys == 0; } /** * Returns the first (lowest) key in the set. */ - public short getFirst() { + @Override + public short getFirst() { // if the 0 key is in the set, then return it. if(containsKey((short)0)) { return (short)0; @@ -342,7 +351,8 @@ public class BitTree implements ShortKeySet, Serializable { /** * Returns the last (highest) key in the set. */ - public short getLast() { + @Override + public short getLast() { // if the highest possible key is in the set, return it. if(containsKey((short)(size-1))) { return (short)(size-1); diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BooleanArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BooleanArray.java index 039a9dfb0c..4fc6a29e9f 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BooleanArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/BooleanArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -88,7 +87,8 @@ public class BooleanArray implements Array, Serializable { /** Sets the value at the given index to 0. * @param index the index to set to 0. */ - public void remove(int index) { + @Override + public void remove(int index) { put(index,false); } /** Returns the boolean at the given index @@ -123,7 +123,8 @@ public class BooleanArray implements Array, Serializable { /** * Returns the index of the last non-null or non-zero element in the array. */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastNonZeroIndex; } @@ -131,7 +132,8 @@ public class BooleanArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, ghidra.util.datastruct.DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putBoolean(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ByteArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ByteArray.java index b7b570cd15..142c455a6f 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ByteArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ByteArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -63,7 +62,8 @@ public class ByteArray implements Array, Serializable { * @param index the index to set to 0. * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { if (index >= bytes.length) { return; } @@ -122,7 +122,8 @@ public class ByteArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastNonZeroIndex; } @@ -130,7 +131,8 @@ public class ByteArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putByte(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ByteArrayArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ByteArrayArray.java index a95f3401a9..acfbbc0302 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ByteArrayArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ByteArrayArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -106,7 +105,8 @@ public class ByteArrayArray implements Array, Serializable { * @param index index of the array to be removed * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { try { if (starts[index] > 0) { totalSpaceAllocated -= lengths[index]; @@ -212,14 +212,16 @@ public class ByteArrayArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastStart; } /** * * @see ghidra.util.datastruct.Array#copyDataTo(int, DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putByteArray(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/DoubleArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/DoubleArray.java index 0db6c03af9..0044b9bad0 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/DoubleArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/DoubleArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,7 +61,8 @@ public class DoubleArray implements Array, Serializable { * @param index the index to set to 0. * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { if (index >= doubles.length) { return; } @@ -121,7 +121,8 @@ public class DoubleArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastNonZeroIndex; } @@ -129,7 +130,8 @@ public class DoubleArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putDouble(toIndex, toCol, get(index)); } } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/DoubleArrayArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/DoubleArrayArray.java index 0fc906b916..54860d2009 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/DoubleArrayArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/DoubleArrayArray.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -107,7 +107,8 @@ public class DoubleArrayArray implements Array, Serializable { /** Removes the array at the given index * @param index index of the array to be removed */ - public void remove(int index) { + @Override + public void remove(int index) { try { if (starts[index] > 0) { totalSpaceAllocated -= lengths[index]; @@ -213,7 +214,8 @@ public class DoubleArrayArray implements Array, Serializable { /** * Returns the index of the last non-null or non-zero element in the array. */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastStart; } @@ -221,7 +223,8 @@ public class DoubleArrayArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putDoubleArray(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArray.java index 655b54470c..0682206b1e 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,7 +61,8 @@ public class FloatArray implements Array, Serializable { * @param index the index to set to 0. * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { if (index >= floats.length) { return; } @@ -120,14 +120,16 @@ public class FloatArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastNonZeroIndex; } /** * * @see ghidra.util.datastruct.Array#copyDataTo(int, DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putFloat(toIndex, toCol, get(index)); } } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArrayArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArrayArray.java index 13ec3cef69..d93b144d2b 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArrayArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArrayArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -110,7 +109,8 @@ public class FloatArrayArray implements Array, Serializable { * @param index index of the array to be removed * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { try { if (starts[index] > 0) { totalSpaceAllocated -= lengths[index]; @@ -215,7 +215,8 @@ public class FloatArrayArray implements Array, Serializable { /** * Returns the index of the last non-null or non-zero element in the array. */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastStart; } @@ -223,7 +224,8 @@ public class FloatArrayArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putFloatArray(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FullKeySet.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FullKeySet.java index 64f260db9d..43bca00f8c 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FullKeySet.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FullKeySet.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,7 +37,8 @@ public class FullKeySet implements ShortKeySet, Serializable { /** * Returns the number of keys currently in the set. */ - public int size() { + @Override + public int size() { return numKeys; } @@ -45,7 +46,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#containsKey(short) */ - public boolean containsKey(short key) { + @Override + public boolean containsKey(short key) { if ((key >= 0) &&(key < numKeys)) { return true; } @@ -56,7 +58,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#getFirst() */ - public short getFirst() { + @Override + public short getFirst() { return (short)0; } @@ -64,7 +67,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#getLast() */ - public short getLast() { + @Override + public short getLast() { return (short)(numKeys-1); } @@ -72,7 +76,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#put(short) */ - public void put(short key) { + @Override + public void put(short key) { if ((key < 0) || (key >= numKeys)) { throw new IndexOutOfBoundsException(); } @@ -82,7 +87,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#remove(short) */ - public boolean remove(short key) { + @Override + public boolean remove(short key) { if ((key < 0) || (key >= numKeys)) { throw new IndexOutOfBoundsException(); } @@ -94,7 +100,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#removeAll() */ - public void removeAll() { + @Override + public void removeAll() { throw new UnsupportedOperationException(); } @@ -102,7 +109,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#getNext(short) */ - public short getNext(short key) { + @Override + public short getNext(short key) { if ((key < 0) || (key >= numKeys)) { throw new IndexOutOfBoundsException(); } @@ -116,7 +124,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#getPrevious(short) */ - public short getPrevious(short key) { + @Override + public short getPrevious(short key) { if ((key < 0) || (key >= numKeys)) { throw new IndexOutOfBoundsException(); } @@ -130,7 +139,8 @@ public class FullKeySet implements ShortKeySet, Serializable { * * @see ghidra.util.datastruct.ShortKeySet#isEmpty() */ - public boolean isEmpty() { + @Override + public boolean isEmpty() { return false; } } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntArray.java index f150af39e8..39af6182b4 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,7 +61,8 @@ public class IntArray implements Array, Serializable { * @param index the index to set to 0. * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { if (index >= ints.length) { return; } @@ -119,14 +119,16 @@ public class IntArray implements Array, Serializable { /** * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastNonZeroIndex; } /** * @see ghidra.util.datastruct.Array#copyDataTo(int, DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putInt(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntArrayArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntArrayArray.java index 7088f8d951..e7a99b38ac 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntArrayArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntArrayArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -106,7 +105,8 @@ public class IntArrayArray implements Array, Serializable { * @param index index of the array to be removed * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { try { if (starts[index] > 0) { totalSpaceAllocated -= lengths[index]; @@ -211,14 +211,16 @@ public class IntArrayArray implements Array, Serializable { /** * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastStart; } /** * @see ghidra.util.datastruct.Array#copyDataTo(int, ghidra.util.datastruct.DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putIntArray(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArray.java index fcab88123c..d832185b1d 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -65,7 +64,8 @@ public class LongArray implements Array, Serializable { * @param index the index to set to 0. * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { if (index >= longs.length) { return; } @@ -124,7 +124,8 @@ public class LongArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastNonZeroIndex; } @@ -132,7 +133,8 @@ public class LongArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, ghidra.util.datastruct.DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putLong(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArrayArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArrayArray.java index 54b507ae41..c65afcfb3a 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArrayArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongArrayArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -111,7 +110,8 @@ public class LongArrayArray implements Array, Serializable { * @param index index of the array to be removed * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { try { if (starts[index] > 0) { totalSpaceAllocated -= lengths[index]; @@ -217,14 +217,16 @@ public class LongArrayArray implements Array, Serializable { /** * Returns the index of the last non-null or non-zero element in the array. */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastStart; } /** * * @see ghidra.util.datastruct.Array#copyDataTo(int, ghidra.util.datastruct.DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putLongArray(toIndex, toCol, get(index)); } } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectArray.java index dc170893a4..c36fc23404 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -66,7 +65,8 @@ public class ObjectArray implements Array, Serializable { * @param index the index to set to null. * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { if (index >= objs.length) { return; } @@ -125,14 +125,16 @@ public class ObjectArray implements Array, Serializable { /** * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastNonZeroIndex; } /** * @see ghidra.util.datastruct.Array#copyDataTo(int, ghidra.util.datastruct.DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putObject(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectRangeMap.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectRangeMap.java index 36c89613d3..bea72f859c 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectRangeMap.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectRangeMap.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -270,10 +270,12 @@ public class ObjectRangeMap { class SimpleIndexRangeIterator implements IndexRangeIterator { int pos = 0; + @Override public boolean hasNext() { return pos < ranges.size(); } + @Override public IndexRange next() { ObjectValueRange valueRange = ranges.get(pos++); return new IndexRange(valueRange.getStart(), valueRange.getEnd()); @@ -308,10 +310,12 @@ public class ObjectRangeMap { } } + @Override public boolean hasNext() { return nextRange != null; } + @Override public IndexRange next() { IndexRange retRange = nextRange; if (nextRange != null) { diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectValueRange.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectValueRange.java index b34df6f872..f90d7dbed3 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectValueRange.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ObjectValueRange.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -64,6 +64,7 @@ public class ObjectValueRange implements Comparable> { /** * @see java.lang.Comparable#compareTo(java.lang.Object) */ + @Override public int compareTo(ObjectValueRange otherRange) { if (start < otherRange.start) { return -1; diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/PropertySetIndexRangeIterator.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/PropertySetIndexRangeIterator.java index 49b4f78668..391618cd35 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/PropertySetIndexRangeIterator.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/PropertySetIndexRangeIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,14 +41,16 @@ public class PropertySetIndexRangeIterator implements IndexRangeIterator { /** * @see ghidra.util.datastruct.IndexRangeIterator#hasNext() */ - public boolean hasNext() { + @Override + public boolean hasNext() { return indexRange != null; } /** * @see ghidra.util.datastruct.IndexRangeIterator#next() */ - public IndexRange next() { + @Override + public IndexRange next() { IndexRange temp = indexRange; getNextIndexRange(); return temp; diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/RedBlackKeySet.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/RedBlackKeySet.java index 761ca911d2..0dd7a0c924 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/RedBlackKeySet.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/RedBlackKeySet.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,6 +59,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { /** * Returns the number keys in this set. */ + @Override public int size() { return size; } @@ -69,6 +70,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException thrown if the given key is not * in the range [0, maxKey]. */ + @Override public boolean containsKey(short key) { if ((key < 0) || (key > maxKey)) { throw new IndexOutOfBoundsException(); @@ -92,6 +94,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { /** * Returns the first key in this set. */ + @Override public short getFirst() { if (root == null) { return -1; @@ -107,6 +110,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { /** * Returns the last key in this set. */ + @Override public short getLast() { if (root == null) { return -1; @@ -127,6 +131,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException thrown if the given key is not * in the range [0, maxKey]. */ + @Override public short getNext(short key) { if ((key < 0) || (key > maxKey)) { throw new IndexOutOfBoundsException(); @@ -161,6 +166,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException thrown if the given key is not * in the range [0, maxKey]. */ + @Override public short getPrevious(short key) { if ((key < 0) || (key > maxKey)) { throw new IndexOutOfBoundsException(); @@ -193,6 +199,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException thrown if the given key is not * in the range [0, maxKey]. */ + @Override public void put(short key) { if ((key < 0) || (key > maxKey)) { throw new IndexOutOfBoundsException(); @@ -239,6 +246,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { * @exception IndexOutOfBoundsException thrown if the given key is not * in the range [0, maxKey]. */ + @Override public boolean remove(short key) { if ((key < 0) || (key > maxKey)) { throw new IndexOutOfBoundsException(); @@ -268,6 +276,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { /** * Removes all keys from the set. */ + @Override public void removeAll() { size = 0; root = null; @@ -277,6 +286,7 @@ public class RedBlackKeySet implements ShortKeySet, Serializable { * Test if the set is empty. *@return true if the set is empty. */ + @Override public boolean isEmpty() { return size == 0; } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArray.java index 33a7d7d017..3163934a09 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -65,7 +64,8 @@ public class ShortArray implements Array, Serializable { * @param index the index to set to 0. * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { if (index >= shorts.length) { return; } @@ -124,7 +124,8 @@ public class ShortArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#getLastNonEmptyIndex() */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastNonZeroIndex; } @@ -132,7 +133,8 @@ public class ShortArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, ghidra.util.datastruct.DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putShort(toIndex, toCol, get(index)); } } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArrayArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArrayArray.java index 0e0b81e655..d0c41cf246 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArrayArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArrayArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -110,7 +109,8 @@ public class ShortArrayArray implements Array, Serializable { * @param index index of the array to be removed * @throws IndexOutOfBoundsException if the index is negative */ - public void remove(int index) { + @Override + public void remove(int index) { try { if (starts[index] > 0) { totalSpaceAllocated -= lengths[index]; @@ -215,7 +215,8 @@ public class ShortArrayArray implements Array, Serializable { /** * Returns the index of the last non-null or non-zero element in the array. */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastStart; } @@ -223,7 +224,8 @@ public class ShortArrayArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, ghidra.util.datastruct.DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putShortArray(toIndex, toCol, get(index)); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringArray.java index 932370851f..5be0267f1b 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -109,7 +108,8 @@ public class StringArray implements Array, Serializable { /** Removes the string at the given index * @param index index of the string to be removed */ - public void remove(int index) { + @Override + public void remove(int index) { try { if (starts[index] > 0) { totalSpaceAllocated -= lengths[index]; @@ -216,7 +216,8 @@ public class StringArray implements Array, Serializable { /** * Returns the index of the last non-null or non-zero element in the array. */ - public int getLastNonEmptyIndex() { + @Override + public int getLastNonEmptyIndex() { return lastStart; } @@ -224,7 +225,8 @@ public class StringArray implements Array, Serializable { * * @see ghidra.util.datastruct.Array#copyDataTo(int, ghidra.util.datastruct.DataTable, int, int) */ - public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { + @Override + public void copyDataTo(int index, DataTable table, int toIndex, int toCol) { table.putString(toIndex, toCol, get(index)); } } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringArrayArray.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringArrayArray.java index e4d87a7a9b..feb058e906 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringArrayArray.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringArrayArray.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -62,6 +61,7 @@ public class StringArrayArray implements Array, Serializable { /** * @see Array#copyDataTo(int, DataTable, int, int) */ + @Override public void copyDataTo(int index, DataTable table, int toIndex, @@ -73,6 +73,7 @@ public class StringArrayArray implements Array, Serializable { /** * @see Array#getLastNonEmptyIndex() */ + @Override public int getLastNonEmptyIndex() { return byteStore.getLastNonEmptyIndex(); } @@ -80,6 +81,7 @@ public class StringArrayArray implements Array, Serializable { /** * @see Array#remove(int) */ + @Override public void remove(int index) { byteStore.remove(index); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringKeyIndexer.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringKeyIndexer.java index 471737ca05..f1ed1683e3 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringKeyIndexer.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/StringKeyIndexer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -235,6 +235,7 @@ public class StringKeyIndexer implements Serializable { /* (non-Javadoc) * @see java.util.Iterator#hasNext() */ + @Override public boolean hasNext() { return nextKey != null; } @@ -242,7 +243,8 @@ public class StringKeyIndexer implements Serializable { /* (non-Javadoc) * @see java.util.Iterator#next() */ - public String next() { + @Override + public String next() { if (hasNext()) { String result = nextKey; findNext(); @@ -254,7 +256,8 @@ public class StringKeyIndexer implements Serializable { /* (non-Javadoc) * @see java.util.Iterator#remove() */ - public void remove() { + @Override + public void remove() { throw new UnsupportedOperationException(); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/exception/MultipleCauses.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/exception/MultipleCauses.java index 0d2834a4f9..9727b82334 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/exception/MultipleCauses.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/exception/MultipleCauses.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -119,6 +119,7 @@ public class MultipleCauses extends Throwable { /** * Use addCause instead */ + @Override public synchronized Throwable initCause(Throwable cause) { throw new UnsupportedOperationException("Use addCause instead"); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/map/LongIteratorImpl.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/map/LongIteratorImpl.java index db07c3fcff..67be9d4f81 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/map/LongIteratorImpl.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/map/LongIteratorImpl.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -82,7 +82,8 @@ class LongIteratorImpl implements LongIterator { /** * Returns true if the iterator has more indexes. */ - public boolean hasNext(){ + @Override + public boolean hasNext(){ if (doesHaveNext) { return true; @@ -93,7 +94,8 @@ class LongIteratorImpl implements LongIterator { /** * Returns the next index in the iterator. */ - public long next() { + @Override + public long next() { if (hasNext()) { doesHaveNext = false; doesHavePrevious = true; @@ -105,7 +107,8 @@ class LongIteratorImpl implements LongIterator { /** * Return true if the iterator has a previous index. */ - public boolean hasPrevious() { + @Override + public boolean hasPrevious() { if (doesHavePrevious) { return true; } @@ -116,7 +119,8 @@ class LongIteratorImpl implements LongIterator { /** * Returns the previous index in the iterator. */ - public long previous() { + @Override + public long previous() { if (hasPrevious()) { doesHavePrevious = false; doesHaveNext = true; diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/map/ObjectStorageAdapter.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/map/ObjectStorageAdapter.java index 59fa7801da..1865d14b29 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/map/ObjectStorageAdapter.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/map/ObjectStorageAdapter.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,6 +39,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putInt(int) */ + @Override public void putInt(int value) { table.putInt(row, col++, value); } @@ -46,6 +47,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putByte(byte) */ + @Override public void putByte(byte value) { table.putByte(row, col++, value); } @@ -53,6 +55,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putShort(short) */ + @Override public void putShort(short value) { table.putShort(row, col++, value); } @@ -60,6 +63,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putLong(long) */ + @Override public void putLong(long value) { table.putLong(row, col++, value); } @@ -67,6 +71,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putString(String) */ + @Override public void putString(String value) { table.putString(row, col++, value); } @@ -74,6 +79,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putBoolean(boolean) */ + @Override public void putBoolean(boolean value) { table.putBoolean(row, col++, value); } @@ -81,6 +87,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putFloat(float) */ + @Override public void putFloat(float value) { table.putFloat(row, col++, value); } @@ -88,6 +95,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putDouble(double) */ + @Override public void putDouble(double value) { table.putDouble(row, col++, value); } @@ -95,6 +103,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getInt() */ + @Override public int getInt() { return table.getInt(row, col++); } @@ -102,6 +111,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getByte() */ + @Override public byte getByte() { return table.getByte(row, col++); } @@ -109,6 +119,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getShort() */ + @Override public short getShort() { return table.getShort(row, col++); } @@ -116,6 +127,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getLong() */ + @Override public long getLong() { return table.getLong(row, col++); } @@ -123,6 +135,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getBoolean() */ + @Override public boolean getBoolean() { return table.getBoolean(row, col++); } @@ -130,6 +143,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getString() */ + @Override public String getString() { return table.getString(row, col++); } @@ -137,6 +151,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getFloat() */ + @Override public float getFloat() { return table.getFloat(row, col++); } @@ -144,6 +159,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getDouble() */ + @Override public double getDouble() { return table.getDouble(row, col++); } @@ -151,6 +167,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putInts(int[]) */ + @Override public void putInts(int[] value) { table.putIntArray(row, col++, value); } @@ -158,6 +175,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putBytes(byte[]) */ + @Override public void putBytes(byte[] value) { table.putByteArray(row, col++, value); } @@ -165,6 +183,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putShorts(short[]) */ + @Override public void putShorts(short[] value) { table.putShortArray(row, col++, value); } @@ -172,6 +191,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putLongs(long[]) */ + @Override public void putLongs(long[] value) { table.putLongArray(row, col++, value); } @@ -179,6 +199,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putFloats(float[]) */ + @Override public void putFloats(float[] value) { table.putFloatArray(row, col++, value); } @@ -186,6 +207,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putDoubles(double[]) */ + @Override public void putDoubles(double[] value) { table.putDoubleArray(row, col++, value); } @@ -193,6 +215,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getInts() */ + @Override public int[] getInts() { return table.getIntArray(row, col++); } @@ -200,6 +223,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getBytes() */ + @Override public byte[] getBytes() { return table.getByteArray(row, col++); } @@ -207,6 +231,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getShorts() */ + @Override public short[] getShorts() { return table.getShortArray(row, col++); } @@ -214,6 +239,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getLongs() */ + @Override public long[] getLongs() { return table.getLongArray(row, col++); } @@ -222,6 +248,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getFloats() */ + @Override public float[] getFloats() { return table.getFloatArray(row, col++); } @@ -229,6 +256,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getDoubles() */ + @Override public double[] getDoubles() { return table.getDoubleArray(row, col++); } @@ -236,6 +264,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#getStrings() */ + @Override public String[] getStrings() { return table.getStringArray(row, col++); } @@ -243,6 +272,7 @@ public class ObjectStorageAdapter implements ObjectStorage { /** * @see ObjectStorage#putStrings(String[]) */ + @Override public void putStrings(String[] value) { table.putStringArray(row, col++, value); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/xml/SpecXmlUtils.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/xml/SpecXmlUtils.java index 58d7b92187..68deccdb15 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/xml/SpecXmlUtils.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/xml/SpecXmlUtils.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -231,14 +231,17 @@ public class SpecXmlUtils { public static ErrorHandler getXmlHandler() { return new ErrorHandler() { + @Override public void error(SAXParseException exception) throws SAXException { throw new SAXException("Error: "+exception); } + @Override public void fatalError(SAXParseException exception) throws SAXException { throw new SAXException("Fatal error: "+exception); } + @Override public void warning(SAXParseException exception) throws SAXException { throw new SAXException("Warning: "+exception); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/xml/XmlTreeNode.java b/Ghidra/Framework/Generic/src/main/java/ghidra/xml/XmlTreeNode.java index 92ab2cee90..db5f3489cf 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/xml/XmlTreeNode.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/xml/XmlTreeNode.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -139,10 +138,12 @@ public class XmlTreeNode { nextNode = null; } + @Override public void remove() { it.remove(); } + @Override public boolean hasNext() { if (nextNode == null) { findNext(); @@ -150,6 +151,7 @@ public class XmlTreeNode { return nextNode != null; } + @Override public XmlTreeNode next() { if (hasNext()) { XmlTreeNode node = nextNode; diff --git a/Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/VertexShape.java b/Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/VertexShape.java index fdae41ecec..0666ef5225 100644 --- a/Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/VertexShape.java +++ b/Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/VertexShape.java @@ -157,6 +157,7 @@ public abstract class VertexShape { super("Rectangle", size); } + @Override protected Shape createShape() { return new Rectangle2D.Double(-1.0, -1.0, 2.0, 2.0); } @@ -168,6 +169,7 @@ public abstract class VertexShape { super("Ellipse", size); } + @Override protected Shape createShape() { return new Ellipse2D.Double(-1.0, -1.0, 2.0, 2.0); } @@ -184,6 +186,7 @@ public abstract class VertexShape { super("Triangle Up", size); } + @Override protected Shape createShape() { Path2D path = new Path2D.Double(); path.moveTo(-1.0, 1.0); @@ -209,6 +212,7 @@ public abstract class VertexShape { super("Triangle Down", size); } + @Override protected Shape createShape() { Path2D path = new Path2D.Double(); path.moveTo(-1.0, -1.0); @@ -235,6 +239,7 @@ public abstract class VertexShape { super("Star", size); } + @Override protected Shape createShape() { int numPoints = 7; Path2D path = new Path2D.Double(); @@ -264,6 +269,7 @@ public abstract class VertexShape { super("Diamond", size); } + @Override protected Shape createShape() { Path2D path = new Path2D.Double(); path.moveTo(0.0, -1.0); @@ -291,6 +297,7 @@ public abstract class VertexShape { this.startAngle = startAngle; } + @Override protected Shape createShape() { Path2D path = new Path2D.Double(); diff --git a/Ghidra/Framework/Gui/src/main/java/generic/theme/laf/MacLookAndFeelManager.java b/Ghidra/Framework/Gui/src/main/java/generic/theme/laf/MacLookAndFeelManager.java index 278038b09f..3851d4bd56 100644 --- a/Ghidra/Framework/Gui/src/main/java/generic/theme/laf/MacLookAndFeelManager.java +++ b/Ghidra/Framework/Gui/src/main/java/generic/theme/laf/MacLookAndFeelManager.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -103,6 +103,7 @@ public class MacLookAndFeelManager extends LookAndFeelManager { this.selectedMenuBacgroundColor = color; } + @Override public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { g.setColor(selectedMenuBacgroundColor); g.fillRect(x, y, width, height); diff --git a/Ghidra/Framework/Gui/src/main/java/ghidra/util/filechooser/GhidraFileFilter.java b/Ghidra/Framework/Gui/src/main/java/ghidra/util/filechooser/GhidraFileFilter.java index f16ba2905a..f1eb642daf 100644 --- a/Ghidra/Framework/Gui/src/main/java/ghidra/util/filechooser/GhidraFileFilter.java +++ b/Ghidra/Framework/Gui/src/main/java/ghidra/util/filechooser/GhidraFileFilter.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,10 +28,12 @@ public interface GhidraFileFilter { * A default implementation that shows all files. */ public final static GhidraFileFilter ALL = new GhidraFileFilter() { - public String getDescription() { + @Override + public String getDescription() { return "All Files (*.*)"; } - public boolean accept(File pathname, GhidraFileChooserModel model) { + @Override + public boolean accept(File pathname, GhidraFileChooserModel model) { return true; } }; diff --git a/Ghidra/Framework/Gui/src/main/java/ghidra/util/layout/VariableHeightPairLayout.java b/Ghidra/Framework/Gui/src/main/java/ghidra/util/layout/VariableHeightPairLayout.java index ef9cb35396..93e7a2deed 100644 --- a/Ghidra/Framework/Gui/src/main/java/ghidra/util/layout/VariableHeightPairLayout.java +++ b/Ghidra/Framework/Gui/src/main/java/ghidra/util/layout/VariableHeightPairLayout.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,16 +58,19 @@ public class VariableHeightPairLayout implements LayoutManager { /** * @see LayoutManager#addLayoutComponent(String, Component) */ + @Override public void addLayoutComponent(String name, Component comp) {} /** * @see LayoutManager#removeLayoutComponent(Component) */ + @Override public void removeLayoutComponent(Component comp) {} /** * @see LayoutManager#preferredLayoutSize(Container) */ + @Override public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(0,0); Insets insets = parent.getInsets(); @@ -93,6 +95,7 @@ public class VariableHeightPairLayout implements LayoutManager { /** * @see LayoutManager#minimumLayoutSize(Container) */ + @Override public Dimension minimumLayoutSize(Container parent) { return preferredLayoutSize(parent); } @@ -100,6 +103,7 @@ public class VariableHeightPairLayout implements LayoutManager { /** * @see LayoutManager#layoutContainer(Container) */ + @Override public void layoutContainer(Container parent) { int[] widths = getPreferredWidths(parent); Dimension d = parent.getSize(); diff --git a/Ghidra/Framework/Gui/src/main/java/resources/icons/BytesImageIcon.java b/Ghidra/Framework/Gui/src/main/java/resources/icons/BytesImageIcon.java index 35702038bb..30f2557720 100644 --- a/Ghidra/Framework/Gui/src/main/java/resources/icons/BytesImageIcon.java +++ b/Ghidra/Framework/Gui/src/main/java/resources/icons/BytesImageIcon.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,6 +34,7 @@ public class BytesImageIcon extends LazyImageIcon { this.bytes = Objects.requireNonNull(imageBytes); } + @Override protected ImageIcon createImageIcon() { String name = getFilename(); Image image = createImage(); diff --git a/Ghidra/Framework/Gui/src/main/java/resources/icons/ColorIcon3D.java b/Ghidra/Framework/Gui/src/main/java/resources/icons/ColorIcon3D.java index 9ffd2a646d..6f2c48cbaa 100644 --- a/Ghidra/Framework/Gui/src/main/java/resources/icons/ColorIcon3D.java +++ b/Ghidra/Framework/Gui/src/main/java/resources/icons/ColorIcon3D.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,10 +36,12 @@ public class ColorIcon3D implements Icon { this.height = height; } + @Override public int getIconHeight() { return height; } + @Override public int getIconWidth() { return width; } @@ -48,6 +49,7 @@ public class ColorIcon3D implements Icon { return color; } + @Override public void paintIcon(Component c, Graphics g, int x, int y) { Color startColor = g.getColor(); g.setColor(getColor()); diff --git a/Ghidra/Framework/Gui/src/main/java/resources/icons/DerivedImageIcon.java b/Ghidra/Framework/Gui/src/main/java/resources/icons/DerivedImageIcon.java index 5605b28b69..b6683132c5 100644 --- a/Ghidra/Framework/Gui/src/main/java/resources/icons/DerivedImageIcon.java +++ b/Ghidra/Framework/Gui/src/main/java/resources/icons/DerivedImageIcon.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -58,6 +58,7 @@ public class DerivedImageIcon extends LazyImageIcon { return sourceIcon; } + @Override protected boolean sourceIconChanged() { if (sourceIcon instanceof GIcon gIcon) { if (cachedDelegate != gIcon.getDelegate()) { @@ -68,6 +69,7 @@ public class DerivedImageIcon extends LazyImageIcon { return false; } + @Override protected ImageIcon createImageIcon() { Image image = createImage(); String imageName = getFilename(); diff --git a/Ghidra/Framework/Gui/src/main/java/resources/icons/EmptyIcon.java b/Ghidra/Framework/Gui/src/main/java/resources/icons/EmptyIcon.java index 220170db42..12af9db96d 100644 --- a/Ghidra/Framework/Gui/src/main/java/resources/icons/EmptyIcon.java +++ b/Ghidra/Framework/Gui/src/main/java/resources/icons/EmptyIcon.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,14 +31,17 @@ public class EmptyIcon implements Icon { this.height = height; } + @Override public int getIconHeight() { return height; } + @Override public int getIconWidth() { return width; } + @Override public void paintIcon(Component c, Graphics g, int x, int y) { // no-op } diff --git a/Ghidra/Framework/Gui/src/main/java/resources/icons/OvalBackgroundColorIcon.java b/Ghidra/Framework/Gui/src/main/java/resources/icons/OvalBackgroundColorIcon.java index 36afec8734..6207090715 100644 --- a/Ghidra/Framework/Gui/src/main/java/resources/icons/OvalBackgroundColorIcon.java +++ b/Ghidra/Framework/Gui/src/main/java/resources/icons/OvalBackgroundColorIcon.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,15 +34,18 @@ public class OvalBackgroundColorIcon implements Icon { this.height = height; } - public int getIconHeight() { + @Override + public int getIconHeight() { return height; } - public int getIconWidth() { + @Override + public int getIconWidth() { return width; } - public void paintIcon( Component c, Graphics g, int x, int y ) { + @Override + public void paintIcon( Component c, Graphics g, int x, int y ) { if ( c == null ) { return; } diff --git a/Ghidra/Framework/Gui/src/main/java/resources/icons/OvalColorIcon.java b/Ghidra/Framework/Gui/src/main/java/resources/icons/OvalColorIcon.java index bcbe317a92..a0d3cf7f21 100644 --- a/Ghidra/Framework/Gui/src/main/java/resources/icons/OvalColorIcon.java +++ b/Ghidra/Framework/Gui/src/main/java/resources/icons/OvalColorIcon.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,15 +32,18 @@ public class OvalColorIcon implements Icon { } - public int getIconHeight() { + @Override + public int getIconHeight() { return height; } - public int getIconWidth() { + @Override + public int getIconWidth() { return width; } - public void paintIcon( Component c, Graphics g, int x, int y ) { + @Override + public void paintIcon( Component c, Graphics g, int x, int y ) { g.setColor( color ); g.fillOval( x, y, width, height ); } diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/ProjectInitializer.java b/Ghidra/Framework/Project/src/main/java/ghidra/ProjectInitializer.java index 52a4cef4c5..b569c22e37 100644 --- a/Ghidra/Framework/Project/src/main/java/ghidra/ProjectInitializer.java +++ b/Ghidra/Framework/Project/src/main/java/ghidra/ProjectInitializer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,6 +18,7 @@ package ghidra; import ghidra.framework.ModuleInitializer; public class ProjectInitializer implements ModuleInitializer { + @Override public void run() { // Register "ghidra" URL protocol Handler diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/ZoomedImagePainter.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/ZoomedImagePainter.java index 14e0800f5c..0ce8a8a079 100644 --- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/ZoomedImagePainter.java +++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/ZoomedImagePainter.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -46,7 +45,8 @@ public class ZoomedImagePainter implements GGlassPanePainter { this.image = image; } - public void paint( GGlassPane glassPane, Graphics g ) { + @Override + public void paint( GGlassPane glassPane, Graphics g ) { if ( image == null || targetBounds == null ) { return; } diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/datatree/VersionInfoTransferable.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/datatree/VersionInfoTransferable.java index 9f35ed35e6..a5823ae3ff 100644 --- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/datatree/VersionInfoTransferable.java +++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/datatree/VersionInfoTransferable.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -64,6 +63,7 @@ public class VersionInfoTransferable implements Transferable, ClipboardOwner { /* (non-Javadoc) * @see java.awt.datatransfer.Transferable#getTransferDataFlavors() */ + @Override public DataFlavor[] getTransferDataFlavors() { return flavors; } @@ -71,6 +71,7 @@ public class VersionInfoTransferable implements Transferable, ClipboardOwner { /* (non-Javadoc) * @see java.awt.datatransfer.Transferable#isDataFlavorSupported(java.awt.datatransfer.DataFlavor) */ + @Override public boolean isDataFlavorSupported(DataFlavor flavor) { return flavorList.contains(flavor); } @@ -78,6 +79,7 @@ public class VersionInfoTransferable implements Transferable, ClipboardOwner { /* (non-Javadoc) * @see java.awt.datatransfer.Transferable#getTransferData(java.awt.datatransfer.DataFlavor) */ + @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (flavor.equals(localVersionInfoFlavor)) { @@ -89,6 +91,7 @@ public class VersionInfoTransferable implements Transferable, ClipboardOwner { /* (non-Javadoc) * @see java.awt.datatransfer.ClipboardOwner#lostOwnership(java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable) */ + @Override public void lostOwnership(Clipboard clipboard, Transferable contents) { } /** diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/OpenFileDropHandlerFactory.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/OpenFileDropHandlerFactory.java index bf1018ed78..b85abf6138 100644 --- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/OpenFileDropHandlerFactory.java +++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/OpenFileDropHandlerFactory.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,7 +36,8 @@ class OpenFileDropHandlerFactory implements DropTargetFactory { } - public DropTargetHandler createDropTargetHandler( Component component ) { + @Override + public DropTargetHandler createDropTargetHandler( Component component ) { return new FileOpenDropHandler( tool, component ); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/generic/Constant.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/generic/Constant.java index 7506e44aa9..04eb569edc 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/generic/Constant.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/generic/Constant.java @@ -24,6 +24,8 @@ public class Constant implements ExpressionValue { val = v; } + @Override public long longValue(MemBuffer buf, int off) { return val; } + @Override public int length(MemBuffer buf, int off) { return 0; } } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/generic/Label.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/generic/Label.java index a696f7169c..806f090638 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/generic/Label.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/generic/Label.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,10 +29,12 @@ public class Label implements ExpressionValue { public Label() {} + @Override public long longValue(MemBuffer buf, int off) { return buf.getAddress().getOffset() + off; } + @Override public int length(MemBuffer buf, int off) { return 0;} } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/sleighbase/address_set.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/sleighbase/address_set.java index 6ffe1a82a3..da6b5d23ab 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/sleighbase/address_set.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/sleighbase/address_set.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,6 +28,7 @@ public class address_set extends SetSTL{ } class VarnodeSymbolCompare implements Comparator { + @Override public int compare( VarnodeSymbol op1, VarnodeSymbol op2 ) { return op1.getFixedVarnode().compareTo(op2.getFixedVarnode()); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/DirectoryVisitor.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/DirectoryVisitor.java index cdcab314a4..db1b523b37 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/DirectoryVisitor.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/DirectoryVisitor.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -70,7 +70,8 @@ public class DirectoryVisitor implements Iterable { this.compareCase = compareCase; } - public Iterator iterator() { + @Override + public Iterator iterator() { return new BreadthFirstDirectoryVisitor(startingDirectories, directoryFilter, filter, compareCase); } @@ -82,19 +83,22 @@ public class DirectoryVisitor implements Iterable { private final Comparator comparator; private static final Comparator CASE_SENSITIVE = new Comparator() { - public int compare(File o1, File o2) { + @Override + public int compare(File o1, File o2) { return o1.getName().compareTo(o2.getName()); } }; private static final Comparator CASE_INSENSITIVE = new Comparator() { - public int compare(File o1, File o2) { + @Override + public int compare(File o1, File o2) { return o1.getName().compareToIgnoreCase(o2.getName()); } }; private static final FileFilter DIRECTORIES = new FileFilter() { - public boolean accept(File pathname) { + @Override + public boolean accept(File pathname) { return pathname.isDirectory(); } }; @@ -104,7 +108,8 @@ public class DirectoryVisitor implements Iterable { boolean compareCase) { this.directoryFilter = directoryFilter == null ? DIRECTORIES : new FileFilter() { - public boolean accept(File pathname) { + @Override + public boolean accept(File pathname) { return pathname.isDirectory() && directoryFilter.accept(pathname); } @@ -147,17 +152,20 @@ public class DirectoryVisitor implements Iterable { } } - public boolean hasNext() { + @Override + public boolean hasNext() { ensureNextFileIsPresentInQueue(); return !fileQueue.isEmpty(); } - public File next() { + @Override + public File next() { ensureNextFileIsPresentInQueue(); return fileQueue.removeFirst(); } - public void remove() { + @Override + public void remove() { throw new UnsupportedOperationException(); } } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/SleighCompilePreprocessorDefinitionsAdapater.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/SleighCompilePreprocessorDefinitionsAdapater.java index 5ab9197dfb..9b4f3a9aab 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/SleighCompilePreprocessorDefinitionsAdapater.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/SleighCompilePreprocessorDefinitionsAdapater.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,15 +26,18 @@ public class SleighCompilePreprocessorDefinitionsAdapater implements this.sleighCompile = sleighCompile; } - public Pair lookup(String key) { + @Override + public Pair lookup(String key) { return sleighCompile.getPreprocValue(key); } - public void set(String key, String value) { + @Override + public void set(String key, String value) { sleighCompile.setPreprocValue(key, value); } - public void undefine(String key) { + @Override + public void undefine(String key) { sleighCompile.undefinePreprocValue(key); } } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slghsymbol/SymbolTree.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slghsymbol/SymbolTree.java index 3ce7c3a05b..4cd436486a 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slghsymbol/SymbolTree.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slghsymbol/SymbolTree.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,6 +27,7 @@ public class SymbolTree extends SetSTL{ } class SymbolCompare implements Comparator { + @Override public int compare( SleighSymbol o1, SleighSymbol o2 ) { return o1.getName().compareTo(o2.getName()); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CommentsDBAdapterV0.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CommentsDBAdapterV0.java index b2961aa84d..e29f37dd5a 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CommentsDBAdapterV0.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CommentsDBAdapterV0.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -238,6 +238,7 @@ class CommentsDBAdapterV0 extends CommentsDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#delete() */ + @Override public boolean delete() throws IOException { return false; } @@ -245,6 +246,7 @@ class CommentsDBAdapterV0 extends CommentsDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#hasNext() */ + @Override public boolean hasNext() throws IOException { return it.hasNext(); } @@ -252,6 +254,7 @@ class CommentsDBAdapterV0 extends CommentsDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#hasPrevious() */ + @Override public boolean hasPrevious() throws IOException { return it.hasPrevious(); } @@ -259,6 +262,7 @@ class CommentsDBAdapterV0 extends CommentsDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#next() */ + @Override public DBRecord next() throws IOException { DBRecord rec = it.next(); return adaptRecord(rec); @@ -267,6 +271,7 @@ class CommentsDBAdapterV0 extends CommentsDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#previous() */ + @Override public DBRecord previous() throws IOException { DBRecord rec = it.previous(); return adaptRecord(rec); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataFilteredCodeUnitIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataFilteredCodeUnitIterator.java index e5dee97474..b22cffbad0 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataFilteredCodeUnitIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataFilteredCodeUnitIterator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +35,7 @@ public class DataFilteredCodeUnitIterator implements DataIterator { /** * @see java.util.Iterator#remove() */ + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -43,6 +43,7 @@ public class DataFilteredCodeUnitIterator implements DataIterator { /** * @see ghidra.program.model.listing.DataIterator#hasNext() */ + @Override public boolean hasNext() { if (nextData == null) { findNext(); @@ -53,6 +54,7 @@ public class DataFilteredCodeUnitIterator implements DataIterator { /** * @see ghidra.program.model.listing.DataIterator#next() */ + @Override public Data next() { if (hasNext()) { Data ret = nextData; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataKeyIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataKeyIterator.java index c8873e0255..75947b3eff 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataKeyIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataKeyIterator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -48,6 +47,7 @@ public class DataKeyIterator implements DataIterator { /** * @see java.util.Iterator#remove() */ + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -55,6 +55,7 @@ public class DataKeyIterator implements DataIterator { /** * @see ghidra.program.model.listing.CodeUnitIterator#hasNext() */ + @Override public boolean hasNext() { if (nextCu == null) { findNext(); @@ -65,6 +66,7 @@ public class DataKeyIterator implements DataIterator { /** * @see ghidra.program.model.listing.CodeUnitIterator#next() */ + @Override public Data next() { if (hasNext()) { Data ret = nextCu; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataRecordIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataRecordIterator.java index d6a9461ad4..8a2a393f3f 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataRecordIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataRecordIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -48,6 +48,7 @@ public class DataRecordIterator implements DataIterator { /** * @see java.util.Iterator#remove() */ + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -55,6 +56,7 @@ public class DataRecordIterator implements DataIterator { /** * @see ghidra.program.model.listing.CodeUnitIterator#hasNext() */ + @Override public boolean hasNext() { if (nextData == null) { findNext(); @@ -65,6 +67,7 @@ public class DataRecordIterator implements DataIterator { /** * @see ghidra.program.model.listing.CodeUnitIterator#next() */ + @Override public Data next() { if (hasNext()) { Data ret = nextData; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/InstDBAdapterV0.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/InstDBAdapterV0.java index 4dfc15b36d..3bed65c830 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/InstDBAdapterV0.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/InstDBAdapterV0.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -225,6 +225,7 @@ class InstDBAdapterV0 extends InstDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#delete() */ + @Override public boolean delete() throws IOException { return false; } @@ -232,6 +233,7 @@ class InstDBAdapterV0 extends InstDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#hasNext() */ + @Override public boolean hasNext() throws IOException { return it.hasNext(); } @@ -239,6 +241,7 @@ class InstDBAdapterV0 extends InstDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#hasPrevious() */ + @Override public boolean hasPrevious() throws IOException { return it.hasPrevious(); } @@ -246,6 +249,7 @@ class InstDBAdapterV0 extends InstDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#next() */ + @Override public DBRecord next() throws IOException { DBRecord rec = it.next(); return adaptRecord(rec); @@ -254,6 +258,7 @@ class InstDBAdapterV0 extends InstDBAdapter { /** * @see ghidra.framework.store.db.RecordIterator#previous() */ + @Override public DBRecord previous() throws IOException { DBRecord rec = it.previous(); return adaptRecord(rec); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/ProtoDBAdapterV0.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/ProtoDBAdapterV0.java index 04172f633f..299cb1face 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/ProtoDBAdapterV0.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/ProtoDBAdapterV0.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,6 +41,7 @@ class ProtoDBAdapterV0 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getVersion() */ + @Override public int getVersion() { return 0; } @@ -60,6 +61,7 @@ class ProtoDBAdapterV0 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#createRecord(int, byte[]) */ + @Override public void createRecord(int protoID, long addr, byte[] b, boolean inDelaySlot) throws IOException { throw new UnsupportedOperationException("Cannot create records with old schema"); @@ -68,6 +70,7 @@ class ProtoDBAdapterV0 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#deleteAll() */ + @Override public void deleteAll() { throw new UnsupportedOperationException(); } @@ -75,6 +78,7 @@ class ProtoDBAdapterV0 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getKey() */ + @Override public long getKey() throws IOException { return table.getKey(); } @@ -82,6 +86,7 @@ class ProtoDBAdapterV0 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getNumRecords() */ + @Override public int getNumRecords() throws IOException { return table.getRecordCount(); } @@ -89,6 +94,7 @@ class ProtoDBAdapterV0 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getRecord(int) */ + @Override public DBRecord getRecord(int protoId) throws IOException { return convertRecord(table.getRecord(protoId)); } @@ -107,6 +113,7 @@ class ProtoDBAdapterV0 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getRecords() */ + @Override public RecordIterator getRecords() throws IOException { return new RecordUpdateIterator(table.iterator()); } @@ -118,22 +125,27 @@ class ProtoDBAdapterV0 implements ProtoDBAdapter { this.it = it; } + @Override public boolean delete() throws IOException { throw new UnsupportedOperationException(); } + @Override public boolean hasNext() throws IOException { return it.hasNext(); } + @Override public boolean hasPrevious() throws IOException { return it.hasPrevious(); } + @Override public DBRecord next() throws IOException { return convertRecord(it.next()); } + @Override public DBRecord previous() throws IOException { DBRecord rec = it.previous(); long key = rec.getKey(); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/ProtoDBAdapterV1.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/ProtoDBAdapterV1.java index 3e2cb10c4c..8f7d246691 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/ProtoDBAdapterV1.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/ProtoDBAdapterV1.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +36,7 @@ class ProtoDBAdapterV1 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getVersion() */ + @Override public int getVersion() { return 1; } @@ -43,6 +44,7 @@ class ProtoDBAdapterV1 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getNumRecords() */ + @Override public int getNumRecords() throws IOException { return table.getRecordCount(); } @@ -62,6 +64,7 @@ class ProtoDBAdapterV1 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#createRecord(int, byte[]) */ + @Override public void createRecord(int protoID, long addr, byte[] b, boolean inDelaySlot) throws IOException { @@ -75,6 +78,7 @@ class ProtoDBAdapterV1 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getKey() */ + @Override public long getKey() throws IOException { return table.getKey(); } @@ -82,6 +86,7 @@ class ProtoDBAdapterV1 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getRecord(int) */ + @Override public DBRecord getRecord(int protoId) throws IOException { return table.getRecord(protoId); } @@ -89,6 +94,7 @@ class ProtoDBAdapterV1 implements ProtoDBAdapter { /** * @see ghidra.program.database.code.ProtoDBAdapter#getRecords() */ + @Override public RecordIterator getRecords() throws IOException { return table.iterator(); } @@ -96,6 +102,7 @@ class ProtoDBAdapterV1 implements ProtoDBAdapter { /**s * @see ghidra.program.database.code.ProtoDBAdapter#deleteAll() */ + @Override public void deleteAll() throws IOException { table.deleteAll(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDBAdapterV0.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDBAdapterV0.java index 7d481edce2..a5266b6271 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDBAdapterV0.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDBAdapterV0.java @@ -61,6 +61,7 @@ class CompositeDBAdapterV0 extends CompositeDBAdapter implements RecordTranslato } } + @Override int getVersion() { return compositeTable.getSchema().getVersion(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDBAdapterV1.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDBAdapterV1.java index ce4ffcb2f8..4b83f7ff31 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDBAdapterV1.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDBAdapterV1.java @@ -67,6 +67,7 @@ class CompositeDBAdapterV1 extends CompositeDBAdapter implements RecordTranslato } } + @Override int getVersion() { return compositeTable.getSchema().getVersion(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapterV0.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapterV0.java index 2eba78eef1..7408a27e42 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapterV0.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapterV0.java @@ -80,6 +80,7 @@ class EnumValueDBAdapterV0 extends EnumValueDBAdapter { return table.findRecords(new LongField(enumID), ENUMVAL_ID_COL); } + @Override void deleteTable(DBHandle handle) throws IOException { handle.deleteTable(ENUM_VALUE_TABLE_NAME); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapterV1.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapterV1.java index 1739cfeab7..88d723b498 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapterV1.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapterV1.java @@ -98,6 +98,7 @@ class EnumValueDBAdapterV1 extends EnumValueDBAdapter { return table.iterator(); } + @Override void deleteTable(DBHandle handle) throws IOException { handle.deleteTable(table.getName()); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/SourceArchiveDB.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/SourceArchiveDB.java index cbc1c60130..14c4ed9ea5 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/SourceArchiveDB.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/SourceArchiveDB.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -46,6 +46,7 @@ public class SourceArchiveDB extends DatabaseObject implements SourceArchive { * Gets the ID that the program has associated with the data type archive. * @return the data type archive ID */ + @Override public UniversalID getSourceArchiveID() { if (isLocal()) { // if this sourceArchive represents the local archive (id == LOCAL_ARCHIVE_KEY) @@ -67,6 +68,7 @@ public class SourceArchiveDB extends DatabaseObject implements SourceArchive { * Gets the ID used to uniquely identify the domain file for the data type archive. * @return the domain file identifier */ + @Override public String getDomainFileID() { if (isLocal()) { return dtMgr.getDomainFileID(); @@ -79,6 +81,7 @@ public class SourceArchiveDB extends DatabaseObject implements SourceArchive { * (PROGRAM_TYPE, PROJECT_TYPE, FILE_TYPE) * @return the type */ + @Override public ArchiveType getArchiveType() { if (isLocal()) { return dtMgr.getType(); @@ -87,6 +90,7 @@ public class SourceArchiveDB extends DatabaseObject implements SourceArchive { return ArchiveType.values()[byteValue]; } + @Override public String getName() { if (isLocal()) { return dtMgr.getName(); @@ -109,14 +113,17 @@ public class SourceArchiveDB extends DatabaseObject implements SourceArchive { return false; } + @Override public long getLastSyncTime() { return record.getLongValue(SourceArchiveAdapter.ARCHIVE_ID_LAST_SYNC_TIME_COL); } + @Override public boolean isDirty() { return record.getBooleanValue(SourceArchiveAdapter.ARCHIVE_ID_DIRTY_FLAG_COL); } + @Override public void setLastSyncTime(long syncTime) { lock.acquire(); try { @@ -133,6 +140,7 @@ public class SourceArchiveDB extends DatabaseObject implements SourceArchive { } } + @Override public void setDirtyFlag(boolean isDirty) { lock.acquire(); try { @@ -149,6 +157,7 @@ public class SourceArchiveDB extends DatabaseObject implements SourceArchive { } } + @Override public void setName(String newName) { if (getName().equals(newName)) { return; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/SourceArchiveUpgradeMap.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/SourceArchiveUpgradeMap.java index 745a69d886..07659a4563 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/SourceArchiveUpgradeMap.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/SourceArchiveUpgradeMap.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -95,36 +95,45 @@ public class SourceArchiveUpgradeMap { archiveName = ""; } + @Override public ArchiveType getArchiveType() { return ArchiveType.FILE; } + @Override public String getDomainFileID() { return null; } + @Override public long getLastSyncTime() { return 0; } + @Override public String getName() { return archiveName; } + @Override public UniversalID getSourceArchiveID() { return id; } + @Override public boolean isDirty() { return false; } + @Override public void setDirtyFlag(boolean dirty) { } + @Override public void setLastSyncTime(long time) { } + @Override public void setName(String name) { } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/oldfunction/OldFunctionDBAdapterV0.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/oldfunction/OldFunctionDBAdapterV0.java index 9737493968..478f1cb7a3 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/oldfunction/OldFunctionDBAdapterV0.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/oldfunction/OldFunctionDBAdapterV0.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -113,23 +113,28 @@ class OldFunctionDBAdapterV0 extends OldFunctionDBAdapter { this.it = it; } + @Override public boolean delete() throws IOException { throw new UnsupportedOperationException(); } + @Override public boolean hasNext() throws IOException { return it.hasNext(); } + @Override public boolean hasPrevious() throws IOException { return it.hasPrevious(); } + @Override public DBRecord next() throws IOException { DBRecord rec = it.next(); return translate(rec); } + @Override public DBRecord previous() throws IOException { DBRecord rec = it.previous(); return translate(rec); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/ShiftedReferenceDB.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/ShiftedReferenceDB.java index 5b07e4f3c6..4d225cb453 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/ShiftedReferenceDB.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/ShiftedReferenceDB.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,6 +30,7 @@ class ShiftedReferenceDB extends MemReferenceDB implements ShiftedReference { /** * @see ghidra.program.model.symbol.ShiftedReference#getShift() */ + @Override public int getShift() { return (int) offsetOrShift; } @@ -37,6 +38,7 @@ class ShiftedReferenceDB extends MemReferenceDB implements ShiftedReference { /** * @see ghidra.program.model.symbol.ShiftedReference#getValue() */ + @Override public long getValue() { return toAddr.getOffset() >> (int) offsetOrShift; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/StackReferenceDB.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/StackReferenceDB.java index 9eb7a1ebb7..ecf9589d73 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/StackReferenceDB.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/StackReferenceDB.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,6 +29,7 @@ class StackReferenceDB extends MemReferenceDB implements StackReference { /** * @see ghidra.program.model.symbol.StackReference#getStackOffset() */ + @Override public int getStackOffset() { return (int) toAddr.getOffset(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/register/IndexToAddressRangeIteratorAdapter.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/register/IndexToAddressRangeIteratorAdapter.java index 09b77dace8..1f0568d66e 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/register/IndexToAddressRangeIteratorAdapter.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/register/IndexToAddressRangeIteratorAdapter.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,10 +37,12 @@ public class IndexToAddressRangeIteratorAdapter implements AddressRangeIterator this.it = it; } + @Override public Iterator iterator() { return this; } + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -49,6 +50,7 @@ public class IndexToAddressRangeIteratorAdapter implements AddressRangeIterator /** * @see ghidra.program.model.address.AddressRangeIterator#hasNext() */ + @Override public boolean hasNext() { return it.hasNext(); } @@ -56,6 +58,7 @@ public class IndexToAddressRangeIteratorAdapter implements AddressRangeIterator /** * @see ghidra.program.model.address.AddressRangeIterator#next() */ + @Override public AddressRange next() { IndexRange indexRange = it.next(); Address start = map.decodeAddress(indexRange.getStart()); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/EquateRefDB.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/EquateRefDB.java index 00a6513cb3..10f4691c07 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/EquateRefDB.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/EquateRefDB.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -60,17 +60,20 @@ class EquateRefDB extends DatabaseObject implements EquateReference { return record.getLongValue(EquateRefDBAdapter.EQUATE_ID_COL); } + @Override public Address getAddress() { checkIsValid(); long addr = record.getLongValue(EquateRefDBAdapter.ADDR_COL); return addrMap.decodeAddress(addr); } + @Override public short getOpIndex() { checkIsValid(); return record.getShortValue(EquateRefDBAdapter.OP_INDEX_COL); } + @Override public long getDynamicHashValue() { checkIsValid(); return record.getLongValue(EquateRefDBAdapter.HASH_COL); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/LibraryDB.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/LibraryDB.java index 11426af7aa..70a0d0acee 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/LibraryDB.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/LibraryDB.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,6 +43,7 @@ class LibraryDB implements Library { /** * @see ghidra.program.model.symbol.Namespace#getSymbol() */ + @Override public Symbol getSymbol() { return symbol; } @@ -50,6 +51,7 @@ class LibraryDB implements Library { /** * @see ghidra.program.model.symbol.Namespace#getName() */ + @Override public String getName() { return symbol.getName(); } @@ -57,6 +59,7 @@ class LibraryDB implements Library { /** * @see ghidra.program.model.symbol.Namespace#getID() */ + @Override public long getID() { return symbol.getID(); } @@ -64,6 +67,7 @@ class LibraryDB implements Library { /** * @see ghidra.program.model.symbol.Namespace#getParentNamespace() */ + @Override public Namespace getParentNamespace() { return symbol.getParentNamespace(); } @@ -71,6 +75,7 @@ class LibraryDB implements Library { /** * @see ghidra.program.model.symbol.Namespace#getBody() */ + @Override public AddressSetView getBody() { return namespaceMgr.getAddressSet(this); } @@ -78,6 +83,7 @@ class LibraryDB implements Library { /** * @see ghidra.program.model.symbol.Namespace#getName(boolean) */ + @Override public String getName(boolean includeNamespacePath) { return symbol.getName(includeNamespacePath); } @@ -101,6 +107,7 @@ class LibraryDB implements Library { /** * @see ghidra.program.model.symbol.Namespace#setParentNamespace(ghidra.program.model.symbol.Namespace) */ + @Override public void setParentNamespace(Namespace parentNamespace) throws DuplicateNameException, InvalidInputException, CircularDependencyException { symbol.setNamespace(parentNamespace); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/NamespaceDB.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/NamespaceDB.java index aff7af0610..454c07a534 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/NamespaceDB.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/NamespaceDB.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,6 +44,7 @@ class NamespaceDB implements Namespace { /** * @see ghidra.program.model.symbol.Namespace#getSymbol() */ + @Override public Symbol getSymbol() { return symbol; } @@ -52,6 +52,7 @@ class NamespaceDB implements Namespace { /** * @see ghidra.program.model.symbol.Namespace#getName() */ + @Override public String getName() { return symbol.getName(); } @@ -59,6 +60,7 @@ class NamespaceDB implements Namespace { /** * @see ghidra.program.model.symbol.Namespace#getID() */ + @Override public long getID() { return symbol.getID(); } @@ -66,6 +68,7 @@ class NamespaceDB implements Namespace { /** * @see ghidra.program.model.symbol.Namespace#getParentNamespace() */ + @Override public Namespace getParentNamespace() { return symbol.getParentNamespace(); } @@ -73,6 +76,7 @@ class NamespaceDB implements Namespace { /** * @see ghidra.program.model.symbol.Namespace#getBody() */ + @Override public AddressSetView getBody() { return namespaceMgr.getAddressSet(this); } @@ -80,6 +84,7 @@ class NamespaceDB implements Namespace { /** * @see ghidra.program.model.symbol.Namespace#getName(boolean) */ + @Override public String getName(boolean includeNamespacePath) { return symbol.getName(includeNamespacePath); } @@ -103,6 +108,7 @@ class NamespaceDB implements Namespace { /** * @see ghidra.program.model.symbol.Namespace#setParentNamespace(ghidra.program.model.symbol.Namespace) */ + @Override public void setParentNamespace(Namespace parentNamespace) throws DuplicateNameException, InvalidInputException, CircularDependencyException { symbol.setNamespace(parentNamespace); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/TypeFilteredSymbolIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/TypeFilteredSymbolIterator.java index edf11fe631..c3d54c214d 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/TypeFilteredSymbolIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/TypeFilteredSymbolIterator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,6 +40,7 @@ public class TypeFilteredSymbolIterator implements SymbolIterator { /** * @see ghidra.program.model.symbol.SymbolIterator#hasNext() */ + @Override public boolean hasNext() { if (nextSymbol != null) { return true; @@ -51,6 +51,7 @@ public class TypeFilteredSymbolIterator implements SymbolIterator { /** * @see ghidra.program.model.symbol.SymbolIterator#next() */ + @Override public Symbol next() { if (hasNext()) { Symbol s = nextSymbol; @@ -71,6 +72,7 @@ public class TypeFilteredSymbolIterator implements SymbolIterator { return false; } + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/AndQuery.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/AndQuery.java index 197e0e48ae..73a3302ec5 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/AndQuery.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/AndQuery.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,6 +38,7 @@ public class AndQuery implements Query { /** * @see ghidra.program.database.util.Query#matches(db.DBRecord) */ + @Override public boolean matches(DBRecord record) { return q1.matches(record) && q2.matches(record); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/EmptyRecordIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/EmptyRecordIterator.java index c375046e05..c8903a836d 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/EmptyRecordIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/EmptyRecordIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,6 +30,7 @@ public class EmptyRecordIterator implements RecordIterator { /** * @see db.RecordIterator#hasNext() */ + @Override public boolean hasNext() throws IOException { return false; } @@ -37,6 +38,7 @@ public class EmptyRecordIterator implements RecordIterator { /** * @see db.RecordIterator#hasPrevious() */ + @Override public boolean hasPrevious() throws IOException { return false; } @@ -44,6 +46,7 @@ public class EmptyRecordIterator implements RecordIterator { /** * @see db.RecordIterator#next() */ + @Override public DBRecord next() throws IOException { return null; } @@ -51,6 +54,7 @@ public class EmptyRecordIterator implements RecordIterator { /** * @see db.RecordIterator#previous() */ + @Override public DBRecord previous() throws IOException { return null; } @@ -58,6 +62,7 @@ public class EmptyRecordIterator implements RecordIterator { /** * @see db.RecordIterator#delete() */ + @Override public boolean delete() throws IOException { return false; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/FieldMatchQuery.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/FieldMatchQuery.java index 3354255afe..fffd608856 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/FieldMatchQuery.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/FieldMatchQuery.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,6 +38,7 @@ public class FieldMatchQuery implements Query { /** * @see ghidra.program.database.util.Query#matches(db.DBRecord) */ + @Override public boolean matches(DBRecord record) { return record.fieldEquals(column, value); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/FieldRangeQuery.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/FieldRangeQuery.java index eca18ff310..b4b65df564 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/FieldRangeQuery.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/FieldRangeQuery.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,6 +42,7 @@ public class FieldRangeQuery implements Query { /** * @see ghidra.program.database.util.Query#matches(db.DBRecord) */ + @Override public boolean matches(DBRecord record) { return (record.compareFieldTo(column, min) > 0) && (record.compareFieldTo(column, max) < 0); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/NotQuery.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/NotQuery.java index 9955146237..2ba46fba2a 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/NotQuery.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/NotQuery.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,6 +34,7 @@ public class NotQuery implements Query { /** * @see ghidra.program.database.util.Query#matches(db.DBRecord) */ + @Override public boolean matches(DBRecord record) { return !q1.matches(record); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/OrQuery.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/OrQuery.java index 13cc349bbc..3de2f09a3f 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/OrQuery.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/OrQuery.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,6 +38,7 @@ public class OrQuery implements Query { /** * @see ghidra.program.database.util.Query#matches(db.DBRecord) */ + @Override public boolean matches(DBRecord record) { return q1.matches(record) || q2.matches(record); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/QueryRecordIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/QueryRecordIterator.java index 1337e13211..fdf91153a5 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/QueryRecordIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/util/QueryRecordIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -57,6 +57,7 @@ public class QueryRecordIterator implements RecordIterator { /** * @see db.RecordIterator#hasNext() */ + @Override public boolean hasNext() throws IOException { if (record == null) { if (forward) { @@ -72,6 +73,7 @@ public class QueryRecordIterator implements RecordIterator { /** * @see db.RecordIterator#next() */ + @Override public DBRecord next() throws IOException { if (hasNext()) { DBRecord rec = record; @@ -84,6 +86,7 @@ public class QueryRecordIterator implements RecordIterator { /** * @see db.RecordIterator#hasPrevious() */ + @Override public boolean hasPrevious() throws IOException { if (record == null) { findPrevious(); @@ -94,6 +97,7 @@ public class QueryRecordIterator implements RecordIterator { /** * @see db.RecordIterator#previous() */ + @Override public DBRecord previous() throws IOException { if (hasPrevious()) { DBRecord rec = record; @@ -106,6 +110,7 @@ public class QueryRecordIterator implements RecordIterator { /** * @see db.RecordIterator#delete() */ + @Override public boolean delete() throws IOException { return iter.delete(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/disassemble/DisassemblerMessageListener.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/disassemble/DisassemblerMessageListener.java index 43dfb35959..0d0e79e2ba 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/disassemble/DisassemblerMessageListener.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/disassemble/DisassemblerMessageListener.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,7 +25,8 @@ public interface DisassemblerMessageListener { * Ignores all messages from the disassembler. */ public final static DisassemblerMessageListener IGNORE = new DisassemblerMessageListener() { - public void disassembleMessageReported(String msg) {//don't care... + @Override + public void disassembleMessageReported(String msg) {//don't care... } }; @@ -34,6 +34,7 @@ public interface DisassemblerMessageListener { * Writes all messages from disassembler to the console. */ public final static DisassemblerMessageListener CONSOLE = new DisassemblerMessageListener() { + @Override public void disassembleMessageReported(String msg) { Msg.debug(this, "DisassemblerMessageListener: "+msg); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressRangeToAddressComparator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressRangeToAddressComparator.java index 92c3304a58..75b231a7c6 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressRangeToAddressComparator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressRangeToAddressComparator.java @@ -29,7 +29,8 @@ public class AddressRangeToAddressComparator implements Comparator { * @return a negative integer, zero, or a positive integer * if the first argument is less than, equal to, or greater than the second. */ - public int compare(Object obj1, Object obj2) { + @Override + public int compare(Object obj1, Object obj2) { if(obj1 instanceof AddressRange) { return ((AddressRange) obj1).compareTo((Address) obj2); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/EmptyAddressRangeIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/EmptyAddressRangeIterator.java index 79ea596783..a7b5db2f59 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/EmptyAddressRangeIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/EmptyAddressRangeIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,6 +25,7 @@ public class EmptyAddressRangeIterator implements AddressRangeIterator { /** * @see ghidra.program.model.address.AddressIterator#next() */ + @Override public AddressRange next() { return null; } @@ -32,6 +33,7 @@ public class EmptyAddressRangeIterator implements AddressRangeIterator { /** * @see ghidra.program.model.address.AddressIterator#hasNext() */ + @Override public boolean hasNext() { return false; } @@ -39,6 +41,7 @@ public class EmptyAddressRangeIterator implements AddressRangeIterator { /** * @see java.util.Iterator#remove() */ + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleDestReferenceIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleDestReferenceIterator.java index 926e042318..e2a6504a1e 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleDestReferenceIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleDestReferenceIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,7 +53,8 @@ public class SimpleDestReferenceIterator implements CodeBlockReferenceIterator { /** * @see ghidra.program.model.block.CodeBlockReferenceIterator#next() */ - public CodeBlockReference next() throws CancelledException { + @Override + public CodeBlockReference next() throws CancelledException { monitor.checkCancelled(); return blockRefQueue.isEmpty() ? null : blockRefQueue.removeFirst(); } @@ -61,7 +62,8 @@ public class SimpleDestReferenceIterator implements CodeBlockReferenceIterator { /** * @see ghidra.program.model.block.CodeBlockReferenceIterator#hasNext() */ - public boolean hasNext() throws CancelledException { + @Override + public boolean hasNext() throws CancelledException { monitor.checkCancelled(); return !blockRefQueue.isEmpty(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleSourceReferenceIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleSourceReferenceIterator.java index 954f3f2572..6cc28c92d3 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleSourceReferenceIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleSourceReferenceIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,7 +53,8 @@ public class SimpleSourceReferenceIterator implements CodeBlockReferenceIterator /** * @see ghidra.program.model.block.CodeBlockReferenceIterator#next() */ - public CodeBlockReference next() throws CancelledException { + @Override + public CodeBlockReference next() throws CancelledException { monitor.checkCancelled(); return (blockRefQueue.isEmpty() ? null : blockRefQueue.removeFirst()); } @@ -61,7 +62,8 @@ public class SimpleSourceReferenceIterator implements CodeBlockReferenceIterator /** * @see ghidra.program.model.block.CodeBlockReferenceIterator#hasNext() */ - public boolean hasNext() throws CancelledException { + @Override + public boolean hasNext() throws CancelledException { monitor.checkCancelled(); return !blockRefQueue.isEmpty(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SubroutineDestReferenceIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SubroutineDestReferenceIterator.java index d14eeb3598..4a55cce13d 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SubroutineDestReferenceIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SubroutineDestReferenceIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,7 +50,8 @@ public class SubroutineDestReferenceIterator implements CodeBlockReferenceIterat /** * @see ghidra.program.model.block.CodeBlockReferenceIterator#next() */ - public CodeBlockReference next() throws CancelledException { + @Override + public CodeBlockReference next() throws CancelledException { monitor.checkCancelled(); return blockRefQueue.isEmpty() ? null : blockRefQueue.removeFirst(); } @@ -58,7 +59,8 @@ public class SubroutineDestReferenceIterator implements CodeBlockReferenceIterat /** * @see ghidra.program.model.block.CodeBlockReferenceIterator#hasNext() */ - public boolean hasNext() throws CancelledException { + @Override + public boolean hasNext() throws CancelledException { monitor.checkCancelled(); return !blockRefQueue.isEmpty(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SubroutineSourceReferenceIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SubroutineSourceReferenceIterator.java index 8c0bfd98a3..c6c324f7b0 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SubroutineSourceReferenceIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SubroutineSourceReferenceIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,7 +50,8 @@ public class SubroutineSourceReferenceIterator implements CodeBlockReferenceIter /** * @see ghidra.program.model.block.CodeBlockReferenceIterator#next() */ - public CodeBlockReference next() throws CancelledException { + @Override + public CodeBlockReference next() throws CancelledException { monitor.checkCancelled(); return (blockRefQueue.isEmpty() ? null : blockRefQueue.removeFirst()); } @@ -58,7 +59,8 @@ public class SubroutineSourceReferenceIterator implements CodeBlockReferenceIter /** * @see ghidra.program.model.block.CodeBlockReferenceIterator#hasNext() */ - public boolean hasNext() throws CancelledException { + @Override + public boolean hasNext() throws CancelledException { monitor.checkCancelled(); return !blockRefQueue.isEmpty(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractPointerTypedefBuiltIn.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractPointerTypedefBuiltIn.java index 954f940567..bec0eacae9 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractPointerTypedefBuiltIn.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractPointerTypedefBuiltIn.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -97,6 +97,7 @@ public abstract class AbstractPointerTypedefBuiltIn extends BuiltIn implements T return ptrType.getDataType(); } + @Override public UniversalID getUniversalID() { return universalId; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AnnotationHandler.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AnnotationHandler.java index 8d6cb1a32b..88f7f1e4a6 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AnnotationHandler.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AnnotationHandler.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -82,5 +81,6 @@ public interface AnnotationHandler extends ExtensionPoint { * Returns a string description of this handler. * @return a string description of this handler */ + @Override public String toString(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DefaultAnnotationHandler.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DefaultAnnotationHandler.java index 5d0b50127d..195fdbd467 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DefaultAnnotationHandler.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DefaultAnnotationHandler.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,30 +18,37 @@ package ghidra.program.model.data; public class DefaultAnnotationHandler implements AnnotationHandler { private static final String[] FILE_EXTENSIONS = new String[] { "c", "h", "cpp" }; + @Override public String getPrefix(Enum e, String member) { return ""; } + @Override public String getSuffix(Enum e, String member) { return ""; } + @Override public String getPrefix(Composite c, DataTypeComponent dtc) { return ""; } + @Override public String getSuffix(Composite c, DataTypeComponent dtc) { return ""; } + @Override public String getDescription() { return "Default C Annotations"; } + @Override public String getLanguageName() { return "C/C++"; } + @Override public String[] getFileExtensions() { return FILE_EXTENSIONS; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DoubleDataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DoubleDataType.java index 1066b0c21d..ac024f01d1 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DoubleDataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DoubleDataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,6 +38,7 @@ public class DoubleDataType extends AbstractFloatDataType { return "Compiler-defined 'double' " + super.buildDescription(); } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/IconResource.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/IconResource.java index f4cf0656e2..9d32c3ef1c 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/IconResource.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/IconResource.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,6 +30,7 @@ public class IconResource extends BitmapResource { return height / 2; } + @Override public int getImageDataSize() { return getComputedUncompressedImageDataSize(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/LongDoubleDataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/LongDoubleDataType.java index c8002be9d9..b8a2f8a5e3 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/LongDoubleDataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/LongDoubleDataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,6 +38,7 @@ public class LongDoubleDataType extends AbstractFloatDataType { return "Compiler-defined 'long double' " + super.buildDescription(); } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/PointerTypedef.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/PointerTypedef.java index 99b09e1f1f..6ca283cca8 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/PointerTypedef.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/PointerTypedef.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -163,6 +163,7 @@ public class PointerTypedef extends GenericDataType implements TypeDef { return ptrType.getDataType(); } + @Override public UniversalID getUniversalID() { return universalId; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatCountDataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatCountDataType.java index 46e80f2411..cd66805f23 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatCountDataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatCountDataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -83,6 +83,7 @@ public abstract class RepeatCountDataType extends DynamicDataType { /* (non-Javadoc) * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.program.model.lang.ProcessorContext, ghidra.program.model.data.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { return null; } @@ -90,6 +91,7 @@ public abstract class RepeatCountDataType extends DynamicDataType { /* (non-Javadoc) * @see ghidra.program.model.data.DataType#getRepresentation(ghidra.program.model.mem.MemBuffer, ghidra.program.model.lang.ProcessorContext, ghidra.program.model.data.Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { return ""; } @@ -97,6 +99,7 @@ public abstract class RepeatCountDataType extends DynamicDataType { /* (non-Javadoc) * @see ghidra.program.model.data.DataType#getMnemonic(ghidra.program.model.data.Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatedDynamicDataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatedDynamicDataType.java index ac269be21d..c43a33001f 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatedDynamicDataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatedDynamicDataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -127,6 +127,7 @@ public abstract class RepeatedDynamicDataType extends DynamicDataType { /** * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return description; } @@ -134,6 +135,7 @@ public abstract class RepeatedDynamicDataType extends DynamicDataType { /** * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { return null; } @@ -141,10 +143,12 @@ public abstract class RepeatedDynamicDataType extends DynamicDataType { /** * @see ghidra.program.model.data.DataType#getRepresentation(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { return ""; } + @Override public String getMnemonic(Settings settings) { return name; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatedStringDataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatedStringDataType.java index a1cb467aae..403e146949 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatedStringDataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/RepeatedStringDataType.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,10 +42,12 @@ public class RepeatedStringDataType extends RepeatCountDataType { /** * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Repeated String"; } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StructuredDynamicDataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StructuredDynamicDataType.java index 0985d887e7..aba8a45c0a 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StructuredDynamicDataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StructuredDynamicDataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -126,6 +126,7 @@ public abstract class StructuredDynamicDataType extends DynamicDataType { /* (non-Javadoc) * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return description; } @@ -133,6 +134,7 @@ public abstract class StructuredDynamicDataType extends DynamicDataType { /* (non-Javadoc) * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.program.model.lang.ProcessorContext, ghidra.program.model.data.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { return null; } @@ -140,6 +142,7 @@ public abstract class StructuredDynamicDataType extends DynamicDataType { /* (non-Javadoc) * @see ghidra.program.model.data.DataType#getRepresentation(ghidra.program.model.mem.MemBuffer, ghidra.program.model.lang.ProcessorContext, ghidra.program.model.data.Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { return ""; } @@ -147,6 +150,7 @@ public abstract class StructuredDynamicDataType extends DynamicDataType { /* (non-Javadoc) * @see ghidra.program.model.data.DataType#getMnemonic(ghidra.program.model.data.Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined1DataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined1DataType.java index 1c035f6d43..0b7e937c73 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined1DataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined1DataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Undefined1DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getLength() */ + @Override public int getLength() { return 1; } @@ -61,6 +62,7 @@ public class Undefined1DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Undefined Byte"; } @@ -69,6 +71,7 @@ public class Undefined1DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getMnemonic(Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } @@ -82,6 +85,7 @@ public class Undefined1DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { String val = "??"; @@ -100,6 +104,7 @@ public class Undefined1DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { try { return new Scalar(8, getValue(buf)); @@ -109,6 +114,7 @@ public class Undefined1DataType extends Undefined { } } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined2DataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined2DataType.java index 00a835c6ce..3572588b46 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined2DataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined2DataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Undefined2DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getLength() */ + @Override public int getLength() { return 2; } @@ -61,6 +62,7 @@ public class Undefined2DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Undefined Word"; } @@ -69,6 +71,7 @@ public class Undefined2DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getMnemonic(Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } @@ -82,6 +85,7 @@ public class Undefined2DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { String val = "??"; @@ -100,6 +104,7 @@ public class Undefined2DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { try { return new Scalar(16, getValue(buf)); @@ -109,6 +114,7 @@ public class Undefined2DataType extends Undefined { } } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined3DataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined3DataType.java index 4526673b3b..13a015bc6e 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined3DataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined3DataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Undefined3DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getLength() */ + @Override public int getLength() { return 3; } @@ -61,6 +62,7 @@ public class Undefined3DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Undefined 3-Byte"; } @@ -69,6 +71,7 @@ public class Undefined3DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getMnemonic(Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } @@ -82,6 +85,7 @@ public class Undefined3DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { String val = "??"; @@ -100,6 +104,7 @@ public class Undefined3DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { try { return new Scalar(24, getValue(buf)); @@ -109,6 +114,7 @@ public class Undefined3DataType extends Undefined { } } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined4DataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined4DataType.java index 701d350687..43658e7a7c 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined4DataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined4DataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Undefined4DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getLength() */ + @Override public int getLength() { return 4; } @@ -61,10 +62,12 @@ public class Undefined4DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Undefined Double Word"; } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; @@ -76,6 +79,7 @@ public class Undefined4DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getMnemonic(Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } @@ -89,6 +93,7 @@ public class Undefined4DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { String val = "??"; @@ -107,6 +112,7 @@ public class Undefined4DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { try { return new Scalar(32, getValue(buf)); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined5DataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined5DataType.java index 2ac54bebf5..2e6486f7b8 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined5DataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined5DataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Undefined5DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getLength() */ + @Override public int getLength() { return 5; } @@ -61,6 +62,7 @@ public class Undefined5DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Undefined 5-Byte"; } @@ -69,6 +71,7 @@ public class Undefined5DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getMnemonic(Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } @@ -82,6 +85,7 @@ public class Undefined5DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { String val = "??"; @@ -100,6 +104,7 @@ public class Undefined5DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { try { return new Scalar(40, getValue(buf)); @@ -109,6 +114,7 @@ public class Undefined5DataType extends Undefined { } } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined6DataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined6DataType.java index 733ecc2caf..2f983baaaf 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined6DataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined6DataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Undefined6DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getLength() */ + @Override public int getLength() { return 6; } @@ -61,6 +62,7 @@ public class Undefined6DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Undefined 6-Byte"; } @@ -69,6 +71,7 @@ public class Undefined6DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getMnemonic(Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } @@ -82,6 +85,7 @@ public class Undefined6DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { String val = "??"; @@ -100,6 +104,7 @@ public class Undefined6DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { try { return new Scalar(48, getValue(buf)); @@ -109,6 +114,7 @@ public class Undefined6DataType extends Undefined { } } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined7DataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined7DataType.java index 5fb268d35f..8da754aaa7 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined7DataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined7DataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Undefined7DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getLength() */ + @Override public int getLength() { return 7; } @@ -61,6 +62,7 @@ public class Undefined7DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Undefined 7-Byte"; } @@ -69,6 +71,7 @@ public class Undefined7DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getMnemonic(Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } @@ -83,6 +86,7 @@ public class Undefined7DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { String val = "??"; @@ -101,6 +105,7 @@ public class Undefined7DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { try { return new Scalar(56, getValue(buf)); @@ -110,6 +115,7 @@ public class Undefined7DataType extends Undefined { } } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined8DataType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined8DataType.java index abfc5668be..afde350247 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined8DataType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/Undefined8DataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -53,6 +53,7 @@ public class Undefined8DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getLength() */ + @Override public int getLength() { return 8; } @@ -61,6 +62,7 @@ public class Undefined8DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getDescription() */ + @Override public String getDescription() { return "Undefined Quad Word"; } @@ -69,6 +71,7 @@ public class Undefined8DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getMnemonic(Settings) */ + @Override public String getMnemonic(Settings settings) { return name; } @@ -81,6 +84,7 @@ public class Undefined8DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int) */ + @Override public String getRepresentation(MemBuffer buf, Settings settings, int length) { String val = "??"; @@ -99,6 +103,7 @@ public class Undefined8DataType extends Undefined { * * @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int) */ + @Override public Object getValue(MemBuffer buf, Settings settings, int length) { try { return new Scalar(64, getValue(buf)); @@ -108,6 +113,7 @@ public class Undefined8DataType extends Undefined { } } + @Override public DataType clone(DataTypeManager dtm) { if (dtm == getDataTypeManager()) { return this; diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/BasicCompilerSpecDescription.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/BasicCompilerSpecDescription.java index 548826cc16..4b694a791e 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/BasicCompilerSpecDescription.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/BasicCompilerSpecDescription.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,14 +24,17 @@ public class BasicCompilerSpecDescription implements CompilerSpecDescription { this.name = name; } + @Override public CompilerSpecID getCompilerSpecID() { return id; } + @Override public String getCompilerSpecName() { return name; } + @Override public String getSource() { return getCompilerSpecID() + " " + getCompilerSpecName(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/BasicLanguageDescription.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/BasicLanguageDescription.java index 979883b899..8bcfa9aab5 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/BasicLanguageDescription.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/BasicLanguageDescription.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -86,10 +86,12 @@ public class BasicLanguageDescription implements LanguageDescription { this.externalNames = externalNames; } + @Override public String getDescription() { return description; } + @Override public Endian getEndian() { return endian; } @@ -104,34 +106,42 @@ public class BasicLanguageDescription implements LanguageDescription { return languageId; } + @Override public int getMinorVersion() { return minorVersion; } + @Override public int getVersion() { return version; } + @Override public Processor getProcessor() { return processor; } + @Override public int getSize() { return size; } + @Override public String getVariant() { return variant; } + @Override public boolean isDeprecated() { return deprecated; } + @Override public List getCompatibleCompilerSpecDescriptions() { return new ArrayList(compatibleCompilerSpecs.values()); } + @Override public CompilerSpecDescription getCompilerSpecDescriptionByID(CompilerSpecID compilerSpecID) throws CompilerSpecNotFoundException { CompilerSpecDescription compilerSpecDescription = diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/Mask.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/Mask.java index b0990af369..aa59274859 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/Mask.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/Mask.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,6 +32,7 @@ public interface Mask { * @return true if the object is equal to this mask, false otherwise. */ + @Override boolean equals(Object obj); /** diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/MaskImpl.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/MaskImpl.java index bc34d58dcc..e0f6c2a340 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/MaskImpl.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/MaskImpl.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -58,6 +58,7 @@ public class MaskImpl implements Mask, Serializable { * * @see ghidra.program.model.lang.Mask#equals(byte[]) */ + @Override public boolean equals(byte[] otherMask) { if (otherMask == null || otherMask.length != mask.length) { return false; @@ -75,6 +76,7 @@ public class MaskImpl implements Mask, Serializable { * * @see ghidra.program.model.lang.Mask#applyMask(byte[], byte[]) */ + @Override public byte[] applyMask(byte[] cde, byte[] result) throws IncompatibleMaskException { if ((cde == null) || (result == null)) throw new IncompatibleMaskException(); @@ -102,6 +104,7 @@ public class MaskImpl implements Mask, Serializable { /** * @see ghidra.program.model.lang.Mask#applyMask(ghidra.program.model.mem.MemBuffer) */ + @Override public byte[] applyMask(MemBuffer buffer) throws MemoryAccessException { byte[] bytes = new byte[mask.length]; buffer.getBytes(bytes, 0); @@ -115,6 +118,7 @@ public class MaskImpl implements Mask, Serializable { * * @see ghidra.program.model.lang.Mask#equalMaskedValue(byte[], byte[]) */ + @Override public boolean equalMaskedValue(byte[] cde, byte[] target) throws IncompatibleMaskException { if ((cde == null) || (target == null)) throw new IncompatibleMaskException(); @@ -130,6 +134,7 @@ public class MaskImpl implements Mask, Serializable { * * @see ghidra.program.model.lang.Mask#subMask(byte[]) */ + @Override public boolean subMask(byte[] msk) throws IncompatibleMaskException { if (msk == null) throw new IncompatibleMaskException(); @@ -149,6 +154,7 @@ public class MaskImpl implements Mask, Serializable { * * @see ghidra.program.model.lang.Mask#complementMask(byte[], byte[]) */ + @Override public byte[] complementMask(byte[] msk, byte[] results) throws IncompatibleMaskException { if ((msk == null) || (results == null)) throw new IncompatibleMaskException(); @@ -194,6 +200,7 @@ public class MaskImpl implements Mask, Serializable { * * @see ghidra.program.model.lang.Mask#getBytes() */ + @Override public byte[] getBytes() { return mask; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/RegisterTree.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/RegisterTree.java index 3c58ade416..bbb4971f3b 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/RegisterTree.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/RegisterTree.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -164,6 +163,7 @@ public class RegisterTree implements Comparable { /** * @see java.lang.Comparable#compareTo(java.lang.Object) */ + @Override public int compareTo(RegisterTree other) { return name.compareTo(other.name); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/BookmarkComparator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/BookmarkComparator.java index 963827fdd1..979be2a2dc 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/BookmarkComparator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/BookmarkComparator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,6 +30,7 @@ public class BookmarkComparator implements Comparator { * first argument is less than, equal to, or greater than the * second. */ + @Override public int compare(Bookmark bm1, Bookmark bm2) { String bt1 = bm1.getTypeString(); String bt2 = bm2.getTypeString(); diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/BookmarkTypeComparator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/BookmarkTypeComparator.java index c587cd5d03..bbee587ebf 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/BookmarkTypeComparator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/BookmarkTypeComparator.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,6 +30,7 @@ public class BookmarkTypeComparator implements Comparator { * first argument is less than, equal to, or greater than the * second. */ + @Override public int compare(BookmarkType bt1, BookmarkType bt2) { return bt1.getTypeString().compareTo(bt2.getTypeString()); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/ProgramFragment.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/ProgramFragment.java index a340802d1d..da740c6e4e 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/ProgramFragment.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/ProgramFragment.java @@ -39,7 +39,8 @@ public interface ProgramFragment extends Group, AddressSetView { * * @return true if the code unit is in the fragment, false otherwise. */ - public boolean contains(CodeUnit codeUnit); + @Override + public boolean contains(CodeUnit codeUnit); /** * Returns a forward iterator over the code units making up this fragment. diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/ProgramModule.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/ProgramModule.java index d7773e2c3b..8930c8d290 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/ProgramModule.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/ProgramModule.java @@ -171,6 +171,7 @@ public interface ProgramModule extends Group { * @return the minimum address, this will be null if all of the module's * descendant fragments are empty. */ + @Override public Address getMinAddress(); /** @@ -181,6 +182,7 @@ public interface ProgramModule extends Group { * @return the maximum address, this will be null if all of the module's * descendant fragments are empty. */ + @Override public Address getMaxAddress(); /** diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/ExternalLocationIterator.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/ExternalLocationIterator.java index 1724d76941..1e03cf1261 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/ExternalLocationIterator.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/ExternalLocationIterator.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,11 +29,13 @@ public interface ExternalLocationIterator extends Iterator { /** * Returns true if another external location is available with the next() method. */ + @Override public boolean hasNext(); /** * Returns the next external location */ + @Override public ExternalLocation next(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/MemReferenceImpl.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/MemReferenceImpl.java index 7876e2f395..52f58be4e2 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/MemReferenceImpl.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/MemReferenceImpl.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,6 +58,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#getFromAddress() */ + @Override public Address getFromAddress() { return fromAddr; } @@ -66,6 +66,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#getToAddress() */ + @Override public Address getToAddress() { return toAddr; } @@ -73,6 +74,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isPrimary() */ + @Override public boolean isPrimary() { return isPrimary; } @@ -80,6 +82,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#getSymbolID() */ + @Override public long getSymbolID() { return symbolID; } @@ -87,6 +90,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#getReferenceType() */ + @Override public RefType getReferenceType() { return refType; } @@ -94,6 +98,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#getOperandIndex() */ + @Override public int getOperandIndex() { return opIndex; } @@ -101,6 +106,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isMnemonicReference() */ + @Override public boolean isMnemonicReference() { return !isOperandReference(); } @@ -108,6 +114,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isOperandReference() */ + @Override public boolean isOperandReference() { return opIndex >= 0; } @@ -115,6 +122,7 @@ public class MemReferenceImpl implements Reference { /** * @see java.lang.Comparable#compareTo(Object) */ + @Override public int compareTo(Reference ref) { int result = fromAddr.compareTo(ref.getFromAddress()); if (result == 0) { @@ -156,6 +164,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isExternalReference() */ + @Override public boolean isExternalReference() { return false; } @@ -163,6 +172,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isOffsetReference() */ + @Override public boolean isOffsetReference() { return false; } @@ -170,6 +180,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isShiftedReference() */ + @Override public boolean isShiftedReference() { return false; } @@ -177,13 +188,15 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isEntryPointReference() */ - public boolean isEntryPointReference() { + @Override + public boolean isEntryPointReference() { return false; } /** * @see ghidra.program.model.symbol.Reference#isMemoryReference() */ + @Override public boolean isMemoryReference() { return true; } @@ -191,6 +204,7 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isRegisterReference() */ + @Override public boolean isRegisterReference() { return false; } @@ -198,10 +212,12 @@ public class MemReferenceImpl implements Reference { /** * @see ghidra.program.model.symbol.Reference#isStackReference() */ + @Override public boolean isStackReference() { return false; } + @Override public SourceType getSource() { return sourceType; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/OffsetReference.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/OffsetReference.java index c94b8532a9..164b410ff0 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/OffsetReference.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/OffsetReference.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -46,6 +46,7 @@ public interface OffsetReference extends Reference { * of the offset value. * @return reference "to" address */ + @Override public Address getToAddress(); } diff --git a/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/sleigh/grammar/BooleanExpressionDefTest.java b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/sleigh/grammar/BooleanExpressionDefTest.java index 2b65f375ae..5891807124 100644 --- a/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/sleigh/grammar/BooleanExpressionDefTest.java +++ b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/sleigh/grammar/BooleanExpressionDefTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,14 +39,16 @@ public class BooleanExpressionDefTest extends AbstractGenericTest { CommonTokenStream tokenStream = new CommonTokenStream(lexer); parser = new BooleanExpressionParser(tokenStream); parser.env = new ExpressionEnvironment() { - public boolean equals(String lhs, String rhs) { + @Override + public boolean equals(String lhs, String rhs) { if (lhs == null || rhs == null) { return false; } return lhs.equals(rhs); } - public String lookup(String variable) { + @Override + public String lookup(String variable) { if (variable.startsWith("A")) { return variable; } diff --git a/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/sleigh/grammar/BooleanExpressionTest.java b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/sleigh/grammar/BooleanExpressionTest.java index 71bbd5bb75..cf024909bb 100644 --- a/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/sleigh/grammar/BooleanExpressionTest.java +++ b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/sleigh/grammar/BooleanExpressionTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,14 +39,16 @@ public class BooleanExpressionTest extends AbstractGenericTest { CommonTokenStream tokenStream = new CommonTokenStream(lexer); parser = new BooleanExpressionParser(tokenStream); parser.env = new ExpressionEnvironment() { - public boolean equals(String lhs, String rhs) { + @Override + public boolean equals(String lhs, String rhs) { if (lhs == null || rhs == null) { return false; } return lhs.equals(rhs); } - public String lookup(String variable) { + @Override + public String lookup(String variable) { return variable; } diff --git a/Ghidra/Processors/AARCH64/src/main/java/ghidra/program/emulation/AARCH64EmulateInstructionStateModifier.java b/Ghidra/Processors/AARCH64/src/main/java/ghidra/program/emulation/AARCH64EmulateInstructionStateModifier.java index f2f9a5513b..783502fdd1 100644 --- a/Ghidra/Processors/AARCH64/src/main/java/ghidra/program/emulation/AARCH64EmulateInstructionStateModifier.java +++ b/Ghidra/Processors/AARCH64/src/main/java/ghidra/program/emulation/AARCH64EmulateInstructionStateModifier.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -980,6 +980,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt // extended, so truncate to the smaller of s_size and d_size private class SIMD_INT_ZEXT extends SIMD_UOP1E { + @Override protected long op1e(long x, int s_size, int d_size) { return x & getmask(s_size) & getmask(d_size); } } @@ -988,6 +989,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt // be truncated to the output size private class SIMD_INT_SEXT extends SIMD_SOP1E { + @Override protected long op1e(long x, int s_size, int d_size) { return x & getmask(d_size); } } @@ -1015,11 +1017,13 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_INT_ABS extends SIMD_SOP1 { + @Override protected long op1(long x, int esize) { return (x < 0) ? -x : x; } } @SuppressWarnings("unused") private class SIMD_INT_ADD extends SIMD_SOP2 { + @Override protected long op2(long x, long y, int esize) { return x + y; } } @@ -1030,10 +1034,12 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_INT_SUB extends SIMD_SOP2 { + @Override protected long op2(long x, long y, int esize) { return x - y; } } private class SIMD_INT_2COMP extends SIMD_SOP1 { + @Override protected long op1(long x, int esize) { return -x; } } @@ -1080,6 +1086,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_INT_NEGATE extends SIMD_UOP1 { + @Override protected long op1(long x, int esize) { return ~x; } } @@ -1115,22 +1122,27 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_INT_XOR extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { return x ^ y; } } private class SIMD_INT_AND extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { return x & y; } } private class SIMD_INT_OR extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { return x | y; } } private class SIMD_INT_LEFT extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { return x << y; } } private class SIMD_INT_RIGHT extends SIMD_SOP2 { + @Override protected long op2(long x, long y, int esize) { return x >>> y; } } @@ -1169,10 +1181,12 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_INT_SRIGHT extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { return x >> y; } } private class SIMD_INT_MULT extends SIMD_SOP2 { + @Override protected long op2(long x, long y, int esize) { return x * y; } } @@ -1237,6 +1251,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_FLOAT_ADD extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { if (esize == 2) { float fx = shortBitsToFloat(x); @@ -1307,6 +1322,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_FLOAT_DIV extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { if (esize == 2) { float fx = shortBitsToFloat(x); @@ -1329,6 +1345,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_FLOAT_MULT extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { if (esize == 2) { float fx = shortBitsToFloat(x); @@ -1351,6 +1368,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_FLOAT_SUB extends SIMD_UOP2 { + @Override protected long op2(long x, long y, int esize) { if (esize == 2) { float fx = shortBitsToFloat(x); @@ -1373,6 +1391,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_FLOAT_NEG extends SIMD_UOP1 { + @Override protected long op1(long x, int esize) { if (esize == 2) { float fx = shortBitsToFloat(x); @@ -1392,6 +1411,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_FLOAT_ABS extends SIMD_UOP1 { + @Override protected long op1(long x, int esize) { if (esize == 2) { float fx = shortBitsToFloat(x); @@ -1411,6 +1431,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_FLOAT2FLOAT extends SIMD_UOP1E { + @Override protected long op1e(long x, int s_size, int d_size) { if (s_size == d_size) return x; if (s_size == 2) { @@ -1431,6 +1452,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt } private class SIMD_TRUNC extends SIMD_UOP1E { + @Override protected long op1e(long x, int s_size, int d_size) { if (s_size == d_size) return x; if (s_size == 2) { @@ -1452,6 +1474,7 @@ public class AARCH64EmulateInstructionStateModifier extends EmulateInstructionSt @SuppressWarnings("unused") private class SIMD_FLOAT_ROUND extends SIMD_UOP1E { + @Override protected long op1e(long x, int s_size, int d_size) { if (s_size == 2) { float fx = shortBitsToFloat(x); diff --git a/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_32_O0_EmulatorTest.java b/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_32_O0_EmulatorTest.java index f8f5e88d75..bceef7a812 100644 --- a/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_32_O0_EmulatorTest.java +++ b/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_32_O0_EmulatorTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +36,7 @@ public class SparcV9_32_O0_EmulatorTest extends ProcessorEmulatorTestAdapter { return "sparcV9_32_GCC_O0"; } + @Override protected void initializeState(EmulatorTestRunner testRunner, Program program) throws Exception { testRunner.setRegister("DECOMPILE_MODE", 0x0); // turn decompile mode off } diff --git a/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_32_O3_EmulatorTest.java b/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_32_O3_EmulatorTest.java index e959c430e3..1654b0ccfb 100644 --- a/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_32_O3_EmulatorTest.java +++ b/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_32_O3_EmulatorTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +36,7 @@ public class SparcV9_32_O3_EmulatorTest extends ProcessorEmulatorTestAdapter { return "sparcV9_32_GCC_O3"; } + @Override protected void initializeState(EmulatorTestRunner testRunner, Program program) throws Exception { testRunner.setRegister("DECOMPILE_MODE", 0x0); // turn decompile mode off } diff --git a/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_64_O0_EmulatorTest.java b/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_64_O0_EmulatorTest.java index 31bb61b0e5..06b4ec4edb 100644 --- a/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_64_O0_EmulatorTest.java +++ b/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_64_O0_EmulatorTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +36,7 @@ public class SparcV9_64_O0_EmulatorTest extends ProcessorEmulatorTestAdapter { return "sparcV9_64_GCC_O0"; } + @Override protected void initializeState(EmulatorTestRunner testRunner, Program program) throws Exception { testRunner.setRegister("DECOMPILE_MODE", 0x0); // turn decompile mode off } diff --git a/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_64_O3_EmulatorTest.java b/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_64_O3_EmulatorTest.java index a68eff42b4..7b5f3d36aa 100644 --- a/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_64_O3_EmulatorTest.java +++ b/Ghidra/Processors/Sparc/src/test.processors/java/ghidra/test/processors/SparcV9_64_O3_EmulatorTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,6 +36,7 @@ public class SparcV9_64_O3_EmulatorTest extends ProcessorEmulatorTestAdapter { return "sparcV9_64_GCC_O3"; } + @Override protected void initializeState(EmulatorTestRunner testRunner, Program program) throws Exception { testRunner.setRegister("DECOMPILE_MODE", 0x0); // turn decompile mode off } diff --git a/Ghidra/Processors/tricore/src/test.processors/java/ghidra/test/processors/TRICORE_BE_O0_EmulatorTest.java b/Ghidra/Processors/tricore/src/test.processors/java/ghidra/test/processors/TRICORE_BE_O0_EmulatorTest.java index e5fdb78d97..995d33ecd5 100644 --- a/Ghidra/Processors/tricore/src/test.processors/java/ghidra/test/processors/TRICORE_BE_O0_EmulatorTest.java +++ b/Ghidra/Processors/tricore/src/test.processors/java/ghidra/test/processors/TRICORE_BE_O0_EmulatorTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,8 +30,10 @@ public class TRICORE_BE_O0_EmulatorTest extends ProcessorEmulatorTestAdapter { super(name, LANGUAGE_ID, COMPILER_SPEC_ID, REG_DUMP_SET); } + @Override protected String getProcessorDesignator() { return "tricore_GCC_O0"; } + @Override protected void initializeState(EmulatorTestRunner testRunner, Program program) throws Exception { testRunner.setRegister("a10", 0x40000000L); // stack, unused location testRunner.setRegister("FCX", 0x00020000L); // free context list start, unused location @@ -43,6 +45,7 @@ public class TRICORE_BE_O0_EmulatorTest extends ProcessorEmulatorTestAdapter { return ProcessorEmulatorTestAdapter.buildEmulatorTestSuite(TRICORE_BE_O0_EmulatorTest.class); } + @Override protected void setAnalysisOptions(Options analysisOptions) { super.setAnalysisOptions(analysisOptions); analysisOptions.setBoolean("Reference", false); // too many bad disassemblies diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/datatree/VersionControlAction2Test.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/datatree/VersionControlAction2Test.java index 32f289971b..110ae7c3c0 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/datatree/VersionControlAction2Test.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/datatree/VersionControlAction2Test.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -486,6 +486,7 @@ public class VersionControlAction2Test extends AbstractVersionControlActionTest * @param icon the icon to get a URL for * @return the URL for the given icon */ + @Override public URL getURL(Icon icon) { if (icon instanceof UrlImageIcon urlIcon) { return urlIcon.getUrl(); diff --git a/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/GhidraRootPreferencePage.java b/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/GhidraRootPreferencePage.java index 4dc5d8d530..78a692a2bd 100644 --- a/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/GhidraRootPreferencePage.java +++ b/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/GhidraRootPreferencePage.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,6 +27,7 @@ public class GhidraRootPreferencePage extends PreferencePage implements IWorkben noDefaultAndApplyButton(); } + @Override public void init(IWorkbench workbench) { setDescription("Please see subcategories for Ghidra preferences."); } From 0cbf33d07491e20bbb59f72d24b5fb7cdc538749 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Thu, 29 May 2025 08:39:27 -0400 Subject: [PATCH 2/2] GP-0: Fixing raw type warnings --- .../core/debug/utils/BackgroundUtils.java | 7 +++-- .../AutoRenameLabelsScript.java | 7 +++-- .../Base/ghidra_scripts/SetEquateScript.java | 6 ++-- .../app/plugin/core/clear/ClearPlugin.java | 2 +- .../core/colorizer/ColorizingPlugin.java | 9 +++--- .../plugin/core/data/CreateArrayAction.java | 8 ++--- .../plugin/core/data/CycleGroupAction.java | 9 +++--- .../plugin/core/equate/EquateTablePlugin.java | 2 +- .../core/fallthrough/FallThroughModel.java | 14 ++++----- .../core/function/AddVarArgsAction.java | 6 ++-- .../core/function/AnalyzeStackRefsAction.java | 6 ++-- .../CreateExternalFunctionAction.java | 8 ++--- .../core/function/CreateFunctionAction.java | 6 ++-- .../core/function/DeleteVarArgsAction.java | 9 +++--- .../function/EditFunctionPurgeAction.java | 6 ++-- .../function/X86FunctionPurgeAnalyzer.java | 7 ++--- .../core/function/tags/TargetTagsPanel.java | 10 +++--- .../app/plugin/core/label/LabelMgrPlugin.java | 3 +- .../plugin/core/label/OperandLabelDialog.java | 6 ++-- .../plugin/core/module/AutoRenamePlugin.java | 20 ++++++------ .../references/DeleteReferencesAction.java | 7 +++-- .../core/references/EditReferencesModel.java | 8 ++--- .../ExternalReferencesProvider.java | 10 +++--- .../core/references/ReferencesPlugin.java | 31 ++++++++++--------- .../plugin/core/register/RegisterPlugin.java | 10 +++--- .../core/register/RegisterValuesPanel.java | 8 ++--- .../actions/SetExternalProgramAction.java | 7 +++-- .../PropertyManagerProvider.java | 6 ++-- .../objectiveC/ObjectiveC1_Utilities.java | 8 ++--- .../ghidra/app/util/xml/MarkupXmlMgr.java | 6 ++-- .../ghidra/app/util/xml/PropertiesXmlMgr.java | 6 ++-- .../ghidra/base/project/GhidraProject.java | 2 +- .../core/bookmark/BookmarkEditCmdTest.java | 6 ++-- .../core/bookmark/BookmarkPluginTest.java | 12 +++---- .../codebrowser/CodeBrowserOptionsTest.java | 4 +-- .../plugin/core/data/DataReferencesTest.java | 28 ++++++++--------- .../app/plugin/core/marker/MarkerTest.java | 2 +- .../NextPrevCodeUnitPluginTest.java | 10 +++--- .../core/scalartable/ScalarSearchTest.java | 10 +++--- .../symboltree/SymbolTreeNavigationTest.java | 6 ++-- .../core/symtable/SymbolTablePluginTest.java | 12 ++++--- .../viewer/field/OperandFieldFactoryTest.java | 10 +++--- .../model/data/StructureFactoryTest.java | 7 +++-- .../data/CreateArrayInStructureCmdTest.java | 4 +-- ...reateDataInStructureBackgroundCmdTest.java | 6 ++-- .../data/CreateDataInStructureCmdTest.java | 8 ++--- .../CreateStructureInStructureCmdTest.java | 4 +-- .../CreateFunctionCmdWithFlowTest.java | 8 ++--- .../ghidra/app/cmd/label/AddLabelCmdTest.java | 6 ++-- .../cmd/label/CreateNamespacesCmdTest.java | 9 +++--- .../app/cmd/memory/AddMemoryBlockCmdTest.java | 8 ++--- .../plugin/core/comments/EolCommentsTest.java | 17 +++++----- .../decompile/actions/RemoveLabelAction.java | 8 +++-- .../vt/gui/filters/TagFilterEditorDialog.java | 6 ++-- .../viewer/layout/LayoutLocationMap.java | 2 +- .../ArmBranchReturnDetectionTest.java | 15 +++------ .../javaclass/analyzers/JavaAnalyzer.java | 6 ++-- .../cmd/function/CreateFunctionThunkTest.java | 8 ++--- 58 files changed, 241 insertions(+), 241 deletions(-) diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/utils/BackgroundUtils.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/utils/BackgroundUtils.java index dde7f01ec0..42348d9874 100644 --- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/utils/BackgroundUtils.java +++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/utils/BackgroundUtils.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -233,7 +233,8 @@ public enum BackgroundUtils { } protected void executeBackground(Runnable command) { - BackgroundCommand cmd = new BackgroundCommand(name, opts.contains(TaskOpt.HAS_PROGRESS), + BackgroundCommand cmd = + new BackgroundCommand<>(name, opts.contains(TaskOpt.HAS_PROGRESS), opts.contains(TaskOpt.CAN_CANCEL), opts.contains(TaskOpt.IS_MODAL)) { @Override public boolean applyTo(DomainObject obj, TaskMonitor monitor) { diff --git a/Ghidra/Features/Base/ghidra_scripts/AutoRenameLabelsScript.java b/Ghidra/Features/Base/ghidra_scripts/AutoRenameLabelsScript.java index 9af7b67f5b..3a0fc8c388 100644 --- a/Ghidra/Features/Base/ghidra_scripts/AutoRenameLabelsScript.java +++ b/Ghidra/Features/Base/ghidra_scripts/AutoRenameLabelsScript.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,6 +21,7 @@ import ghidra.app.cmd.label.RenameLabelCmd; import ghidra.app.script.GhidraScript; import ghidra.framework.cmd.CompoundCmd; import ghidra.program.model.address.*; +import ghidra.program.model.listing.Program; import ghidra.program.model.symbol.*; public class AutoRenameLabelsScript extends GhidraScript { @@ -45,7 +46,7 @@ public class AutoRenameLabelsScript extends GhidraScript { SymbolTable symbolTable = currentProgram.getSymbolTable(); AddressIterator it = view.getAddresses(true); - CompoundCmd cmd = new CompoundCmd("Auto Rename Labels"); + CompoundCmd cmd = new CompoundCmd<>("Auto Rename Labels"); while (it.hasNext()) { Address address = it.next(); Symbol primary = symbolTable.getPrimarySymbol(address); diff --git a/Ghidra/Features/Base/ghidra_scripts/SetEquateScript.java b/Ghidra/Features/Base/ghidra_scripts/SetEquateScript.java index bc6aad7afb..f289e628bb 100644 --- a/Ghidra/Features/Base/ghidra_scripts/SetEquateScript.java +++ b/Ghidra/Features/Base/ghidra_scripts/SetEquateScript.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -83,7 +83,7 @@ public class SetEquateScript extends GhidraScript { // looking for was found // Sets the equate to the user defined name and execute - Command cmd = + Command cmd = new SetEquateCmd(equateName, tempValue.getAddress(), i, scalarValue); state.getTool().execute(cmd, currentProgram); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/clear/ClearPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/clear/ClearPlugin.java index bdd9ab1002..32a0e9a658 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/clear/ClearPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/clear/ClearPlugin.java @@ -113,7 +113,7 @@ public class ClearPlugin extends Plugin { } CodeUnit cu = program.getListing().getCodeUnitContaining(location.getAddress()); - Command cmd = new ClearCmd(cu, options); + Command cmd = new ClearCmd(cu, options); tool.execute(cmd, program); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/colorizer/ColorizingPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/colorizer/ColorizingPlugin.java index dd94d6e4c8..2490e77a0a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/colorizer/ColorizingPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/colorizer/ColorizingPlugin.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,8 +34,7 @@ import ghidra.app.plugin.ProgramPlugin; import ghidra.app.plugin.core.navigation.NavigationOptions; import ghidra.app.services.*; import ghidra.framework.cmd.Command; -import ghidra.framework.model.DomainObjectChangedEvent; -import ghidra.framework.model.DomainObjectListener; +import ghidra.framework.model.*; import ghidra.framework.options.SaveState; import ghidra.framework.plugintool.PluginInfo; import ghidra.framework.plugintool.PluginTool; @@ -191,7 +190,7 @@ public class ColorizingPlugin extends ProgramPlugin implements DomainObjectListe return; } - Command command = null; + Command command = null; ProgramSelection selection = listingContext.getSelection(); if (selection != null && !selection.isEmpty()) { command = new SetColorCommand(color, service, selection); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CreateArrayAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CreateArrayAction.java index e92fee9641..49226e9897 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CreateArrayAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CreateArrayAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -112,7 +112,7 @@ class CreateArrayAction extends ListingContextAction { int maxNoConflictElements = getMaxNoConflictElements(struct, comp.getComponentIndex(), dt); int numElements = getNumElements(dt, maxNoConflictElements, maxElements); - Command cmd = new CreateArrayInStructureCmd(addr, numElements, dt, compPath); + Command cmd = new CreateArrayInStructureCmd(addr, numElements, dt, compPath); if (!tool.execute(cmd, program)) { tool.setStatusInfo(cmd.getStatusMsg()); } @@ -144,7 +144,7 @@ class CreateArrayAction extends ListingContextAction { // Arrays currently use aligned-length only int numElements = length / dt.getAlignedLength(); - Command cmd = new CreateArrayInStructureCmd(from.getAddress(), numElements, dt, + Command cmd = new CreateArrayInStructureCmd(from.getAddress(), numElements, dt, from.getComponentPath()); if (!tool.execute(cmd, program)) { tool.setStatusInfo(cmd.getStatusMsg()); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CycleGroupAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CycleGroupAction.java index c225ab8b4f..1c5d52d22e 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CycleGroupAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CycleGroupAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,8 +26,7 @@ import ghidra.framework.cmd.BackgroundCommand; import ghidra.program.model.address.Address; import ghidra.program.model.data.CycleGroup; import ghidra.program.model.data.DataType; -import ghidra.program.model.listing.Data; -import ghidra.program.model.listing.Listing; +import ghidra.program.model.listing.*; import ghidra.program.util.*; import ghidra.util.Msg; @@ -83,7 +82,7 @@ public class CycleGroupAction extends ListingContextAction { // Handle selection case if (selection != null && !selection.isEmpty()) { - BackgroundCommand cmd = null; + BackgroundCommand cmd = null; DataType dt = null; Address addr = selection.getMinAddress(); Data data = listing.getDataContaining(addr); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/EquateTablePlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/EquateTablePlugin.java index 68a5850d8f..ad76c3a1a8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/EquateTablePlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/EquateTablePlugin.java @@ -206,7 +206,7 @@ public class EquateTablePlugin extends ProgramPlugin implements DomainObjectList } if (isValid(oldEquate, newEquateName)) { - Command cmd = new RenameEquatesCmd(oldEquateName, newEquateName); + Command cmd = new RenameEquatesCmd(oldEquateName, newEquateName); tool.execute(cmd, currentProgram); } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/fallthrough/FallThroughModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/fallthrough/FallThroughModel.java index 43e5022fd4..dabc33aa82 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/fallthrough/FallThroughModel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/fallthrough/FallThroughModel.java @@ -15,6 +15,9 @@ */ package ghidra.app.plugin.core.fallthrough; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + import ghidra.app.cmd.refs.ClearFallThroughCmd; import ghidra.app.cmd.refs.SetFallThroughCmd; import ghidra.app.util.viewer.field.BrowserCodeUnitFormat; @@ -23,9 +26,6 @@ import ghidra.framework.plugintool.PluginTool; import ghidra.program.model.address.*; import ghidra.program.model.listing.*; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - /** * This class is really a model for the FallThroughDialog state. However, it is used as a * convenience for executing the auto-override and clear-fallthrough actions. @@ -187,7 +187,7 @@ class FallThroughModel implements ChangeListener { * @param currentSelection */ void autoOverride(AddressSetView view) { - CompoundCmd cmd = new CompoundCmd("Auto-Override"); + CompoundCmd cmd = new CompoundCmd<>("Auto-Override"); AddressRangeIterator iter = view.getAddressRanges(); while (iter.hasNext()) { override(iter.next(), cmd); @@ -200,7 +200,7 @@ class FallThroughModel implements ChangeListener { } void clearOverride(AddressSetView view) { - CompoundCmd cmd = new CompoundCmd("Clear FallThroughs"); + CompoundCmd cmd = new CompoundCmd<>("Clear FallThroughs"); InstructionIterator it = program.getListing().getInstructions(view, true); while(it.hasNext()) { Instruction inst = it.next(); @@ -225,7 +225,7 @@ class FallThroughModel implements ChangeListener { return program; } - private void override(AddressRange range, CompoundCmd cmd) { + private void override(AddressRange range, CompoundCmd cmd) { Address min = range.getMinAddress(); Address max = range.getMaxAddress(); Listing listing = program.getListing(); @@ -248,7 +248,7 @@ class FallThroughModel implements ChangeListener { } } - private void setFallThrough(Address addr, CompoundCmd cmd) { + private void setFallThrough(Address addr, CompoundCmd cmd) { Instruction inst = program.getListing().getInstructionAfter(addr); if (inst != null) { cmd.add(new SetFallThroughCmd(addr, inst.getMinAddress())); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AddVarArgsAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AddVarArgsAction.java index 42b6de4a6b..5d4a31e56f 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AddVarArgsAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AddVarArgsAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -60,7 +60,7 @@ public class AddVarArgsAction extends ListingContextAction { Function function = functionPlugin.getFunction(context); if ((function != null) && (!function.hasVarArgs())) { - Command command = new SetFunctionVarArgsCommand(function, true); + Command command = new SetFunctionVarArgsCommand(function, true); PluginTool tool = functionPlugin.getTool(); Program program = context.getProgram(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AnalyzeStackRefsAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AnalyzeStackRefsAction.java index d9ce4d025a..eceefb4643 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AnalyzeStackRefsAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AnalyzeStackRefsAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -103,7 +103,7 @@ class AnalyzeStackRefsAction extends ListingContextAction { doParameterAnalysis = options.getBoolean("Create Param Variables", doParameterAnalysis); - BackgroundCommand cmd = null; + BackgroundCommand cmd = null; if (doNewStackAnalysis) { cmd = new NewFunctionStackAnalysisCmd(funcSet, doParameterAnalysis, doLocalAnalysis, true); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/CreateExternalFunctionAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/CreateExternalFunctionAction.java index 2b5e66e925..0047b04c12 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/CreateExternalFunctionAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/CreateExternalFunctionAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -95,7 +95,7 @@ public class CreateExternalFunctionAction extends ProgramContextAction { @Override protected void actionPerformed(ProgramActionContext context) { - CompoundCmd compoundCmd = null; + CompoundCmd compoundCmd = null; CreateExternalFunctionCmd cmd = null; if (context instanceof ListingActionContext) { ListingActionContext listingContext = (ListingActionContext) context; @@ -107,7 +107,7 @@ public class CreateExternalFunctionAction extends ProgramContextAction { CreateExternalFunctionCmd extFuncCmd = new CreateExternalFunctionCmd(s); if (cmd != null) { if (compoundCmd == null) { - compoundCmd = new CompoundCmd("Create External Functions"); + compoundCmd = new CompoundCmd<>("Create External Functions"); compoundCmd.add(cmd); } compoundCmd.add(extFuncCmd); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/CreateFunctionAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/CreateFunctionAction.java index a7eeeddd7a..945567894f 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/CreateFunctionAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/CreateFunctionAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -139,7 +139,7 @@ class CreateFunctionAction extends ListingContextAction { funcPlugin.getTool().clearStatusInfo(); } - BackgroundCommand cmd; + BackgroundCommand cmd; if (createThunk) { cmd = getCreateThunkFunctionCmd(context.getProgram(), entry, body); if (cmd == null) { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/DeleteVarArgsAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/DeleteVarArgsAction.java index 48cf490ba1..ca0642d6ed 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/DeleteVarArgsAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/DeleteVarArgsAction.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,6 +15,7 @@ */ package ghidra.app.plugin.core.function; +import docking.action.MenuData; import ghidra.app.cmd.function.SetFunctionVarArgsCommand; import ghidra.app.context.ListingActionContext; import ghidra.app.context.ListingContextAction; @@ -25,7 +25,6 @@ import ghidra.program.model.listing.Function; import ghidra.program.model.listing.Program; import ghidra.program.util.*; import ghidra.util.HelpLocation; -import docking.action.MenuData; /** * Action that changes a Function so that it has VarArgs (a variable argument list). @@ -62,7 +61,7 @@ public class DeleteVarArgsAction extends ListingContextAction { public void actionPerformed(ListingActionContext context) { Function function = functionPlugin.getFunction(context); if ((function != null) && (function.hasVarArgs())) { - Command command = new SetFunctionVarArgsCommand(function, false); + Command command = new SetFunctionVarArgsCommand(function, false); PluginTool tool = functionPlugin.getTool(); Program program = context.getProgram(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/EditFunctionPurgeAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/EditFunctionPurgeAction.java index 4cf41408cb..1e4e9e008e 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/EditFunctionPurgeAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/EditFunctionPurgeAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -84,7 +84,7 @@ public class EditFunctionPurgeAction extends ListingContextAction { int newFunctionPurgeSize = numberInputDialog.getValue(); if (newFunctionPurgeSize != currentFunctionPurgeSize) { - Command command = new SetFunctionPurgeCommand(function, newFunctionPurgeSize); + Command command = new SetFunctionPurgeCommand(function, newFunctionPurgeSize); PluginTool tool = functionPlugin.getTool(); Program program = function.getProgram(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/X86FunctionPurgeAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/X86FunctionPurgeAnalyzer.java index 23182f7fcc..b6e735048d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/X86FunctionPurgeAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/X86FunctionPurgeAnalyzer.java @@ -1,13 +1,12 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,7 +37,7 @@ public class X86FunctionPurgeAnalyzer extends AbstractAnalyzer { @Override public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) { - BackgroundCommand cmd; + BackgroundCommand cmd; cmd = new FunctionPurgeAnalysisCmd(set); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/tags/TargetTagsPanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/tags/TargetTagsPanel.java index b3e76648fd..7026a6ccf9 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/tags/TargetTagsPanel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/tags/TargetTagsPanel.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,8 +20,7 @@ import java.util.Set; import ghidra.app.cmd.function.RemoveFunctionTagCmd; import ghidra.framework.cmd.Command; import ghidra.framework.plugintool.PluginTool; -import ghidra.program.model.listing.Function; -import ghidra.program.model.listing.FunctionTag; +import ghidra.program.model.listing.*; /** * Displays a list of tags that have been assigned to the current function @@ -73,7 +72,8 @@ public class TargetTagsPanel extends TagListPanel { public void removeSelectedTags() { Set selectedTags = getSelectedTags(); for (FunctionTag tag : selectedTags) { - Command cmd = new RemoveFunctionTagCmd(tag.getName(), function.getEntryPoint()); + Command cmd = + new RemoveFunctionTagCmd(tag.getName(), function.getEntryPoint()); tool.execute(cmd, program); } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/LabelMgrPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/LabelMgrPlugin.java index b124ccef73..396031052b 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/LabelMgrPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/LabelMgrPlugin.java @@ -115,7 +115,8 @@ public class LabelMgrPlugin extends Plugin { protected void removeLabelCallback(ListingActionContext context) { Symbol s = getSymbol(context); if (s != null) { - Command cmd = new DeleteLabelCmd(s.getAddress(), s.getName(), s.getParentNamespace()); + Command cmd = + new DeleteLabelCmd(s.getAddress(), s.getName(), s.getParentNamespace()); if (!tool.execute(cmd, context.getProgram())) { tool.setStatusInfo(cmd.getStatusMsg()); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/OperandLabelDialog.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/OperandLabelDialog.java index 9df7898e7a..2912c5b421 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/OperandLabelDialog.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/OperandLabelDialog.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -94,7 +94,7 @@ public class OperandLabelDialog extends DialogComponentProvider { Address symAddr = sym.getAddress(); Reference ref = refMgr.getReference(addr, symAddr, opIndex); - CompoundCmd cmd = new CompoundCmd("Set Label"); + CompoundCmd cmd = new CompoundCmd<>("Set Label"); Namespace scope = null; Symbol newSym = findSymbol(symTable, currentLabel, symAddr); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/module/AutoRenamePlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/module/AutoRenamePlugin.java index e6fe4d06a9..325bf44877 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/module/AutoRenamePlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/module/AutoRenamePlugin.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,6 +15,11 @@ */ package ghidra.app.plugin.core.module; +import javax.swing.tree.TreePath; + +import docking.ActionContext; +import docking.action.DockingAction; +import docking.action.MenuData; import ghidra.app.CorePluginPackage; import ghidra.app.cmd.module.RenameCmd; import ghidra.app.context.ListingActionContext; @@ -26,8 +31,9 @@ import ghidra.app.services.ProgramTreeService; import ghidra.framework.cmd.CompoundCmd; import ghidra.framework.plugintool.PluginInfo; import ghidra.framework.plugintool.PluginTool; -import ghidra.framework.plugintool.util.*; +import ghidra.framework.plugintool.util.PluginStatus; import ghidra.program.model.address.Address; +import ghidra.program.model.listing.Program; import ghidra.program.model.listing.ProgramFragment; import ghidra.program.model.symbol.Symbol; import ghidra.program.model.symbol.SymbolTable; @@ -35,12 +41,6 @@ import ghidra.program.util.LabelFieldLocation; import ghidra.program.util.ProgramLocation; import ghidra.util.HelpLocation; -import javax.swing.tree.TreePath; - -import docking.ActionContext; -import docking.action.DockingAction; -import docking.action.MenuData; - /** * Plugin provides the following Fragment rename actions: * 1. Automatically rename selected Program Fragments to match the @@ -113,7 +113,7 @@ public class AutoRenamePlugin extends ProgramPlugin { if (obj instanceof ProgramNode) { ProgramNode node = (ProgramNode) obj; - CompoundCmd cmd = new CompoundCmd("Auto Rename Fragment(s)"); + CompoundCmd cmd = new CompoundCmd<>("Auto Rename Fragment(s)"); SymbolTable symTable = currentProgram.getSymbolTable(); // Find selected Fragments diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/DeleteReferencesAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/DeleteReferencesAction.java index 226bd34d00..bf619e66d7 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/DeleteReferencesAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/DeleteReferencesAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,6 +24,7 @@ import ghidra.app.context.ListingActionContext; import ghidra.app.context.ListingContextAction; import ghidra.framework.cmd.Command; import ghidra.program.model.address.Address; +import ghidra.program.model.listing.Program; import ghidra.program.model.symbol.Reference; import ghidra.program.model.symbol.ReferenceManager; import ghidra.program.util.*; @@ -58,7 +59,7 @@ public class DeleteReferencesAction extends ListingContextAction { if (loc instanceof OperandFieldLocation) { opIndex = ((OperandFieldLocation) loc).getOperandIndex(); } - Command cmd = new RemoveAllReferencesCmd(loc.getAddress(), opIndex); + Command cmd = new RemoveAllReferencesCmd(loc.getAddress(), opIndex); plugin.getTool().execute(cmd, context.getProgram()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencesModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencesModel.java index 7cef91ffb8..6b891b5d26 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencesModel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencesModel.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -173,13 +173,13 @@ class EditReferencesModel extends AbstractSortedTableModel { case REF_TYPE_COL: if (ref.getReferenceType() != value) { - Command cmd = new EditRefTypeCmd(ref, (RefType) value); + Command cmd = new EditRefTypeCmd(ref, (RefType) value); plugin.getTool().execute(cmd, cu.getProgram()); } break; case IS_PRIMARY_COL: - Command cmd = new SetPrimaryRefCmd(ref, ((Boolean) value).booleanValue()); + Command cmd = new SetPrimaryRefCmd(ref, ((Boolean) value).booleanValue()); plugin.getTool().execute(cmd, cu.getProgram()); break; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ExternalReferencesProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ExternalReferencesProvider.java index ffd3605433..883bdcf452 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ExternalReferencesProvider.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ExternalReferencesProvider.java @@ -212,7 +212,7 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter { private void deleteExternalProgram() { ExternalManager externalManager = program.getExternalManager(); StringBuilder buf = new StringBuilder(); - CompoundCmd cmd = new CompoundCmd("Delete External Program Name"); + CompoundCmd cmd = new CompoundCmd<>("Delete External Program Name"); for (String externalName : getSelectedExternalNames()) { boolean hasLocations = externalManager.getExternalLocations(externalName).hasNext(); if (hasLocations) { @@ -251,7 +251,8 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter { ExternalManager externalManager = program.getExternalManager(); String externalLibraryPath = externalManager.getExternalLibraryPath(externalName); if (!pathName.equals(externalLibraryPath)) { - Command cmd = new SetExternalNameCmd(externalName, domainFile.getPathname()); + Command cmd = + new SetExternalNameCmd(externalName, domainFile.getPathname()); getTool().execute(cmd, program); } }); @@ -260,7 +261,7 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter { } private void clearExternalAssociation() { - CompoundCmd cmd = new CompoundCmd("Clear External Program Associations"); + CompoundCmd cmd = new CompoundCmd<>("Clear External Program Associations"); for (String externalName : getSelectedExternalNames()) { cmd.add(new ClearExternalNameCmd(externalName)); } @@ -435,7 +436,8 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter { rowToHighlightDuringNextReload = newName; String oldName = path.getName(); - Command cmd = new UpdateExternalNameCmd(oldName, newName, SourceType.USER_DEFINED); + Command cmd = + new UpdateExternalNameCmd(oldName, newName, SourceType.USER_DEFINED); if (!tool.execute(cmd, program)) { tool.setStatusInfo(cmd.getStatusMsg()); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ReferencesPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ReferencesPlugin.java index 68a0f0c779..7c7a657125 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ReferencesPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ReferencesPlugin.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -525,25 +525,27 @@ public class ReferencesPlugin extends Plugin { } } - BackgroundCommand cmd = + BackgroundCommand cmd = new AddMemRefsCmd(cuAddr, set, rt, SourceType.USER_DEFINED, opIndex); tool.executeBackgroundCommand(cmd, cu.getProgram()); } boolean addDefaultReference(Program program, Address fromAddr, int opIndex, Address toAddr, RefType refType) { - Command cmd = + Command cmd = new AddMemRefCmd(fromAddr, toAddr, refType, SourceType.USER_DEFINED, opIndex, true); return tool.execute(cmd, program); } boolean addDefaultReference(Program program, Address fromAddr, int opIndex, int stackOffset) { - Command cmd = new AddStackRefCmd(fromAddr, opIndex, stackOffset, SourceType.USER_DEFINED); + Command cmd = + new AddStackRefCmd(fromAddr, opIndex, stackOffset, SourceType.USER_DEFINED); return tool.execute(cmd, program); } boolean addDefaultReference(Program program, Address fromAddr, int opIndex, Register reg) { - Command cmd = new AddRegisterRefCmd(fromAddr, opIndex, reg, SourceType.USER_DEFINED); + Command cmd = + new AddRegisterRefCmd(fromAddr, opIndex, reg, SourceType.USER_DEFINED); return tool.execute(cmd, program); } @@ -559,7 +561,7 @@ public class ReferencesPlugin extends Plugin { * Remove specified set of references */ void deleteReferences(Program program, Reference[] refs) { - CompoundCmd cmd = new CompoundCmd("Remove Reference(s)"); + CompoundCmd cmd = new CompoundCmd<>("Remove Reference(s)"); for (Reference ref : refs) { cmd.add(new RemoveReferenceCmd(ref)); } @@ -573,7 +575,7 @@ public class ReferencesPlugin extends Plugin { */ boolean updateReference(Reference editRef, CodeUnit fromCodeUnit, Address toAddr, boolean isOffsetRef, long offset, RefType refType) { - CompoundCmd cmd = new CompoundCmd("Update Memory Reference"); + CompoundCmd cmd = new CompoundCmd<>("Update Memory Reference"); int opIndex = editRef.getOperandIndex(); cmd.add(new RemoveReferenceCmd(editRef)); if (isOffsetRef) { @@ -610,7 +612,7 @@ public class ReferencesPlugin extends Plugin { return false; } - Command cmd; + Command cmd; if (isOffsetRef) { cmd = new AddOffsetMemRefCmd(fromAddr, toAddr, false, refType, SourceType.USER_DEFINED, opIndex, offset); @@ -632,7 +634,7 @@ public class ReferencesPlugin extends Plugin { return false; } - CompoundCmd cmd = new CompoundCmd("Update Register Reference"); + CompoundCmd cmd = new CompoundCmd<>("Update Register Reference"); cmd.add(new RemoveReferenceCmd(editRef)); cmd.add(new AddRegisterRefCmd(fromAddr, editRef.getOperandIndex(), reg, refType, SourceType.USER_DEFINED)); @@ -670,7 +672,7 @@ public class ReferencesPlugin extends Plugin { return false; } - CompoundCmd cmd = new CompoundCmd("Update Stack Reference"); + CompoundCmd cmd = new CompoundCmd<>("Update Stack Reference"); cmd.add(new RemoveReferenceCmd(editRef)); cmd.add(new AddStackRefCmd(fromAddr, editRef.getOperandIndex(), stackOffset, refType, SourceType.USER_DEFINED)); @@ -699,7 +701,8 @@ public class ReferencesPlugin extends Plugin { return tool.execute(cmd, p); } - private void buildAddExtRefCmd(CompoundCmd cmd, Program p, Address fromAddr, int opIndex, + private void buildAddExtRefCmd(CompoundCmd cmd, Program p, Address fromAddr, + int opIndex, String extName, String path, Address addr, String label, RefType refType) { cmd.add(new SetExternalRefCmd(fromAddr, opIndex, extName, label, addr, refType, @@ -721,7 +724,7 @@ public class ReferencesPlugin extends Plugin { ExternalLocation oldExtLoc = editRef.getExternalLocation(); String oldExtName = oldExtLoc.getLibraryName(); - CompoundCmd cmd = new CompoundCmd("Update External Reference"); + CompoundCmd cmd = new CompoundCmd<>("Update External Reference"); // TODO: Add RefType entry to External Reference editor panel (assume unchanged to avoid merge conflict) @@ -790,7 +793,7 @@ public class ReferencesPlugin extends Plugin { } } - CompoundCmd cmd = new CompoundCmd("Add External Reference"); + CompoundCmd cmd = new CompoundCmd<>("Add External Reference"); buildAddExtRefCmd(cmd, p, fromCodeUnit.getMinAddress(), opIndex, extName, path, addr, label, refType); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterPlugin.java index c9bcd500a9..206322376d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterPlugin.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -231,7 +231,7 @@ public class RegisterPlugin extends ProgramPlugin { while (it.hasNext()) { AddressRange range = it.next(); if (range.contains(addr)) { - Command cmd = new SetRegisterCmd(register, range.getMinAddress(), + Command cmd = new SetRegisterCmd(register, range.getMinAddress(), range.getMaxAddress(), null); if (!tool.execute(cmd, context.getProgram())) { Msg.showError(this, tool.getToolFrame(), "Register Context Error", @@ -246,7 +246,7 @@ public class RegisterPlugin extends ProgramPlugin { RegisterFieldLocation location = (RegisterFieldLocation) context.getLocation(); Register register = location.getRegister(); Address addr = location.getAddress(); - Command cmd = new SetRegisterCmd(register, addr, addr, null); + Command cmd = new SetRegisterCmd(register, addr, addr, null); if (!tool.execute(cmd, context.getProgram())) { Msg.showError(this, tool.getToolFrame(), "Register Context Error", cmd.getStatusMsg()); } @@ -377,7 +377,7 @@ public class RegisterPlugin extends ProgramPlugin { return; } - CompoundCmd cmd = new CompoundCmd("Set Register Values"); + CompoundCmd cmd = new CompoundCmd<>("Set Register Values"); for (AddressRange range : addressSet) { SetRegisterCmd regCmd = new SetRegisterCmd(register, range.getMinAddress(), range.getMaxAddress(), value); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterValuesPanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterValuesPanel.java index ad13415478..b999e1d746 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterValuesPanel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterValuesPanel.java @@ -102,9 +102,9 @@ class RegisterValuesPanel extends JPanel { private void updateValue(Address start, Address end, Address newStart, Address newEnd, BigInteger newValue) { - CompoundCmd cmd = new CompoundCmd("Update Register Range"); - Command cmd1 = new SetRegisterCmd(selectedRegister, start, end, null); - Command cmd2 = new SetRegisterCmd(selectedRegister, newStart, newEnd, newValue); + CompoundCmd cmd = new CompoundCmd<>("Update Register Range"); + Command cmd1 = new SetRegisterCmd(selectedRegister, start, end, null); + Command cmd2 = new SetRegisterCmd(selectedRegister, newStart, newEnd, newValue); cmd.add(cmd1); cmd.add(cmd2); tool.execute(cmd, currentProgram); @@ -250,7 +250,7 @@ class RegisterValuesPanel extends JPanel { } void deleteSelectedRanges() { - CompoundCmd cmd = new CompoundCmd("Delete Register Value Ranges"); + CompoundCmd cmd = new CompoundCmd<>("Delete Register Value Ranges"); int[] rows = table.getSelectedRows(); boolean containsDefaultValues = false; for (int row : rows) { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/symboltree/actions/SetExternalProgramAction.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/symboltree/actions/SetExternalProgramAction.java index a0d63e9d83..d6030511ee 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/symboltree/actions/SetExternalProgramAction.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/symboltree/actions/SetExternalProgramAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -95,7 +95,8 @@ public class SetExternalProgramAction extends SymbolTreeContextAction { String pathName = domainFile.toString(); dialog.close(); if (!pathName.equals(externalLibraryPath)) { - Command cmd = new SetExternalNameCmd(externalName, domainFile.getPathname()); + Command cmd = + new SetExternalNameCmd(externalName, domainFile.getPathname()); plugin.getTool().execute(cmd, plugin.getProgram()); } }); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/debug/propertymanager/PropertyManagerProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/debug/propertymanager/PropertyManagerProvider.java index 221e5195da..9bd994279f 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/debug/propertymanager/PropertyManagerProvider.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/debug/propertymanager/PropertyManagerProvider.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -73,7 +73,7 @@ public class PropertyManagerProvider extends ComponentProviderAdapter { String propName = (String) model.getValueAt(row, PropertyManagerTableModel.PROPERTY_NAME_COLUMN); model.removeRow(row); - Command cmd = new PropertyDeleteCmd(propName, restrictedView); + Command cmd = new PropertyDeleteCmd(propName, restrictedView); PropertyManagerProvider.this.plugin.getTool().execute(cmd, currentProgram); } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Utilities.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Utilities.java index 2b2ab540d1..1d2021ff7a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Utilities.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/objectiveC/ObjectiveC1_Utilities.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -121,7 +121,7 @@ public final class ObjectiveC1_Utilities { if (state.thumbCodeLocations.contains(address)) { Register tmodeRegister = state.program.getLanguage().getRegister("TMode"); if (tmodeRegister != null) { - Command c = + Command c = new SetRegisterCmd(tmodeRegister, address, address, BigInteger.valueOf(1)); c.applyTo(state.program); } @@ -300,7 +300,7 @@ public final class ObjectiveC1_Utilities { ObjectiveC1_Utilities.setThumbBit(state, address); - BackgroundCommand command = null; + BackgroundCommand command = null; command = new DisassembleCommand(address, null, true); command.applyTo(state.program, state.monitor); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/MarkupXmlMgr.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/MarkupXmlMgr.java index ec7ac60957..afcdf01706 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/MarkupXmlMgr.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/MarkupXmlMgr.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -218,7 +218,7 @@ class MarkupXmlMgr { RefType refType = getDefaultRefType(fromAddr, toAddr, opIndex); - Command cmd = null; + Command cmd = null; if (baseAddr != null) { long offset = toAddr.subtract(baseAddr); cmd = new AddOffsetMemRefCmd(fromAddr, toAddr, false, refType, diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/PropertiesXmlMgr.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/PropertiesXmlMgr.java index 02a8d77947..65b9631edb 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/PropertiesXmlMgr.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/PropertiesXmlMgr.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -124,7 +124,7 @@ class PropertiesXmlMgr { } if (!overwrite && !"bookmarks".equals(type)) { - PropertyMap map = propMapMgr.getPropertyMap(name); + PropertyMap map = propMapMgr.getPropertyMap(name); if (map != null && map.hasProperty(addr)) { log.appendMsg("Conflicting '" + name + "' PROPERTY ignored at: " + addr); return; // skip - property conflicts diff --git a/Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java b/Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java index ec2194cc5f..586741aff1 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java @@ -573,7 +573,7 @@ public class GhidraProject { * @param program * the program on which the command is to be applied. */ - public void execute(Command cmd, Program program) { + public void execute(Command cmd, Program program) { AutoAnalysisManager mgr = AutoAnalysisManager.getAnalysisManager(program); cmd.applyTo(program); mgr.initializeOptions(); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/bookmark/BookmarkEditCmdTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/bookmark/BookmarkEditCmdTest.java index e415b442fc..c7d318a379 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/bookmark/BookmarkEditCmdTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/bookmark/BookmarkEditCmdTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -58,7 +58,7 @@ public class BookmarkEditCmdTest extends AbstractGhidraHeadedIntegrationTest { private Address[] createBookmarks(ProgramLocation[] locs) { - CompoundCmd compoundCmd = new CompoundCmd("Create Bookmarks"); + CompoundCmd compoundCmd = new CompoundCmd<>("Create Bookmarks"); Address[] addrs = new Address[locs.length]; for (int i = 0; i < locs.length; i++) { diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/bookmark/BookmarkPluginTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/bookmark/BookmarkPluginTest.java index b640697696..55f9bb9e1a 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/bookmark/BookmarkPluginTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/bookmark/BookmarkPluginTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -484,7 +484,7 @@ public class BookmarkPluginTest extends AbstractGhidraHeadedIntegrationTest { // note: we want to test a specific code path, so we must delete more than 20 items // add more to our current set - CompoundCmd addCmd = new CompoundCmd("Add Bookmarks"); + CompoundCmd addCmd = new CompoundCmd<>("Add Bookmarks"); addCmd.add(new BookmarkEditCmd(addr("01001110"), "Type1", "Cat1a", "Cmt1A")); addCmd.add(new BookmarkEditCmd(addr("01001120"), "Type1", "Cat1a", "Cmt1B")); addCmd.add(new BookmarkEditCmd(addr("01001120"), "Type1", "Cat1b", "Cmt1C")); @@ -545,7 +545,7 @@ public class BookmarkPluginTest extends AbstractGhidraHeadedIntegrationTest { assertFalse(addressSet.contains(addr("01001100"))); assertFalse(addressSet.contains(addr("01001120"))); - CompoundCmd addCmd = new CompoundCmd("Add Bookmarks"); + CompoundCmd addCmd = new CompoundCmd<>("Add Bookmarks"); addCmd.add(new BookmarkEditCmd(addr("01001100"), "Type1", "Cat1a", "Cmt1A")); addCmd.add(new BookmarkEditCmd(addr("01001120"), "Type1", "Cat1a", "Cmt1B")); applyCmd(program, addCmd); @@ -558,7 +558,7 @@ public class BookmarkPluginTest extends AbstractGhidraHeadedIntegrationTest { @Test public void testDeleteOffcutBookmarks() throws Exception { - CompoundCmd addCmd = new CompoundCmd("Add Bookmarks"); + CompoundCmd addCmd = new CompoundCmd<>("Add Bookmarks"); Address a = addr("0100b6db"); for (int i = 0; i < 20; i++) { addCmd.add(new BookmarkEditCmd(a, "Type1", "Cat1a", "Cmt1A")); @@ -706,7 +706,7 @@ public class BookmarkPluginTest extends AbstractGhidraHeadedIntegrationTest { applyCmd(program, delCmd); // Add specific bookmarks - CompoundCmd addCmd = new CompoundCmd("Add Bookmarks"); + CompoundCmd addCmd = new CompoundCmd<>("Add Bookmarks"); addCmd.add(new BookmarkEditCmd(addr("01001010"), "Type1", "Cat1a", "Cmt1A")); addCmd.add(new BookmarkEditCmd(addr("01001020"), "Type1", "Cat1a", "Cmt1B")); addCmd.add(new BookmarkEditCmd(addr("01001020"), "Type1", "Cat1b", "Cmt1C")); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/codebrowser/CodeBrowserOptionsTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/codebrowser/CodeBrowserOptionsTest.java index 89675664f3..e812946360 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/codebrowser/CodeBrowserOptionsTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/codebrowser/CodeBrowserOptionsTest.java @@ -789,8 +789,8 @@ public class CodeBrowserOptionsTest extends AbstractGhidraHeadedIntegrationTest //--- Verify register variable markup options - Command cmd = new AddRegisterRefCmd(addr("0x1002d0b"), 0, program.getRegister("EDI"), - SourceType.USER_DEFINED); + Command cmd = new AddRegisterRefCmd(addr("0x1002d0b"), 0, + program.getRegister("EDI"), SourceType.USER_DEFINED); applyCmd(program, cmd); cb.updateNow(); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/DataReferencesTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/DataReferencesTest.java index e1a22dd4a2..55d736c2cf 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/DataReferencesTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/DataReferencesTest.java @@ -91,7 +91,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr(EXT_POINTERS_OFFSET + 23)); - Command cmd = new CreateStructureCmd(addr, 24); + Command cmd = new CreateStructureCmd(addr, 24); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr); @@ -127,7 +127,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr(EXT_POINTERS_OFFSET + 23)); - Command cmd = new CreateArrayCmd(addr, 6, new Pointer32DataType(), 4); + Command cmd = new CreateArrayCmd(addr, 6, new Pointer32DataType(), 4); cmd.applyTo(program); Symbol s = createLabel(addr, "ArrayA"); @@ -161,7 +161,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr(EXT_POINTERS_OFFSET + (4 * 24))); - Command cmd = new CreateStructureCmd(addr, 24); + Command cmd = new CreateStructureCmd(addr, 24); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr); @@ -207,11 +207,11 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { for (int i = 0; i < 4; i++) { Address a = addr(EXT_POINTERS_OFFSET + (i * 24)); - Command cmd = new CreateArrayCmd(a, 6, new Pointer32DataType(), 4); + Command cmd = new CreateArrayCmd(a, 6, new Pointer32DataType(), 4); cmd.applyTo(program); } - Command cmd = new CreateStructureCmd(addr, 4 * 24); + Command cmd = new CreateStructureCmd(addr, 4 * 24); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr); @@ -254,7 +254,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr(EXT_POINTERS_OFFSET + (4 * 24))); - Command cmd = new CreateArrayCmd(addr, 6, new Pointer32DataType(), 4); + Command cmd = new CreateArrayCmd(addr, 6, new Pointer32DataType(), 4); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr); @@ -294,7 +294,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr(EXT_POINTERS_OFFSET + (4 * 24))); - Command cmd = new CreateStructureCmd(addr, 24); + Command cmd = new CreateStructureCmd(addr, 24); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr); @@ -349,7 +349,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr.add(23)); - Command cmd = new ClearCmd(new AddressSet(addr, addr.add(23))); + Command cmd = new ClearCmd(new AddressSet(addr, addr.add(23))); cmd.applyTo(program); addr = addr(EXT_POINTERS_OFFSET + 2); @@ -407,7 +407,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address structAddr = addr(EXT_POINTERS_OFFSET); clearSymbols(structAddr, structAddr.add(23)); - Command cmd = new ClearCmd(new AddressSet(structAddr, structAddr.add(23))); + Command cmd = new ClearCmd(new AddressSet(structAddr, structAddr.add(23))); cmd.applyTo(program); structAddr = addr(EXT_POINTERS_OFFSET + 2); @@ -443,7 +443,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr.add(23)); - Command cmd = new ClearCmd(new AddressSet(addr, addr.add(23))); + Command cmd = new ClearCmd(new AddressSet(addr, addr.add(23))); cmd.applyTo(program); addr = addr(EXT_POINTERS_OFFSET + 2); @@ -488,7 +488,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr.add(7)); - Command cmd = new ClearCmd(new AddressSet(addr, addr.add(7))); + Command cmd = new ClearCmd(new AddressSet(addr, addr.add(7))); cmd.applyTo(program); addr = addr(EXT_POINTERS_OFFSET + 2); @@ -508,7 +508,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr.add(7)); - Command cmd = new ClearCmd(new AddressSet(addr, addr.add(7))); + Command cmd = new ClearCmd(new AddressSet(addr, addr.add(7))); cmd.applyTo(program); addr = addr(EXT_POINTERS_OFFSET + 2); @@ -528,7 +528,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr.add(7)); - Command cmd = new ClearCmd(new AddressSet(addr, addr.add(7))); + Command cmd = new ClearCmd(new AddressSet(addr, addr.add(7))); cmd.applyTo(program); addr = addr(EXT_POINTERS_OFFSET + 2); @@ -551,7 +551,7 @@ public class DataReferencesTest extends AbstractGhidraHeadedIntegrationTest { Address addr = addr(EXT_POINTERS_OFFSET); clearSymbols(addr, addr.add(7)); - Command cmd = new ClearCmd(new AddressSet(addr, addr.add(7))); + Command cmd = new ClearCmd(new AddressSet(addr, addr.add(7))); cmd.applyTo(program); addr = addr(EXT_POINTERS_OFFSET + 2); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/marker/MarkerTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/marker/MarkerTest.java index c44ff03dc9..191cc82beb 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/marker/MarkerTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/marker/MarkerTest.java @@ -287,7 +287,7 @@ public class MarkerTest extends AbstractGhidraHeadedIntegrationTest { @Test public void testToolTipMaxLines() throws Exception { tool.addPlugin(BookmarkPlugin.class.getName()); - CompoundCmd addCmd = new CompoundCmd("Add Bookmarks"); + CompoundCmd addCmd = new CompoundCmd<>("Add Bookmarks"); Address a = addr("0x0100b6db"); for (int i = 0; i < 20; i++) { addCmd.add(new BookmarkEditCmd(a, "Type1", "Cat1a", "Cmt1A_" + (i + 1))); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/navigation/NextPrevCodeUnitPluginTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/navigation/NextPrevCodeUnitPluginTest.java index b1dcd7c546..f40cd0a7fb 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/navigation/NextPrevCodeUnitPluginTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/navigation/NextPrevCodeUnitPluginTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -637,7 +637,7 @@ public class NextPrevCodeUnitPluginTest extends AbstractGhidraHeadedIntegrationT clearExisingBookmarks(); // add more to our current set - CompoundCmd addCmd = new CompoundCmd("Add Bookmarks"); + CompoundCmd addCmd = new CompoundCmd<>("Add Bookmarks"); addCmd.add(new BookmarkEditCmd(addr("01001110"), BookmarkType.ERROR, "Cat1a", "Cmt1A")); addCmd.add(new BookmarkEditCmd(addr("01001118"), BookmarkType.NOTE, "Cat1a", "Cmt1B")); addCmd.add(new BookmarkEditCmd(addr("01001120"), BookmarkType.ERROR, "Cat1a", "Cmt1B")); @@ -736,7 +736,7 @@ public class NextPrevCodeUnitPluginTest extends AbstractGhidraHeadedIntegrationT clearExisingBookmarks(); // add more to our current set - CompoundCmd addCmd = new CompoundCmd("Add Bookmarks"); + CompoundCmd addCmd = new CompoundCmd<>("Add Bookmarks"); addCmd.add(new BookmarkEditCmd(addr("01003e2c"), BookmarkType.WARNING, "Cat1a", "Cmt1A")); addCmd.add(new BookmarkEditCmd(addr("01003e2e"), BookmarkType.NOTE, "Cat1a", "Cmt1B")); addCmd.add(new BookmarkEditCmd(addr("01003e30"), BookmarkType.WARNING, "Cat1a", "Cmt1B")); @@ -803,7 +803,7 @@ public class NextPrevCodeUnitPluginTest extends AbstractGhidraHeadedIntegrationT String typeString = bob.getTypeString(); // add more to our current set - CompoundCmd addCmd = new CompoundCmd("Add Bookmarks"); + CompoundCmd addCmd = new CompoundCmd<>("Add Bookmarks"); addCmd.add(new BookmarkEditCmd(addr("0100529b"), typeString, "Cat1a", "Cmt1A")); addCmd.add(new BookmarkEditCmd(addr("0100529d"), BookmarkType.NOTE, "Cat1a", "Cmt1B")); addCmd.add(new BookmarkEditCmd(addr("0100529e"), typeString, "Cat1a", "Cmt1B")); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/scalartable/ScalarSearchTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/scalartable/ScalarSearchTest.java index 4d43a52d39..231f6990a3 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/scalartable/ScalarSearchTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/scalartable/ScalarSearchTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,9 +15,7 @@ */ package ghidra.app.plugin.core.scalartable; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.Assert.*; import java.util.ArrayList; import java.util.List; @@ -818,7 +816,7 @@ public class ScalarSearchTest extends AbstractGhidraHeadedIntegrationTest { assertTrue("Unable to apply data type at address: " + address, apply(createDataCommand)); } - private boolean apply(Command cmd) throws RollbackException { + private boolean apply(Command cmd) throws RollbackException { return cmd.applyTo(program); } diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symboltree/SymbolTreeNavigationTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symboltree/SymbolTreeNavigationTest.java index 9abc09db87..97e6e708f3 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symboltree/SymbolTreeNavigationTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symboltree/SymbolTreeNavigationTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -558,7 +558,7 @@ public class SymbolTreeNavigationTest extends AbstractProgramBasedTest { assertNull("Found a selected node when there should be no selection", node); } - public void applyCmd(Command cmd) throws RollbackException { + public void applyCmd(Command cmd) throws RollbackException { boolean success = applyCmd(program, cmd); assertTrue("Command failed - " + cmd.getName() + "; status = " + cmd.getStatusMsg(), success); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symtable/SymbolTablePluginTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symtable/SymbolTablePluginTest.java index ffa864b539..f622fa444d 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symtable/SymbolTablePluginTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symtable/SymbolTablePluginTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -1438,7 +1438,8 @@ public class SymbolTablePluginTest extends AbstractGhidraHeadedIntegrationTest { private void addLabel(String label, String namespaceName, Address address) throws Exception { Namespace namespace = null; if (namespaceName != null) { - Command command = new CreateNamespacesCmd(namespaceName, SourceType.USER_DEFINED); + Command command = + new CreateNamespacesCmd(namespaceName, SourceType.USER_DEFINED); if (tool.execute(command, program)) { List namespaces = NamespaceUtils.getNamespaceByPath(program, null, namespaceName); @@ -1450,7 +1451,8 @@ public class SymbolTablePluginTest extends AbstractGhidraHeadedIntegrationTest { } } - Command command = new AddLabelCmd(address, label, namespace, SourceType.USER_DEFINED); + Command command = + new AddLabelCmd(address, label, namespace, SourceType.USER_DEFINED); tool.execute(command, program); waitForNotBusy(); } @@ -1700,7 +1702,7 @@ public class SymbolTablePluginTest extends AbstractGhidraHeadedIntegrationTest { waitForSwing(); int max = symbolTable.getRowCount(); for (int i = 0; i < max; i++) { - Symbol s = (Symbol) symbolTable.getValueAt(i, SymbolTableModel.LABEL_COL); + Symbol s = (Symbol) symbolTable.getValueAt(i, AbstractSymbolTableModel.LABEL_COL); if (s == null) { continue; // symbol deleted } diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/util/viewer/field/OperandFieldFactoryTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/util/viewer/field/OperandFieldFactoryTest.java index af158966c5..f483d6cc46 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/util/viewer/field/OperandFieldFactoryTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/util/viewer/field/OperandFieldFactoryTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -294,7 +294,7 @@ public class OperandFieldFactoryTest extends AbstractGhidraHeadedIntegrationTest structure.add(IntegerDataType.dataType, "field3", "Comment 3"); Address arrayAddr = addr("01001888"); - Command cmd = new CreateArrayCmd(arrayAddr, 3, structure, 12); + Command cmd = new CreateArrayCmd(arrayAddr, 3, structure, 12); applyCmd(program, cmd); String arrayName = "ArrayOfStructures"; @@ -330,7 +330,7 @@ public class OperandFieldFactoryTest extends AbstractGhidraHeadedIntegrationTest structure.add(IntegerDataType.dataType, "field3", "Comment 3"); Address structAddr = addr("01001888"); - Command cmd = new CreateStructureCmd(structure, structAddr); + Command cmd = new CreateStructureCmd(structure, structAddr); applyCmd(program, cmd); String structName = "Structure"; @@ -358,7 +358,7 @@ public class OperandFieldFactoryTest extends AbstractGhidraHeadedIntegrationTest //================================================================================================== protected void disassembleAt(Address addr) { - Command cmd = new DisassembleCommand(addr, null, false); + Command cmd = new DisassembleCommand(addr, null, false); applyCmd(program, cmd); waitForSwing(); } diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/model/data/StructureFactoryTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/model/data/StructureFactoryTest.java index d488458bca..1eaea7680d 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/model/data/StructureFactoryTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/model/data/StructureFactoryTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -256,7 +256,8 @@ public class StructureFactoryTest extends AbstractGhidraHeadedIntegrationTest { // create a valid structure... int defaultPtrLen = program.getAddressFactory().getDefaultAddressSpace().getPointerSize(); - Command cmd = new CreateStructureCmd("TestStructA", addr(startOffset), structureLength); + Command cmd = + new CreateStructureCmd("TestStructA", addr(startOffset), structureLength); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr(startOffset)); diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateArrayInStructureCmdTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateArrayInStructureCmdTest.java index 290036226b..9f7c28cb9b 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateArrayInStructureCmdTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateArrayInStructureCmdTest.java @@ -72,7 +72,7 @@ public class CreateArrayInStructureCmdTest extends AbstractGenericTest { Address addr = addr(UNDEFINED_AREA); int structLen = 30; - Command cmd = new CreateStructureCmd(addr, structLen); + Command cmd = new CreateStructureCmd(addr, structLen); cmd.applyTo(program); DataType dt = new Pointer16DataType(new ByteDataType()); @@ -120,7 +120,7 @@ public class CreateArrayInStructureCmdTest extends AbstractGenericTest { struct1.add(new DWordDataType()); struct1.add(new QWordDataType()); - Command cmd = new CreateDataCmd(addr(startOffset + 1), struct1); + Command cmd = new CreateDataCmd(addr(startOffset + 1), struct1); cmd.applyTo(program); Data dataAt = program.getListing().getDataAt(addr(startOffset + 1)); struct1 = (Structure) dataAt.getDataType(); diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateDataInStructureBackgroundCmdTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateDataInStructureBackgroundCmdTest.java index 1cbf0851f6..4d8d76bd8d 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateDataInStructureBackgroundCmdTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateDataInStructureBackgroundCmdTest.java @@ -69,7 +69,7 @@ public class CreateDataInStructureBackgroundCmdTest extends AbstractGenericTest int structLen = (2 * defaultPtrLen) + 2; - Command cmd = new CreateStructureCmd(addr(startOffset), structLen); + Command cmd = new CreateStructureCmd(addr(startOffset), structLen); cmd.applyTo(program); cmd = new CreateDataInStructureBackgroundCmd(addr(startOffset), new int[] { 0 }, 2, @@ -126,7 +126,7 @@ public class CreateDataInStructureBackgroundCmdTest extends AbstractGenericTest int structLen = (2 * defaultPtrLen) + (2 * structA.getLength()); - Command cmd = new CreateStructureCmd(addr(startOffset), structLen); + Command cmd = new CreateStructureCmd(addr(startOffset), structLen); cmd.applyTo(program); cmd = new CreateDataInStructureBackgroundCmd(addr(startOffset), new int[] { 0 }, @@ -175,7 +175,7 @@ public class CreateDataInStructureBackgroundCmdTest extends AbstractGenericTest long startOffset = UNDEFINED_AREA; int structLen = 4; - Command cmd = new CreateStructureCmd(addr(startOffset), structLen); + Command cmd = new CreateStructureCmd(addr(startOffset), structLen); cmd.applyTo(program); cmd = new CreateDataInStructureBackgroundCmd(addr(startOffset), new int[] { 0 }, 4, diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateDataInStructureCmdTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateDataInStructureCmdTest.java index fe0ef4000d..7e5ebdaf16 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateDataInStructureCmdTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateDataInStructureCmdTest.java @@ -69,7 +69,7 @@ public class CreateDataInStructureCmdTest extends AbstractGenericTest { int structLen = defaultPtrLen + 1; - Command cmd = new CreateStructureCmd(addr(startOffset), structLen); + Command cmd = new CreateStructureCmd(addr(startOffset), structLen); cmd.applyTo(program); cmd = new CreateDataInStructureCmd(addr(startOffset), new int[] { 0 }, new ByteDataType()); @@ -116,7 +116,7 @@ public class CreateDataInStructureCmdTest extends AbstractGenericTest { int structLen = defaultPtrLen + structA.getLength(); - Command cmd = new CreateStructureCmd(addr(startOffset), structLen); + Command cmd = new CreateStructureCmd(addr(startOffset), structLen); cmd.applyTo(program); cmd = new CreateDataInStructureCmd(addr(startOffset), new int[] { 0 }, structA); @@ -155,7 +155,7 @@ public class CreateDataInStructureCmdTest extends AbstractGenericTest { long startOffset = UNDEFINED_AREA; int structLen = 1; - Command cmd = new CreateStructureCmd(addr(startOffset), structLen); + Command cmd = new CreateStructureCmd(addr(startOffset), structLen); cmd.applyTo(program); cmd = new CreateDataInStructureCmd(addr(startOffset), new int[] { 0 }, new ByteDataType()); @@ -203,7 +203,7 @@ public class CreateDataInStructureCmdTest extends AbstractGenericTest { struct1.add(adt); struct1.add(new WordDataType()); - Command cmd = new CreateDataCmd(addr(startOffset + 1000), struct1); + Command cmd = new CreateDataCmd(addr(startOffset + 1000), struct1); cmd.applyTo(program); Data dataAt = program.getListing().getDataAt(addr(startOffset + 1000)); struct1 = (Structure) dataAt.getDataType(); diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateStructureInStructureCmdTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateStructureInStructureCmdTest.java index 39d4c500a5..11c1e9c623 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateStructureInStructureCmdTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/data/CreateStructureInStructureCmdTest.java @@ -102,7 +102,7 @@ public class CreateStructureInStructureCmdTest extends AbstractGenericTest { offset = createArray(offset, 8, 4, stringPtr); int structLen = (int) (offset - startOffset); - Command cmd = new CreateStructureCmd("TestStructA", addr(startOffset), structLen); + Command cmd = new CreateStructureCmd("TestStructA", addr(startOffset), structLen); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr(startOffset)); @@ -179,7 +179,7 @@ public class CreateStructureInStructureCmdTest extends AbstractGenericTest { offset = createArray(offset, 8, 4, stringPtr); int structLen = (int) (offset - startOffset); - Command cmd = new CreateStructureCmd("TestStructA", addr(startOffset), structLen); + Command cmd = new CreateStructureCmd("TestStructA", addr(startOffset), structLen); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr(startOffset)); diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/function/CreateFunctionCmdWithFlowTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/function/CreateFunctionCmdWithFlowTest.java index b07a2634d4..e20c473a88 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/function/CreateFunctionCmdWithFlowTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/function/CreateFunctionCmdWithFlowTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,6 @@ import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; -import generic.test.AbstractGenericTest; import ghidra.app.plugin.core.analysis.AnalysisBackgroundCommand; import ghidra.app.plugin.core.analysis.AutoAnalysisManager; import ghidra.framework.cmd.Command; @@ -30,7 +29,6 @@ import ghidra.program.database.ProgramBuilder; import ghidra.program.database.function.OverlappingFunctionException; import ghidra.program.model.address.*; import ghidra.program.model.listing.*; -import ghidra.program.model.symbol.SourceType; import ghidra.test.AbstractGhidraHeadedIntegrationTest; import ghidra.test.TestEnv; @@ -78,7 +76,7 @@ public class CreateFunctionCmdWithFlowTest extends AbstractGhidraHeadedIntegrati AutoAnalysisManager analysisMgr = AutoAnalysisManager.getAnalysisManager(program); analysisMgr.reAnalyzeAll(null); - Command cmd = new AnalysisBackgroundCommand(analysisMgr, false); + Command cmd = new AnalysisBackgroundCommand(analysisMgr, false); tool.execute(cmd, program); waitForBusyTool(tool); } diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/AddLabelCmdTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/AddLabelCmdTest.java index f8ab6715de..5e3a91f7fb 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/AddLabelCmdTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/AddLabelCmdTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -263,7 +263,7 @@ public class AddLabelCmdTest extends AbstractGenericTest { return p.getSymbolTable().getPrimarySymbol(addr); } - private boolean execute(Command cmd) { + private boolean execute(Command cmd) { int txId = notepad.startTransaction("Transaction"); boolean result = cmd.applyTo(notepad); notepad.endTransaction(txId, true); diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/CreateNamespacesCmdTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/CreateNamespacesCmdTest.java index c6d1485b0e..117bf9c4c6 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/CreateNamespacesCmdTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/CreateNamespacesCmdTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -68,7 +68,8 @@ public class CreateNamespacesCmdTest extends AbstractGenericTest { String[] namespaces1 = new String[] { "Global", "child1", "child2" }; String namespaceString1 = createNamespaceStringFromArray(namespaces1); - Command command = new CreateNamespacesCmd(namespaceString1, SourceType.USER_DEFINED); + Command command = + new CreateNamespacesCmd(namespaceString1, SourceType.USER_DEFINED); boolean success = execute(command); assertTrue("Failed to create namespaces from string: " + namespaceString1 + "\nMessage: " + command.getStatusMsg(), success); @@ -348,7 +349,7 @@ public class CreateNamespacesCmdTest extends AbstractGenericTest { } } - private boolean execute(Command cmd) { + private boolean execute(Command cmd) { int txId = program.startTransaction("Transaction"); boolean result = cmd.applyTo(program); program.endTransaction(txId, true); diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/memory/AddMemoryBlockCmdTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/memory/AddMemoryBlockCmdTest.java index 36c4fb80f5..7f3f11f679 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/memory/AddMemoryBlockCmdTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/cmd/memory/AddMemoryBlockCmdTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ import ghidra.util.exception.RollbackException; public class AddMemoryBlockCmdTest extends AbstractGenericTest { private Program notepad; private Program x08; - private Command command; + private Command command; public AddMemoryBlockCmdTest() { super(); @@ -73,7 +73,7 @@ public class AddMemoryBlockCmdTest extends AbstractGenericTest { assertEquals(block.getName(), f.getName()); } - private boolean applyCmd(Program p, Command c) { + private boolean applyCmd(Program p, Command c) { int txId = p.startTransaction(c.getName()); boolean commit = true; try { diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/plugin/core/comments/EolCommentsTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/plugin/core/comments/EolCommentsTest.java index 7901707024..25ed5fa493 100644 --- a/Ghidra/Features/Base/src/test/java/ghidra/app/plugin/core/comments/EolCommentsTest.java +++ b/Ghidra/Features/Base/src/test/java/ghidra/app/plugin/core/comments/EolCommentsTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,8 +33,7 @@ import ghidra.program.database.ProgramBuilder; import ghidra.program.database.ProgramDB; import ghidra.program.model.address.Address; import ghidra.program.model.address.AddressFactory; -import ghidra.program.model.listing.CodeUnit; -import ghidra.program.model.listing.Listing; +import ghidra.program.model.listing.*; import ghidra.program.model.symbol.RefType; import ghidra.program.model.symbol.SourceType; import ghidra.test.AbstractGhidraHeadlessIntegrationTest; @@ -96,7 +95,7 @@ public class EolCommentsTest extends AbstractGenericTest { @Test public void testReferenceToStringData() throws Exception { - Command cmd = new AddMemRefCmd(addr("0x1001000"), addr("0x1001234"), + Command cmd = new AddMemRefCmd(addr("0x1001000"), addr("0x1001234"), SourceType.USER_DEFINED, 0, true); applyCmd(cmd); @@ -115,7 +114,7 @@ public class EolCommentsTest extends AbstractGenericTest { Address dataStartAddress = addr("0x1001234"); Address offcutAddress = dataStartAddress.add(2); - Command cmd = + Command cmd = new AddMemRefCmd(addr("0x1001000"), offcutAddress, SourceType.USER_DEFINED, 0, true); applyCmd(cmd); @@ -138,7 +137,7 @@ public class EolCommentsTest extends AbstractGenericTest { Address dataStartAddress = addr("0x1001234"); Address offcutAddress = dataStartAddress.add(2); - Command cmd = + Command cmd = new AddMemRefCmd(addr("0x1001000"), offcutAddress, SourceType.USER_DEFINED, 0, true); applyCmd(cmd); @@ -165,7 +164,7 @@ public class EolCommentsTest extends AbstractGenericTest { // Address dataStartAddress = addr("0x1001234"); Address offcutAddress = dataStartAddress.add(4); - Command cmd = + Command cmd = new AddMemRefCmd(addr("0x1001000"), offcutAddress, SourceType.USER_DEFINED, 0, true); applyCmd(cmd); @@ -226,7 +225,7 @@ public class EolCommentsTest extends AbstractGenericTest { assertEquals(0, comments.size()); } - public boolean applyCmd(Command cmd) throws RollbackException { + public boolean applyCmd(Command cmd) throws RollbackException { return AbstractGhidraHeadlessIntegrationTest.applyCmd(program, cmd); } diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/RemoveLabelAction.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/RemoveLabelAction.java index 0e93d19d56..e809aea9ee 100644 --- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/RemoveLabelAction.java +++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/RemoveLabelAction.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,6 +27,7 @@ import ghidra.app.plugin.core.decompile.DecompilerActionContext; import ghidra.app.util.HelpTopics; import ghidra.framework.cmd.Command; import ghidra.framework.plugintool.PluginTool; +import ghidra.program.model.listing.Program; import ghidra.program.model.symbol.SourceType; import ghidra.program.model.symbol.Symbol; import ghidra.util.HelpLocation; @@ -64,7 +65,8 @@ public class RemoveLabelAction extends AbstractDecompilerAction { @Override protected void decompilerActionPerformed(DecompilerActionContext context) { Symbol s = getSymbol(context); - Command cmd = new DeleteLabelCmd(s.getAddress(), s.getName(), s.getParentNamespace()); + Command cmd = + new DeleteLabelCmd(s.getAddress(), s.getName(), s.getParentNamespace()); PluginTool tool = context.getTool(); if (!tool.execute(cmd, context.getProgram())) { tool.setStatusInfo(cmd.getStatusMsg()); diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/filters/TagFilterEditorDialog.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/filters/TagFilterEditorDialog.java index 606303fc2b..127d26c218 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/filters/TagFilterEditorDialog.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/filters/TagFilterEditorDialog.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -157,7 +157,7 @@ public class TagFilterEditorDialog extends DialogComponentProvider implements Ta // Inner Classes //================================================================================================== - private class TagListModel extends DefaultListModel { + private class TagListModel extends DefaultListModel { TagListModel(Map allTags, Map excludedTags) { for (Map.Entry entry : allTags.entrySet()) { boolean isExcluded = excludedTags.containsKey(entry.getKey()); diff --git a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/layout/LayoutLocationMap.java b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/layout/LayoutLocationMap.java index 1ceab2a107..c21a661abc 100644 --- a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/layout/LayoutLocationMap.java +++ b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/layout/LayoutLocationMap.java @@ -180,7 +180,7 @@ public class LayoutLocationMap { return row; } - public int gridX(Column col) { + public int gridX(Column col) { return col.index; } diff --git a/Ghidra/Processors/ARM/src/test.slow/java/ghidra/app/plugin/core/analysis/ArmBranchReturnDetectionTest.java b/Ghidra/Processors/ARM/src/test.slow/java/ghidra/app/plugin/core/analysis/ArmBranchReturnDetectionTest.java index b6237856c3..edb3e6088d 100644 --- a/Ghidra/Processors/ARM/src/test.slow/java/ghidra/app/plugin/core/analysis/ArmBranchReturnDetectionTest.java +++ b/Ghidra/Processors/ARM/src/test.slow/java/ghidra/app/plugin/core/analysis/ArmBranchReturnDetectionTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,17 +19,12 @@ import static org.junit.Assert.*; import org.junit.*; -import ghidra.app.plugin.core.analysis.AnalysisBackgroundCommand; -import ghidra.app.plugin.core.analysis.AutoAnalysisManager; import ghidra.framework.cmd.Command; import ghidra.framework.options.Options; import ghidra.framework.plugintool.PluginTool; import ghidra.program.database.ProgramBuilder; -import ghidra.program.model.address.AddressSet; -import ghidra.program.model.data.DWordDataType; -import ghidra.program.model.data.DataType; -import ghidra.program.model.listing.*; -import ghidra.program.model.symbol.SourceType; +import ghidra.program.model.listing.Instruction; +import ghidra.program.model.listing.Program; import ghidra.test.AbstractGhidraHeadedIntegrationTest; import ghidra.test.TestEnv; @@ -67,7 +62,7 @@ public class ArmBranchReturnDetectionTest extends AbstractGhidraHeadedIntegratio AutoAnalysisManager analysisMgr = AutoAnalysisManager.getAnalysisManager(program); analysisMgr.reAnalyzeAll(null); - Command cmd = new AnalysisBackgroundCommand(analysisMgr, false); + Command cmd = new AnalysisBackgroundCommand(analysisMgr, false); tool.execute(cmd, program); waitForBusyTool(tool); } diff --git a/Ghidra/Processors/JVM/src/main/java/ghidra/javaclass/analyzers/JavaAnalyzer.java b/Ghidra/Processors/JVM/src/main/java/ghidra/javaclass/analyzers/JavaAnalyzer.java index d5be33d38f..8bdb79e4ba 100644 --- a/Ghidra/Processors/JVM/src/main/java/ghidra/javaclass/analyzers/JavaAnalyzer.java +++ b/Ghidra/Processors/JVM/src/main/java/ghidra/javaclass/analyzers/JavaAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -433,7 +433,7 @@ public class JavaAnalyzer extends AbstractJavaAnalyzer implements AnalysisWorker Data referredData = constantPoolData.getComponent(indexMap.get(index)); instruction.addOperandReference(0, referredData.getAddress(), RefType.DATA, SourceType.ANALYSIS); - CompoundCmd cmd = new CompoundCmd("Add constant pool reference"); + CompoundCmd cmd = new CompoundCmd<>("Add constant pool reference"); String constantPoolLabel = "CPOOL[" + index + "]"; cmd.add( new AddLabelCmd(referredData.getAddress(), constantPoolLabel, SourceType.ANALYSIS)); diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/app/cmd/function/CreateFunctionThunkTest.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/app/cmd/function/CreateFunctionThunkTest.java index d81677c609..da283cee29 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/app/cmd/function/CreateFunctionThunkTest.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/app/cmd/function/CreateFunctionThunkTest.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,12 +25,10 @@ import ghidra.framework.cmd.Command; import ghidra.framework.options.Options; import ghidra.framework.plugintool.PluginTool; import ghidra.program.database.ProgramBuilder; -import ghidra.program.model.address.AddressSet; import ghidra.program.model.data.DWordDataType; import ghidra.program.model.data.DataType; import ghidra.program.model.listing.*; import ghidra.program.model.symbol.Reference; -import ghidra.program.model.symbol.SourceType; import ghidra.test.AbstractGhidraHeadedIntegrationTest; import ghidra.test.TestEnv; @@ -69,7 +67,7 @@ public class CreateFunctionThunkTest extends AbstractGhidraHeadedIntegrationTest AutoAnalysisManager analysisMgr = AutoAnalysisManager.getAnalysisManager(program); analysisMgr.reAnalyzeAll(null); - Command cmd = new AnalysisBackgroundCommand(analysisMgr, false); + Command cmd = new AnalysisBackgroundCommand(analysisMgr, false); tool.execute(cmd, program); waitForBusyTool(tool); }