Skip to content

Commit

Permalink
GP-0: Fixing javadoc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmkurtz committed May 24, 2024
1 parent b4f6f59 commit ff72278
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ private void addSourceLineInfo(BinaryReader reader) throws CancelledException, I

/**
* Imports DWARF information according to the {@link DWARFImportOptions} set.
* <p>
* {@link DWARFProgram#checkPreconditions(TaskMonitor)} must be called before this.
* <p>
* @return
* @throws IOException
* @throws DWARFException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class DWARFStringOffsetTableHeader extends DWARFIndirectTableHeader {
/**
* Reads a string offset table header (found in the .debug_str_offsets section)
*
* @param dprog {@link DWARFProgram}
* @param reader {@link BinaryReader}
* @return new {@link DWARFStringOffsetTableHeader} instance
* @throws IOException if error reading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ private void init() {
}

/**
* Retrieve the component map that was generated when structure was created using decomiler info.
* Results are not valid until {@link #processStructure(HighVariable, Function, boolean)} is invoked.
* Retrieve the component map that was generated when structure was created using decompiler
* info. Results are not valid until
* {@link #processStructure(HighVariable, Function, boolean, boolean)} is invoked.
* @return componentMap
*/
public NoisyStructureBuilder getComponentMap() {
Expand All @@ -177,7 +178,8 @@ public NoisyStructureBuilder getComponentMap() {
/**
* Retrieve the offset/pcodeOp pairs that are used to store data into the variable
* used to fill-out structure.
* Results are not valid until {@link #processStructure(HighVariable, Function, boolean)} is invoked.
* Results are not valid until
* {@link #processStructure(HighVariable, Function, boolean, boolean)} is invoked.
* @return the pcodeOps doing the storing to the associated variable
*/
public List<OffsetPcodeOpPair> getStorePcodeOps() {
Expand All @@ -187,7 +189,8 @@ public List<OffsetPcodeOpPair> getStorePcodeOps() {
/**
* Retrieve the offset/pcodeOp pairs that are used to load data from the variable
* used to fill-out structure.
* Results are not valid until {@link #processStructure(HighVariable, Function, boolean)} is invoked.
* Results are not valid until
* {@link #processStructure(HighVariable, Function, boolean, boolean)} is invoked.
* @return the pcodeOps doing the loading from the associated variable
*/
public List<OffsetPcodeOpPair> getLoadPcodeOps() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ public String getMenuPathAsString() {
}

/**
* Returns the menu path as a string. This method filters accelerator chars('&') from the path.
* @return the menu path as a string without unescaped '&' chars
* Returns the menu path as a string. This method filters accelerator chars('&amp;') from the
* path.
* @return the menu path as a string without unescaped '&amp;' chars
*/
public String getMenuPathDisplayString() {
if (menuPath == null || menuPath.length == 0) {
Expand Down
2 changes: 1 addition & 1 deletion Ghidra/Framework/Emulation/src/main/java/generic/Span.java
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ public void clear() {
}

/**
* Provides a default {@link #toString} implementation
* Provides a default {@link Object#toString} implementation
*
* @return the string
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
*
* or if you also need the event (to get the domainObject that is the event source)
*
* <PRE
* <PRE>
* new DomainObjectListenerBuilder()
* .each(DomainObjectEvent.PROPERTY_CHANGED).call((e, r) -> processPropertyChanged(e, r))
* .withRecord(ProgramChangeRecord.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ public abstract class AbstractAssemblyResolution implements AssemblyResolution {
/**
* Construct a resolution
*
* @param factory the factory
* @param description a textual description used as part of {@link #toString()}
* @param children for record keeping, any children used in constructing this resolution
* @param right the right sibling
*/
protected AbstractAssemblyResolution(AbstractAssemblyResolutionFactory<?, ?> factory,
String description, List<? extends AssemblyResolution> children,
Expand Down Expand Up @@ -149,6 +151,7 @@ public AssemblyResolution withoutRight() {
/**
* Get this same resolution, but with the given right sibling
*
* @param right the right sibling
* @return the resolution
*/
public abstract AssemblyResolution withRight(AssemblyResolution right);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import java.util.concurrent.atomic.AtomicLong;

import ghidra.app.plugin.assembler.sleigh.expr.*;
import ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyResolutionFactory.AbstractAssemblyResolvedBackfillBuilder;
import ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyResolutionFactory.AbstractAssemblyResolvedPatternsBuilder;
import ghidra.app.plugin.processors.sleigh.Constructor;
import ghidra.app.plugin.processors.sleigh.expression.PatternExpression;
import ghidra.app.plugin.processors.sleigh.pattern.DisjointPattern;
Expand Down Expand Up @@ -142,7 +140,7 @@ public AssemblyResolvedErrorBuilder newErrorBuilder() {
/**
* Construct an immutable single-entry result set consisting of the one given resolution
*
* @param rp the single resolution entry
* @param one the single resolution entry
* @return the new resolution set
*/
protected AssemblyResolutionResults singleton(AssemblyResolution one) {
Expand Down Expand Up @@ -185,7 +183,7 @@ protected AssemblyResolution solveOrBackfill(PatternExpression exp, MaskedLong g
* a special case, if {@code bits == 0}, the goal is considered fully-defined (as if
* {@code bits == 64}).
*
* @see #solveOrBackfill(PatternExpression, MaskedLong, AssemblyResolvedPatterns, String)
* @see #solveOrBackfill(PatternExpression, MaskedLong, Map, AssemblyResolvedPatterns, String)
*/
protected AssemblyResolution solveOrBackfill(PatternExpression exp, long goal, int bits,
Map<String, Long> vals, AssemblyResolvedPatterns cur, String description) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public interface AssemblyResolution extends Comparable<AssemblyResolution> {
* include in {@link #toString()}, it must override this method to return true when such
* children are present.
*
* @see #childrenToString(String)
* @return true if this record has children
*/
boolean hasChildren();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.util.Map;

import ghidra.app.plugin.assembler.sleigh.expr.NeedsBackfillException;
import ghidra.app.plugin.assembler.sleigh.expr.RecursiveDescentSolver;

public interface AssemblyResolvedBackfill extends AssemblyResolution {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
/**
* Decode a portion of the instruction block
*
* @param start the first byte to decode
* @param len the number of bytes to decode
* @param byteStart the first byte to decode
* @param size the number of bytes to decode
* @return the read masked value
* @see AssemblyPatternBlock#readBytes(int, int)
*/
Expand Down Expand Up @@ -126,7 +126,8 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
* Check if this and another resolution have equal encodings
*
* <p>
* This is like {@link #equals(Object)}, but it ignores backfill records and forbidden patterns.
* This is like {@link Object#equals(Object)}, but it ignores backfill records and forbidden
* patterns.
*
* @param that the other resolution
* @return true if both have equal encodings
Expand All @@ -145,7 +146,7 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
/**
* Create a copy of this resolution with a new description
*
* @param desc the new description
* @param description the new description
* @return the copy
*/
AssemblyResolvedPatterns withDescription(String description);
Expand Down Expand Up @@ -177,7 +178,7 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
* This combines corresponding pattern blocks (assuming they agree), collects backfill records,
* and collects forbidden patterns.
*
* @param that the other resolution
* @param pat the other resolution
* @return the result if successful, or null
*/
AssemblyResolvedPatterns combine(AssemblyResolvedPatterns pat);
Expand Down Expand Up @@ -312,7 +313,7 @@ AssemblyResolvedPatterns solveContextChangesForForbids(AssemblyConstructorSemant
* <b>NOTE:</b> This drops all backfill and forbidden pattern records, since this method is
* typically used to read token fields rather than passed around for resolution.
*
* @param amt the number of bytes to remove from the left
* @param shamt the number of bytes to remove from the left
* @return the result
*/
AssemblyResolvedPatterns truncate(int shamt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public boolean equals(Object obj) {
return true;
}

/**
* @see AssemblyResolution#error(String, String, List)
*/
protected DefaultAssemblyResolvedError(AbstractAssemblyResolutionFactory<?, ?> factory,
String description, List<? extends AssemblyResolution> children,
AssemblyResolution right, String error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ public class DefaultAssemblyResolvedPatterns extends AbstractAssemblyResolution
protected final Set<AssemblyResolvedBackfill> backfills;
protected final Set<AssemblyResolvedPatterns> forbids;

/**
* @see AssemblyResolution#resolved(AssemblyPatternBlock, AssemblyPatternBlock, String,
* Constructor, List, AssemblyResolution)
*/
protected DefaultAssemblyResolvedPatterns(AbstractAssemblyResolutionFactory<?, ?> factory,
String description, Constructor cons, List<? extends AssemblyResolution> children,
AssemblyResolution right, AssemblyPatternBlock ins, AssemblyPatternBlock ctx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,11 @@ protected Instruction nextInstruction(Flow flow, boolean isInDelaySlot)
/**
* Parse the next instructions, including delay-slotted ones
*
* @param address the starting address
* @param flow the {@link Flow}
* @return the if the first instruction has fall-through, the flow out from the last
* instruction parsed. Without delay slots, the first instruction is the last
* instruction.
* @throws CancelledException
* @throws AddressOverflowException if an instruction would run past the end of the address
* space
*/
protected Flow nextInstructionsWithDelays(Flow flow) throws CancelledException {
Instruction instruction = nextInstruction(flow, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public void addEscapedCodePoint(int codePoint) {
* escape sequences, depending on the RENDER_ENUM setting.
*
* @param bb {@link ByteBuffer} containing bytes of a string
* @param cs {@link Charset} that should be used to decode the bytes
* @param renderSetting {@link RENDER_ENUM}
* @param trimTrailingNulls boolean flag, if true trailing null bytes will not be included
* in the rendered output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public enum ReturnCommitOption {
COMMIT,

/**
* {@value #COMMIT_NO_VOID} - commit return parameter as defined by {@link HighFunction}
* {@link #COMMIT_NO_VOID} - commit return parameter as defined by {@link HighFunction}
* unless it is {@link VoidDataType} in which case keep existing function return parameter.
*/
COMMIT_NO_VOID;
Expand Down

0 comments on commit ff72278

Please sign in to comment.