Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-0: Generating javadoc for BSim (Closes #7490)

Ryan Kurtze0cdd6b82954
diff --git a/Ghidra/Features/BSim/build.gradle b/Ghidra/Features/BSim/build.gradle
index 93c6c8b4d1..0f45d72f24 100755
--- a/Ghidra/Features/BSim/build.gradle
+++ b/Ghidra/Features/BSim/build.gradle
@@ -16,6 +16,7 @@
apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javadoc.gradle"
apply from: "$rootProject.projectDir/gradle/nativeProject.gradle"
apply from: "$rootProject.projectDir/gradle/helpProject.gradle"
diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/FilterWidget.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/FilterWidget.java
index 46c6d49b1f..8cfb8d4e22 100755
--- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/FilterWidget.java
+++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/FilterWidget.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@ import utility.function.Callback;
* it will consist of a combobox containing the available filters. It may optionally
* contain a secondary widget for specifying filter values. This secondary widget
* is filter-specific; for most filter types it will be a text entry field but as long
- * as it implements the {@link FilterContent} interface it is valid.
+ * as it implements the proper interface it is valid.
*
*/
public class FilterWidget extends JPanel {
@@ -55,7 +55,7 @@ public class FilterWidget extends JPanel {
* Constructs a new filter widget.
* @param filterTypes The list of filter types that can be chosen
* @param removeConsumer the container to be notified that it should delete this object
- * @param renameListener listener to be notified when filter value changes
+ * @param changeListener listener to be notified when filter value changes
*/
public FilterWidget(List<BSimFilterType> filterTypes, Consumer<FilterWidget> removeConsumer,
Callback changeListener) {
diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/FunctionDatabase.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/FunctionDatabase.java
index cfd2430352..3509b0109b 100755
--- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/FunctionDatabase.java
+++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/FunctionDatabase.java
@@ -183,10 +183,6 @@ public interface FunctionDatabase extends AutoCloseable {
*/
public BSimServerInfo getServerInfo();
- /**
- * Get the
- * @return
- */
@Deprecated
public String getURLString();
@@ -379,7 +375,7 @@ public interface FunctionDatabase extends AutoCloseable {
/**
* Determines if a given xml file is a config template. This is done by opening the file
- * and checking for the presence of a <dbconfig> root tag.
+ * and checking for the presence of a {@code <dbconfig>} root tag.
*
* @param file the file to inspect
* @return true if the file is config template
diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/PostgresFunctionDatabase.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/PostgresFunctionDatabase.java
index 26ca67dd6d..9b6b74eda9 100755
--- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/PostgresFunctionDatabase.java
+++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/PostgresFunctionDatabase.java
@@ -417,7 +417,6 @@ public final class PostgresFunctionDatabase
/**
* Low level count decrement of a vector record from vectable, if count
* reaches zero, the record is deleted
- * @param c database connection
* @param id vector row ID
* @param countdiff the amount to subtract from count
* @return 0 if decrement short of 0, return 1 if record was removed, return
diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/CachedStatement.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/CachedStatement.java
index 89000d89f5..fe70fbbfa9 100644
--- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/CachedStatement.java
+++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/CachedStatement.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,7 +62,7 @@ public class CachedStatement<S extends Statement> {
* can result in replacement of one previously established. The {@link #getStatement()}
* should be used first to ensure one was not previously set. An error will be logged
* if the invocation replaces an existing statement which will be forced closed.
- * <B>
+ * <P>
* The owner thread for the statement will be established based on the
* {@link Thread#currentThread()}.
*
diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/SQLComplexTable.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/SQLComplexTable.java
index 06ff18d828..d94e6cb06c 100755
--- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/SQLComplexTable.java
+++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/SQLComplexTable.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -54,7 +54,7 @@ public abstract class SQLComplexTable {
public abstract void create(Statement st) throws SQLException;
/**
- * Deletes the row with the given id from the db. Users must set the {@link #DELETE_STMT} string
+ * Deletes the row with the given id from the db. Users must set the {@code DELETE_STMT} string
* to delete the exact table they need.
*
* @param id the database row ID
diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/description/FunctionDescriptionMapper.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/description/FunctionDescriptionMapper.java
index 1cdf5082e7..1c4af1ec45 100755
--- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/description/FunctionDescriptionMapper.java
+++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/description/FunctionDescriptionMapper.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,8 +22,8 @@ import ghidra.features.bsim.query.LSHException;
import ghidra.xml.XmlPullParser;
/**
- * Scan a description XML file and for each <fdesc> tag, parse it, build the FunctionDescription
- * object and call handleFunction
+ * Scan a description XML file and for each {@code <fdesc>} tag, parse it, build the
+ * FunctionDescription object and call handleFunction
*
*/
public abstract class FunctionDescriptionMapper {
diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticConnection.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticConnection.java
index 9f3496aecc..ff6feac8f0 100755
--- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticConnection.java
+++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticConnection.java
@@ -220,7 +220,7 @@ public class ElasticConnection {
/**
* Execute an elasticsearch command where we are not expecting a response
* @param command is the type of the command
- * @param path is the overarching index/type/<command>
+ * @param path is the overarching {@code index/type/<command>}
* @param body is the JSON document describing the request
* @throws ElasticException for any problems with the connecting
*/
@@ -258,7 +258,7 @@ public class ElasticConnection {
/**
* Execute an elastic search statement and return the JSON response to user
* @param command is the type of command
- * @param path is the overarching index/type/<command>
+ * @param path is the overarching {@code index/type/<command>}
* @param body is JSON document describing the request
* @return the parsed response as a JsonObject
* @throws ElasticException for any problems with the connection
@@ -299,7 +299,7 @@ public class ElasticConnection {
* Execute an elastic search statement and return the JSON response to user
* Do not throw an exception on failure, just return the error response
* @param command is the type of command
- * @param path is the overarching index/type/<command>
+ * @param path is the overarching {@code index/type/<command>}
* @param body is JSON document describing the request
* @return the parsed response as a JsonObject
* @throws ElasticException for any problems with the connection
diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/BSimFilter.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/BSimFilter.java
index 0577f5e3cb..ef73de18ff 100755
--- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/BSimFilter.java
+++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/protocol/BSimFilter.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -165,14 +165,14 @@ public class BSimFilter {
/**
* Returns true if all filters resolve correctly for the given function description. There are
* 4 main types of filters, each of which must be evaluated differently:
- *
- * 1) Positive Filter: "<filter name> matches <filter value>".
+ * <pre>
+ * 1) Positive Filter: {@code "<filter name> matches <filter value>"}.
* For these, filter out any result that does not contain all elements (at a minimum) of the
* filter value.
* ie: FILTER = "SetA", RESULT = "SetA" => keep it
* FILTER = "SetA, SetB", RESULT = "SetA" => filter out
*
- * 2) Negative Filter: "<filter name> does not match <filter value>"
+ * 2) Negative Filter: {@code "<filter name> does not match <filter value>"}
* For these, filter out any result that does not contain EXACTLY the filter value.
* ie: FILTER = "SetA", RESULT = "SetA, SetB" => keep it
* FILTER = "SetA, SetB", RESULT = "SetA, SetB" => filter out
@@ -182,7 +182,7 @@ public class BSimFilter {
*
* 4) Negative Exe Filter: Same as #2, but custom exe filters are stored differently than
* 'normal' categories and must be processed separately.
- *
+ * </pre>
* @param func the function description
* @return true if all filters resolve to true
*/