GP-0: Fixing @Override warnings

This commit is contained in:
Ryan Kurtz 2025-05-29 06:16:20 -04:00
parent d4120b4b4d
commit a6cd5b5dbc
449 changed files with 2348 additions and 1276 deletions

View file

@ -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; }
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;}
}

View file

@ -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<VarnodeSymbol>{
}
class VarnodeSymbolCompare implements Comparator<VarnodeSymbol> {
@Override
public int compare( VarnodeSymbol op1, VarnodeSymbol op2 ) {
return op1.getFixedVarnode().compareTo(op2.getFixedVarnode());
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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<File> {
this.compareCase = compareCase;
}
public Iterator<File> iterator() {
@Override
public Iterator<File> iterator() {
return new BreadthFirstDirectoryVisitor(startingDirectories, directoryFilter, filter, compareCase);
}
@ -82,19 +83,22 @@ public class DirectoryVisitor implements Iterable<File> {
private final Comparator<File> comparator;
private static final Comparator<File> CASE_SENSITIVE = new Comparator<File>() {
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<File> CASE_INSENSITIVE = new Comparator<File>() {
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<File> {
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<File> {
}
}
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();
}
}

View file

@ -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<Boolean, String> lookup(String key) {
@Override
public Pair<Boolean, String> 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);
}
}

View file

@ -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<SleighSymbol>{
}
class SymbolCompare implements Comparator<SleighSymbol> {
@Override
public int compare( SleighSymbol o1, SleighSymbol o2 ) {
return o1.getName().compareTo(o2.getName());
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);

View file

@ -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;

View file

@ -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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -61,6 +61,7 @@ class CompositeDBAdapterV0 extends CompositeDBAdapter implements RecordTranslato
}
}
@Override
int getVersion() {
return compositeTable.getSchema().getVersion();
}

View file

@ -67,6 +67,7 @@ class CompositeDBAdapterV1 extends CompositeDBAdapter implements RecordTranslato
}
}
@Override
int getVersion() {
return compositeTable.getSchema().getVersion();
}

View file

@ -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);
}

View file

@ -98,6 +98,7 @@ class EnumValueDBAdapterV1 extends EnumValueDBAdapter {
return table.iterator();
}
@Override
void deleteTable(DBHandle handle) throws IOException {
handle.deleteTable(table.getName());
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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) {
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -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();
}

View file

@ -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<AddressRange> 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());

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);

View file

@ -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);

View file

@ -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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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);
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -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);
}

View file

@ -29,7 +29,8 @@ public class AddressRangeToAddressComparator implements Comparator<Object> {
* @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);
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -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();
}

View file

@ -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;
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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));

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;

View file

@ -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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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<CompilerSpecDescription> getCompatibleCompilerSpecDescriptions() {
return new ArrayList<CompilerSpecDescription>(compatibleCompilerSpecs.values());
}
@Override
public CompilerSpecDescription getCompilerSpecDescriptionByID(CompilerSpecID compilerSpecID)
throws CompilerSpecNotFoundException {
CompilerSpecDescription compilerSpecDescription =

View file

@ -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);
/**

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -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<RegisterTree> {
/**
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
@Override
public int compareTo(RegisterTree other) {
return name.compareTo(other.name);
}

View file

@ -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<Bookmark> {
* 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();

View file

@ -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<BookmarkType> {
* 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());
}

View file

@ -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.

View file

@ -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();
/**

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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<ExternalLocation> {
/**
* 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();
}

View file

@ -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;
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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();
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in 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;
}