GP-0: Fixing javadoc warnings

This commit is contained in:
Ryan Kurtz 2024-08-19 11:39:05 -04:00
parent 2c3a815163
commit 3588ecdab7
18 changed files with 76 additions and 73 deletions

View File

@ -220,7 +220,7 @@ public interface DbgEngGadpServer extends AutoCloseable {
* {@link #terminate()}, or 3) When an error occurs causing the server to terminate
* unexpectedly. Otherwise, it returns true.
*
* @returns true if the server is currently running.
* @return true if the server is currently running.
*/
public boolean isRunning();

View File

@ -176,7 +176,7 @@ public interface FridaGadpServer extends AutoCloseable {
* {@link #terminate()}, or 3) When an error occurs causing the server to terminate
* unexpectedly. Otherwise, it returns true.
*
* @returns true if the server is currently running.
* @return true if the server is currently running.
*/
public boolean isRunning();

View File

@ -176,7 +176,7 @@ public interface LldbGadpServer extends AutoCloseable {
* {@link #terminate()}, or 3) When an error occurs causing the server to terminate
* unexpectedly. Otherwise, it returns true.
*
* @returns true if the server is currently running.
* @return true if the server is currently running.
*/
public boolean isRunning();

View File

@ -21,7 +21,8 @@ import java.util.*;
/**
* A class that will demangle Rust symbols mangled according to the V0 format. This class
* implements the grammar that will translate a mangled string into a demangled one.
* Documentation is {@link "https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html"} here.
*
* @see <a href="https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html">2603-rust-symbol-name-mangling-v0.html</a>
*/
public class RustDemanglerV0 {

View File

@ -223,7 +223,7 @@ public class InstructionSearchUtils {
}
/**
* Peforms a bitwise & on the given arrays.
* Performs a bitwise AND on the given arrays.
*
* @param mask
* @param bytes

View File

@ -181,9 +181,8 @@ public final class ReferenceUtils {
* @throws CancelledException if the monitor is cancelled.
* @deprecated use {@link #findDataTypeFieldReferences(Accumulator, FieldMatcher, Program,
* boolean, TaskMonitor)}.
* @Deprecated(since = "10.2")
*/
@Deprecated
@Deprecated(since = "10.2")
public static void findDataTypeReferences(Accumulator<LocationReference> accumulator,
DataType dataType, String fieldName, Program program, TaskMonitor monitor)
throws CancelledException {

View File

@ -72,7 +72,7 @@ public class BundleHost {
private List<BundleHostListener> listeners = new CopyOnWriteArrayList<>();
/**
* If a {@link GhidraBundle} hasn't already been added for {@bundleFile}, add it now as a
* If a {@link GhidraBundle} hasn't already been added for {@code bundleFile}, add it now as a
* non-system bundle.
*
* <p>Enable the bundle.

View File

@ -60,10 +60,10 @@ public class SwiftUtils {
}
/**
* Checks if the given {@List} of section names contains a Swift section name
* Checks if the given {@link List} of section names contains a Swift section name
*
* @param sectionNames The {@link List} of section names to check
* @return True if the given {@List} of section names contains a Swift section name; otherwise,
* @return True if the given {@link List} of section names contains a Swift section name; otherwise,
* false
*/
public static boolean isSwift(List<String> sectionNames) {

View File

@ -49,7 +49,7 @@ public interface LayoutPixelIndexMap {
* coordinate. In essence, this maps from vertical position, relative to the main panel's
* viewport, to layout index. This accounts for scrolling and non-uniform height among the
* layouts.
*
* <p>
* @implNote Clients should avoid frequent calls to this method. Even though it can be
* implemented easily in log time, an invocation for every pixel or line of pixels
* painted could still be unnecessarily expensive. It should only be necessary to call

View File

@ -27,7 +27,7 @@ public final class ArtImageSectionsFactory {
* this method will return the appropriate section one.
* @param reader the binary reader for the ART file
* @param artHeader the ART Header containing the sections
* @returns the ImageSections for the specified ART version
* @return the ImageSections for the specified ART version
*/
public static ArtImageSections getArtImageSections(BinaryReader reader, ArtHeader artHeader)
throws IOException {

View File

@ -91,9 +91,8 @@ interface BTreeNode {
* @return true if consistency check passed, else false
* @param tableName name of table containing this node
* @param monitor task monitor
* @throws IOException if IO error occured
* @throws IOException if IO error occurred
* @throws CancelledException if task cancelled
* @{@link ThrowsTag} CancelledException
*/
public boolean isConsistent(String tableName, TaskMonitor monitor)
throws IOException, CancelledException;

View File

@ -224,7 +224,7 @@ class FixedKeyVarRecNode extends FixedKeyRecordNode {
/**
* Find the index which represents the halfway point within the record data.
* @returns key index.
* @return key index.
*/
private int getSplitIndex() {

View File

@ -56,7 +56,7 @@ public class EmptyTextField implements Field {
/**
* Returns true if the cursor is allowed past the last character. This
* field always returns false since there is no text.
* @returns true if the cursor is allowed past the last character
* @return true if the cursor is allowed past the last character
*/
public boolean isAllowCursorAtEnd() {
return false;

View File

@ -56,10 +56,10 @@ public class SleighInstructionDecoder implements InstructionDecoder {
/**
* Construct a Sleigh instruction decoder
*
* @see {@link DefaultPcodeThread#createInstructionDecoder(PcodeExecutorState)}
* @param language the language to decoder
* @param state the state containing the target program, probably the shared state of the p-code
* machine. It must be possible to obtain concrete buffers on this state.
* @see DefaultPcodeThread#createInstructionDecoder(PcodeExecutorState)
*/
public SleighInstructionDecoder(Language language, PcodeExecutorState<?> state) {
this.language = language;

View File

@ -40,9 +40,9 @@ public class ThreadPcodeExecutorState<T> implements PcodeExecutorState<T> {
/**
* Create a multiplexed state
*
* @see {@link DefaultPcodeThread#DefaultPcodeThread(String, AbstractPcodeMachine)}
* @param sharedState the shared part of the state
* @param localState the thread-local part of the state
* @see DefaultPcodeThread#DefaultPcodeThread(String, AbstractPcodeMachine)
*/
public ThreadPcodeExecutorState(PcodeExecutorState<T> sharedState,
PcodeExecutorState<T> localState) {

View File

@ -308,17 +308,20 @@ public abstract class AbstractWeakValueMap<K, V> implements Map<K, V> {
/**
* Class that provides a {@link Set} view of the entry set of this map that is backed live
* by this map. Its main job is to translate from Map.Entry<K, WeakValueRef<V>> to
* Map.Entry<K,V>. The heavy lifting is done by the EntryIterator. The super class implements
* all the rest of the methods by leveraging the iterator. We implement
* by this map. Its main job is to translate from {@code Map.Entry<K, WeakValueRef<V>>} to
* {@code Map.Entry<K,V>}. The heavy lifting is done by the {@link EntryIterator}. The super
* class implements all the rest of the methods by leveraging the iterator. We implement
* contains, remove, and clear as they can be implemented much more efficiently than the
* default implementation which iterates over all the values to do those operations.
*/
private class EntrySet extends AbstractSet<Map.Entry<K, V>> {
@Override
public Iterator<Map.Entry<K, V>> iterator() {
return new EntryIterator();
}
@Override
public boolean contains(Object o) {
if (o instanceof Map.Entry<?, ?> e) {
Object key = e.getKey();
@ -328,6 +331,7 @@ public abstract class AbstractWeakValueMap<K, V> implements Map<K, V> {
return false;
}
@Override
public boolean remove(Object o) {
if (o instanceof Map.Entry<?, ?> e) {
Object key = e.getKey();
@ -341,10 +345,12 @@ public abstract class AbstractWeakValueMap<K, V> implements Map<K, V> {
}
@Override
public int size() {
return AbstractWeakValueMap.this.size();
}
@Override
public void clear() {
AbstractWeakValueMap.this.clear();
}

View File

@ -143,23 +143,23 @@ public class ProjectLocator {
}
/**
* @returns true if this project URL corresponds to a transient project
* (e.g., corresponds to remote Ghidra URL)
* {@return true if this project URL corresponds to a transient project
* (e.g., corresponds to remote Ghidra URL)}
*/
public boolean isTransient() {
return false;
}
/**
* @returns the URL associated with this local project. If using a temporary transient
* project location this URL should not be used.
* {@return the URL associated with this local project. If using a temporary transient
* project location this URL should not be used.}
*/
public URL getURL() {
return url;
}
/**
* @returns the name of the project identified by this project info.
* {@return the name of the project identified by this project info.}
*/
public String getName() {
return name;
@ -168,6 +168,7 @@ public class ProjectLocator {
/**
* Get the location of the project which will contain marker file
* ({@link #getMarkerFile()}) and project directory ({@link #getProjectDir()}).
* <p>
* Note: directory may or may not exist.
* @return project location directory
*/
@ -176,29 +177,28 @@ public class ProjectLocator {
}
/**
* @returns the project directory
* {@return the project directory}
*/
public File getProjectDir() {
return new File(location, name + PROJECT_DIR_SUFFIX);
}
/**
* @returns the file that indicates a Ghidra project.
* {@return the file that indicates a Ghidra project.}
*/
public File getMarkerFile() {
return new File(location, name + PROJECT_FILE_SUFFIX);
}
/**
* @returns project lock file to prevent multiple accesses to the
* same project at once.
* {@return project lock file to prevent multiple accesses to the same project at once.}
*/
public File getProjectLockFile() {
return new File(location, name + LOCK_FILE_SUFFIX);
}
/**
* @returns the project directory file extension.
* {@return the project directory file extension.}
*/
public static String getProjectDirExtension() {
return PROJECT_DIR_SUFFIX;
@ -230,23 +230,22 @@ public class ProjectLocator {
}
/**
* @returns the file extension suitable for creating file filters for the file chooser.
* {@return the file extension suitable for creating file filters for the file chooser}
*/
public static String getProjectExtension() {
return PROJECT_FILE_SUFFIX;
}
/**
* Returns whether the given file is a project directory.
* {@return whether the given file is a project directory.}
* @param file file to check
* @return true if the file is a project directory
*/
public static boolean isProjectDir(File file) {
return file.isDirectory() && file.getName().endsWith(PROJECT_DIR_SUFFIX);
}
/**
* @returns true if project storage exists
* {@return true if project storage exists}
*/
public boolean exists() {
return getMarkerFile().isFile() && getProjectDir().isDirectory();

View File

@ -31,10 +31,9 @@ import ghidra.util.Msg;
* {@link #formatOpTemplate(Appender, OpTpl)}. Otherwise, most formatting logic is implemented by
* the appender.
*
* @see {@link StringPcodeFormatter} for an example
* @see {@link AbstractAppender}
* @param <T> the type of this formatter's output, e.g., {@link String}
* @param <A> the type of the appender
* @see AbstractAppender
*/
public abstract class AbstractPcodeFormatter<T, A extends Appender<T>>
implements PcodeFormatter<T> {