mirror of
https://github.com/zaaarf/lillero.git
synced 2024-11-22 07:24:50 +01:00
doc: improved javadocs
This commit is contained in:
parent
fe928a0fb0
commit
4064aa7726
7 changed files with 16 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
||||||
package ftbsc.lll.exceptions;
|
package ftbsc.lll.exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thrown when attempting to build an InstructionSequence between two
|
* Thrown when attempting to build an {@link ftbsc.lll.tools.InsnSequence} between two
|
||||||
* unconnected nodes.
|
* unconnected nodes.
|
||||||
*/
|
*/
|
||||||
public class InstructionMismatchException extends RuntimeException {
|
public class InstructionMismatchException extends RuntimeException {
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package ftbsc.lll.exceptions;
|
package ftbsc.lll.exceptions;
|
||||||
|
|
||||||
|
import ftbsc.lll.tools.SrgMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thrown upon failure to find the requested mapping within a loaded SrgMapper.
|
* Thrown upon failure to find the requested mapping within a loaded {@link SrgMapper}.
|
||||||
*/
|
*/
|
||||||
public class MappingNotFoundException extends RuntimeException {
|
public class MappingNotFoundException extends RuntimeException {
|
||||||
public MappingNotFoundException(String mapping) {
|
public MappingNotFoundException(String mapping) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package ftbsc.lll.exceptions;
|
package ftbsc.lll.exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thrown when failing to find a pattern
|
* Thrown when failing to find a pattern.
|
||||||
*/
|
*/
|
||||||
public class PatternNotFoundException extends RuntimeException {
|
public class PatternNotFoundException extends RuntimeException {
|
||||||
public PatternNotFoundException(String message) {
|
public PatternNotFoundException(String message) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a sequence of instructions contained within two given nodes.
|
* Represents a sequence of instructions contained within two given nodes.
|
||||||
* Extends InsnList, but provides additional flexibility and features.
|
* Extends {@link InsnList}, but provides additional flexibility and features.
|
||||||
*/
|
*/
|
||||||
public class InsnSequence extends InsnList {
|
public class InsnSequence extends InsnList {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,15 +56,15 @@ public class PatternMatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the Builder object for this PatternMatcher
|
* @return the Builder object for this {@link PatternMatcher}
|
||||||
*/
|
*/
|
||||||
public static Builder builder() {
|
public static Builder builder() {
|
||||||
return new Builder();
|
return new Builder();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to match the given pattern on a given MethodNode.
|
* Tries to match the given pattern on a given {@link MethodNode}.
|
||||||
* @param node the MethodNode to search
|
* @param node the {@link MethodNode} to search
|
||||||
* @return the InsnSequence object representing the matched pattern
|
* @return the InsnSequence object representing the matched pattern
|
||||||
*/
|
*/
|
||||||
public InsnSequence find(MethodNode node) {
|
public InsnSequence find(MethodNode node) {
|
||||||
|
@ -74,7 +74,7 @@ public class PatternMatcher {
|
||||||
/**
|
/**
|
||||||
* Tries to match the given pattern starting from a given node.
|
* Tries to match the given pattern starting from a given node.
|
||||||
* @param node the node to start the search on
|
* @param node the node to start the search on
|
||||||
* @return the InsnSequence object representing the matched pattern
|
* @return the {@link InsnSequence} object representing the matched pattern
|
||||||
*/
|
*/
|
||||||
public InsnSequence find(AbstractInsnNode node) {
|
public InsnSequence find(AbstractInsnNode node) {
|
||||||
if(node != null) {
|
if(node != null) {
|
||||||
|
@ -103,7 +103,7 @@ public class PatternMatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Builder object for PatternMatcher.
|
* The Builder object for {@link PatternMatcher}.
|
||||||
*/
|
*/
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public class PatternMatcher {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the pattern defined so far.
|
* Builds the pattern defined so far.
|
||||||
* @return the built PatternMatcher
|
* @return the built {@link PatternMatcher}
|
||||||
*/
|
*/
|
||||||
public PatternMatcher build() {
|
public PatternMatcher build() {
|
||||||
return new PatternMatcher(predicates, reverse, ignoreLabels, ignoreFrames, ignoreLineNumbers);
|
return new PatternMatcher(predicates, reverse, ignoreLabels, ignoreFrames, ignoreLineNumbers);
|
||||||
|
|
|
@ -26,9 +26,9 @@ public class SrgMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The public constructor.
|
* The public constructor.
|
||||||
* Should be passed a Stream of Strings, one representing each line.
|
* Should be passed a {@link Stream} of Strings, one representing each line.
|
||||||
* Whether they contain line endings or not is irrelevant.
|
* Whether they contain line endings or not is irrelevant.
|
||||||
* @param str a Stream of strings
|
* @param str a {@link Stream} of strings
|
||||||
*/
|
*/
|
||||||
public SrgMapper(Stream<String> str) {
|
public SrgMapper(Stream<String> str) {
|
||||||
AtomicReference<String> currentClass = new AtomicReference<>("");
|
AtomicReference<String> currentClass = new AtomicReference<>("");
|
||||||
|
@ -129,7 +129,7 @@ public class SrgMapper {
|
||||||
private final String srgName;
|
private final String srgName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Map tying each member's deobfuscatede name or signature to its
|
* A {@link Map} tying each member's deobfuscatede name or signature to its
|
||||||
* SRG name.
|
* SRG name.
|
||||||
*/
|
*/
|
||||||
private final Map<String, String> members;
|
private final Map<String, String> members;
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class BytecodePrinter {
|
||||||
/**
|
/**
|
||||||
* Logs the bytecode of a method using the ASM logger.
|
* Logs the bytecode of a method using the ASM logger.
|
||||||
* @param main the method to print
|
* @param main the method to print
|
||||||
* @param logger the Log4j logger to print it with
|
* @param logger the Log4j {@link Logger} to print it with
|
||||||
*/
|
*/
|
||||||
public static void logAsmMethod(final MethodNode main, final Logger logger) {
|
public static void logAsmMethod(final MethodNode main, final Logger logger) {
|
||||||
for (AbstractInsnNode i : main.instructions.toArray())
|
for (AbstractInsnNode i : main.instructions.toArray())
|
||||||
|
|
Loading…
Reference in a new issue