diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/base/LeetcodeInvoker.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/base/LeetcodeInvoker.java
index 8a4e36a..70efdcd 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/base/LeetcodeInvoker.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/base/LeetcodeInvoker.java
@@ -85,4 +85,37 @@ public interface LeetcodeInvoker {
* in the invoking process.
*/
Object invoke(Object object, Object... args) throws Throwable;
+
+ /**
+ * Returns a string describing this {@code Constructor},
+ * including type parameters. The string is formatted as the
+ * constructor access modifiers, if any, followed by an
+ * angle-bracketed comma separated list of the constructor's type
+ * parameters, if any, followed by the fully-qualified name of the
+ * declaring class, followed by a parenthesized, comma-separated
+ * list of the constructor's generic formal parameter types.
+ *
+ * If this constructor was declared to take a variable number of
+ * arguments, instead of denoting the last parameter as
+ * "Type[]", it is denoted as
+ * "Type...".
+ *
+ * A space is used to separate access modifiers from one another
+ * and from the type parameters or return type. If there are no
+ * type parameters, the type parameter list is elided; if the type
+ * parameter list is present, a space separates the list from the
+ * class name. If the constructor is declared to throw
+ * exceptions, the parameter list is followed by a space, followed
+ * by the word "{@code throws}" followed by a
+ * comma-separated list of the thrown exception types.
+ *
+ *
The only possible modifiers for constructors are the access
+ * modifiers {@code public}, {@code protected} or
+ * {@code private}. Only one of these may appear, or none if the
+ * constructor has default (package) access.
+ *
+ * @return a string describing this {@code Constructor},
+ * include type parameters
+ */
+ String toGenericString();
}
diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/LeetcodeJavaDebugEnhanceProcessor.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/LeetcodeJavaDebugEnhanceProcessor.java
index b8595b4..8f4f57b 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/LeetcodeJavaDebugEnhanceProcessor.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/LeetcodeJavaDebugEnhanceProcessor.java
@@ -16,23 +16,18 @@
package io.github.jidcoo.opto.lcdb.enhancer.core;
-import io.github.jidcoo.opto.lcdb.enhancer.core.parser.InputParserProcessor;
+import io.github.jidcoo.opto.lcdb.enhancer.LeetcodeJavaDebugEnhancer;
+import io.github.jidcoo.opto.lcdb.enhancer.core.pipeline.LeetcodeJavaDebugEnhancerPipelineProcessor;
import io.github.jidcoo.opto.lcdb.enhancer.utils.EnhancerLogUtil;
import io.github.jidcoo.opto.lcdb.enhancer.utils.ReflectUtil;
-import io.github.jidcoo.opto.lcdb.enhancer.LeetcodeJavaDebugEnhancer;
-import io.github.jidcoo.opto.lcdb.enhancer.base.InputProvider;
-import io.github.jidcoo.opto.lcdb.enhancer.base.OutputConsumer;
-import io.github.jidcoo.opto.lcdb.enhancer.core.executor.LeetcodeExecutorFactory;
-import io.github.jidcoo.opto.lcdb.enhancer.core.executor.LeetcodeExecutorProcessor;
-import io.github.jidcoo.opto.lcdb.enhancer.core.io.IOFactory;
-import io.github.jidcoo.opto.lcdb.enhancer.core.parser.InputParserFactory;
-import io.github.jidcoo.opto.lcdb.enhancer.core.printer.OutputPrinterFactory;
-import io.github.jidcoo.opto.lcdb.enhancer.core.printer.OutputPrinterProcessor;
/**
*
LeetcodeJavaDebugEnhanceProcessor is a primary enhancer.
- *
All features of the {@link LeetcodeJavaDebugEnhancer} will
- * be controlled and dominated by this processor.
+ *
+ *
In version 1.0.1 and later, the control and support for
+ * all features of {@link LeetcodeJavaDebugEnhancer} have been
+ * moved from {@link LeetcodeJavaDebugEnhanceProcessor} to
+ * {@link LeetcodeJavaDebugEnhancerPipelineProcessor}.
*
*
By the way, today is a so bad day for me. Because I
* still need coding on my day off. Can you give me
@@ -42,7 +37,7 @@
* @author Jidcoo
* @since 1.0
*/
-public class LeetcodeJavaDebugEnhanceProcessor {
+public final class LeetcodeJavaDebugEnhanceProcessor {
/**
*
Do leetcode debugging enhance process with an AT class.
@@ -56,46 +51,15 @@ public static void process(Class extends LeetcodeJavaDebugEnhancer> AT) throws
// Setup EnhancerLog log level.
EnhancerLogUtil.setLogLevel(enhancer.getEnhancerLogLevel());
- EnhancerLogUtil.logI("Starting do debugging enhance at (AT) class: %s", AT.getSimpleName());
- // Create a LeetcodeExecutor from the enhancer.
- Object leetcodeExecutor = LeetcodeExecutorFactory.getLeetcodeExecutor(enhancer);
- // Create an OutputPrinter from the enhancer.
- Object outputPrinter = OutputPrinterFactory.getOutputPrinter(enhancer);
- // Create a InputParser from the enhancer.
- Object inputParser = InputParserFactory.getInputParser(enhancer);
+ EnhancerLogUtil.logI("Start leetcode debugging enhancer at (AT) class: %s", AT.getSimpleName());
- try (
- // Get or create a InputProvider from the enhancer.
- InputProvider inputProvider = IOFactory.getInputProvider(enhancer);
- // Get or create OutputConsumer from the enhancer.
- OutputConsumer outputConsumer = IOFactory.getOutputConsumer(enhancer)
-
- ) {
- // Now we can happily run the io loop to perform leetcode debugging enhancements.
- EnhancerLogUtil.logI("Running leetcode debugging enhancer at (AT) class: %s", AT.getSimpleName());
- while (true) {
- // Provide the next string input from the InputProvider.
- String input = inputProvider.provideNextInput();
- // We need to break this loop when the input indicates end.
- if (inputProvider.isEnd(input)) {
- break;
- }
- // Parse the string input to input object.
- Object inputObject = InputParserProcessor.process(inputParser, leetcodeExecutor, input);
- // Execute leetcode target and get the output object.
- Object outputObject = LeetcodeExecutorProcessor.process(leetcodeExecutor, inputObject);
- // Print the output object.
- String output = OutputPrinterProcessor.process(outputPrinter, leetcodeExecutor, outputObject);
- // Consume the next output string to the OutputConsumer.
- outputConsumer.consumeNextOutput(output);
- }
- }
+ // Do process debugging enhancement pipeline with AT instance. (Since 1.0.1)
+ LeetcodeJavaDebugEnhancerPipelineProcessor.process(enhancer);
// Now, the enhancement work has ended here. It's time to say goodbye.
// Wishing all programmers around the world the true joy of life in Leetcode.
// May you be so powerful that you don't need debugging and have no bugs.
// Good luck!!!.
- EnhancerLogUtil.logI("Stopped leetcode debugging enhancer at (AT) class: %s", AT.getSimpleName());
+ EnhancerLogUtil.logI("Stop leetcode debugging enhancer at (AT) class: %s", AT.getSimpleName());
}
-
}
diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/ConstructorLeetcodeInvoker.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/ConstructorLeetcodeInvoker.java
index 7c75500..6d5167e 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/ConstructorLeetcodeInvoker.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/ConstructorLeetcodeInvoker.java
@@ -21,6 +21,7 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Parameter;
+import java.util.Arrays;
/**
*
ConstructorLeetcodeInvoker is an invoker
@@ -42,6 +43,11 @@ final class ConstructorLeetcodeInvoker implements LeetcodeInvoker {
*/
private final Integer id;
+ /**
+ * Friendly matching mode flag.
+ */
+ private boolean matchingFriendly;
+
/**
* Create a ConstructorLeetcodeInvoker instance.
*
@@ -54,6 +60,8 @@ final class ConstructorLeetcodeInvoker implements LeetcodeInvoker {
// Make accessible.
this.constructor.setAccessible(true);
this.id = id;
+ // Friendly-Matching-Mode is closed by default.
+ this.matchingFriendly = false;
}
/**
@@ -73,7 +81,11 @@ public Integer getId() {
*/
@Override
public int getParameterCount() {
- return this.constructor.getParameterCount();
+ int parameterCount = this.constructor.getParameterCount();
+ if (parameterCount > 0 && matchingFriendly) {
+ return parameterCount - 1;
+ }
+ return parameterCount;
}
/**
@@ -83,7 +95,11 @@ public int getParameterCount() {
*/
@Override
public String getInvokerName() {
- return this.constructor.getName();
+ String name = this.constructor.getName();
+ if (name.contains("$") && matchingFriendly) {
+ return name.substring(name.lastIndexOf('$') + 1);
+ }
+ return name;
}
/**
@@ -93,7 +109,11 @@ public String getInvokerName() {
*/
@Override
public Class>[] getParameterTypes() {
- return this.constructor.getParameterTypes();
+ Class>[] parameterTypes = this.constructor.getParameterTypes();
+ if (parameterTypes.length > 0 && matchingFriendly) {
+ return Arrays.stream(parameterTypes).skip(1).toArray(Class[]::new);
+ }
+ return parameterTypes;
}
/**
@@ -103,7 +123,11 @@ public Class>[] getParameterTypes() {
*/
@Override
public Parameter[] getParameters() {
- return this.constructor.getParameters();
+ Parameter[] parameters = this.constructor.getParameters();
+ if (parameters.length > 0 && matchingFriendly) {
+ return Arrays.stream(parameters).skip(1).toArray(Parameter[]::new);
+ }
+ return parameters;
}
/**
@@ -127,6 +151,45 @@ public Class> getReturnType() {
*/
@Override
public Object invoke(Object object, Object... args) throws Throwable {
- return this.constructor.newInstance(object, args);
+ Object[] initArgsArray = new Object[args.length + 1];
+ initArgsArray[0] = object;
+ System.arraycopy(args, 0, initArgsArray, 1, args.length);
+ return this.constructor.newInstance(initArgsArray);
+ }
+
+ /**
+ * Returns a string describing this {@code Constructor},
+ * including type parameters. The string is formatted as the
+ * constructor access modifiers, if any, followed by an
+ * angle-bracketed comma separated list of the constructor's type
+ * parameters, if any, followed by the fully-qualified name of the
+ * declaring class, followed by a parenthesized, comma-separated
+ * list of the constructor's generic formal parameter types.
+ *
+ * If this constructor was declared to take a variable number of
+ * arguments, instead of denoting the last parameter as
+ * "Type[]", it is denoted as
+ * "Type...".
+ *
+ * A space is used to separate access modifiers from one another
+ * and from the type parameters or return type. If there are no
+ * type parameters, the type parameter list is elided; if the type
+ * parameter list is present, a space separates the list from the
+ * class name. If the constructor is declared to throw
+ * exceptions, the parameter list is followed by a space, followed
+ * by the word "{@code throws}" followed by a
+ * comma-separated list of the thrown exception types.
+ *
+ *
The only possible modifiers for constructors are the access
+ * modifiers {@code public}, {@code protected} or
+ * {@code private}. Only one of these may appear, or none if the
+ * constructor has default (package) access.
+ *
+ * @return a string describing this {@code Constructor},
+ * include type parameters
+ */
+ @Override
+ public String toGenericString() {
+ return this.constructor.toGenericString();
}
}
diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/LeetcodeExecutor.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/LeetcodeExecutor.java
index 4490a54..2cd7d08 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/LeetcodeExecutor.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/LeetcodeExecutor.java
@@ -17,10 +17,13 @@
package io.github.jidcoo.opto.lcdb.enhancer.core.executor;
import io.github.jidcoo.opto.lcdb.enhancer.base.EnhancerException;
+import io.github.jidcoo.opto.lcdb.enhancer.base.LeetcodeInvoker;
import io.github.jidcoo.opto.lcdb.enhancer.utils.AssertUtil;
import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
/**
*
LeetcodeExecutor is an executor used to
@@ -45,30 +48,38 @@ final class LeetcodeExecutor {
/**
* The leetcode executor.
+ *
+ * @since 1.0.1
*/
- private final Method executor;
+ private LeetcodeInvoker executor;
/**
- * The leetcode invoker.
+ * The candidate leetcode invokers.
+ *
+ * @since 1.0.1
*/
- private Method invoker;
+ private final List candidateInvokers;
/**
* The leetcode invoker response type.
*/
- private Class invokerResponseType;
+ private Class> invokerResponseType;
/**
* Create a LeetcodeExecutor instance.
*
* @param instance the leetcode instance.
* @param executor the leetcode executor.
+ * @since 1.0.1
*/
- LeetcodeExecutor(Object instance, Method executor) {
+ LeetcodeExecutor(Object instance, LeetcodeInvoker executor) {
this.instance = instance;
this.executor = executor;
- // Set executor as default leetcode invoker.
- this.invoker = executor;
+ this.candidateInvokers = new ArrayList<>();
+ if (Objects.nonNull(executor)) {
+ // Add executor to candidate leetcode invokers list.
+ this.candidateInvokers.add(executor);
+ }
}
/**
@@ -81,10 +92,9 @@ final class LeetcodeExecutor {
* or invoker error.
*/
Object execute(Object input) {
- AssertUtil.nonNull(invoker, "The leetcode execute invoker cannot be null.");
+ AssertUtil.nonNull(executor, "The leetcode executor cannot be null.");
try {
- invoker.setAccessible(true);
- return invoker.invoke(instance, (Object[]) input);
+ return executor.invoke(instance, (Object[]) input);
} catch (InvocationTargetException exception) {
throw new EnhancerException(exception.getCause());
} catch (Throwable exception) {
@@ -106,16 +116,27 @@ Object getInstance() {
*
* @return the leetcode executor.
*/
- Method getExecutor() {
+ LeetcodeInvoker getExecutor() {
return executor;
}
/**
- * Get the leetcode invoker.
+ * Set the leetcode executor.
+ *
+ * @param executor the leetcode executor.
+ * @since 1.0.1
+ */
+ void setExecutor(LeetcodeInvoker executor) {
+ this.executor = executor;
+ }
+
+ /**
+ * Get the candidate leetcode invokers list.
*
- * @return the leetcode invoker.
+ * @return the candidate leetcode invokers list.
+ * @since 1.0.1
*/
- Method getInvoker() {
- return invoker;
+ List getCandidateInvokers() {
+ return this.candidateInvokers;
}
}
\ No newline at end of file
diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/LeetcodeExecutorFactory.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/LeetcodeExecutorFactory.java
index 9264e14..67fa06e 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/LeetcodeExecutorFactory.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/LeetcodeExecutorFactory.java
@@ -16,11 +16,9 @@
package io.github.jidcoo.opto.lcdb.enhancer.core.executor;
-import io.github.jidcoo.opto.lcdb.enhancer.LeetcodeJavaDebugEnhancer;
+import io.github.jidcoo.opto.lcdb.enhancer.base.LeetcodeInvoker;
import io.github.jidcoo.opto.lcdb.enhancer.utils.AssertUtil;
-import io.github.jidcoo.opto.lcdb.enhancer.utils.ReflectUtil;
-import java.lang.reflect.Method;
import java.util.Objects;
/**
@@ -34,22 +32,24 @@
public final class LeetcodeExecutorFactory {
/**
- * Product a LeetcodeExecutor instance by
- * {@link LeetcodeJavaDebugEnhancer} instance.
+ * Product a LeetcodeExecutor instance by leetcode instance.
*
- * @param enhancer the LeetcodeJavaDebugEnhancer instance.
+ * @param instance the leetcode instance.
+ * @param leetcodeInvokers the leetcode invokers.
* @return the LeetcodeExecutor instance.
+ * @since 1.0.1
*/
- public static LeetcodeExecutor getLeetcodeExecutor(LeetcodeJavaDebugEnhancer enhancer) {
- // Hate the npe.
- AssertUtil.nonNull(enhancer, "The enhancer cannot be null.");
- Method enhancementPoint = enhancer.getEnhancementPoint();
- Object target = enhancer;
- // Try to look for the inner class Solution in AT if the enhancementPoint is null.
- if (Objects.isNull(enhancementPoint)) {
- target = ReflectUtil.resolveSolutionInstance(enhancer);
- AssertUtil.nonNull(target, "Cannot resolve the inner class Solution from the AT enhancer instance.");
+ public static LeetcodeExecutor getLeetcodeExecutor(Object instance, LeetcodeInvoker... leetcodeInvokers) {
+ AssertUtil.nonNull(instance, "The instance cannot be null.");
+ LeetcodeInvoker primaryInvoker = leetcodeInvokers.length > 0 ? leetcodeInvokers[0] : null;
+ LeetcodeExecutor executor = new LeetcodeExecutor(instance, primaryInvoker);
+ for (int i = 1; i < leetcodeInvokers.length; i++) {
+ LeetcodeInvoker leetcodeInvoker = leetcodeInvokers[i];
+ if (Objects.nonNull(leetcodeInvoker)) {
+ // Add non-null leetcode invoker.
+ executor.getCandidateInvokers().add(leetcodeInvoker);
+ }
}
- return new LeetcodeExecutor(target, enhancementPoint);
+ return executor;
}
}
diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/MethodLeetcodeInvoker.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/MethodLeetcodeInvoker.java
index ba083dd..628aab3 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/MethodLeetcodeInvoker.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/executor/MethodLeetcodeInvoker.java
@@ -129,4 +129,40 @@ public Class> getReturnType() {
public Object invoke(Object object, Object... args) throws Throwable {
return this.method.invoke(object, args);
}
+
+ /**
+ * Returns a string describing this {@code Constructor},
+ * including type parameters. The string is formatted as the
+ * constructor access modifiers, if any, followed by an
+ * angle-bracketed comma separated list of the constructor's type
+ * parameters, if any, followed by the fully-qualified name of the
+ * declaring class, followed by a parenthesized, comma-separated
+ * list of the constructor's generic formal parameter types.
+ *
+ * If this constructor was declared to take a variable number of
+ * arguments, instead of denoting the last parameter as
+ * "Type[]", it is denoted as
+ * "Type...".
+ *
+ * A space is used to separate access modifiers from one another
+ * and from the type parameters or return type. If there are no
+ * type parameters, the type parameter list is elided; if the type
+ * parameter list is present, a space separates the list from the
+ * class name. If the constructor is declared to throw
+ * exceptions, the parameter list is followed by a space, followed
+ * by the word "{@code throws}" followed by a
+ * comma-separated list of the thrown exception types.
+ *
+ *
The only possible modifiers for constructors are the access
+ * modifiers {@code public}, {@code protected} or
+ * {@code private}. Only one of these may appear, or none if the
+ * constructor has default (package) access.
+ *
+ * @return a string describing this {@code Constructor},
+ * include type parameters
+ */
+ @Override
+ public String toGenericString() {
+ return this.method.toGenericString();
+ }
}
diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/ConsoleOutputConsumer.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/ConsoleOutputConsumer.java
index 08246aa..ed7d3eb 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/ConsoleOutputConsumer.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/ConsoleOutputConsumer.java
@@ -18,6 +18,8 @@
import io.github.jidcoo.opto.lcdb.enhancer.base.OutputConsumer;
+import java.io.Closeable;
+
/**
*
ConsoleOutputConsumer is a {@link OutputConsumer} and
* extends on {@link BaseBufferWriterOutputConsumer}.
@@ -41,4 +43,57 @@ public ConsoleOutputConsumer() {
// Use the stdout as output source.
super(System.out);
}
+
+ /**
+ * Closes this resource, relinquishing any underlying resources.
+ * This method is invoked automatically on objects managed by the
+ * {@code try}-with-resources statement.
+ *
+ *
While this interface method is declared to throw {@code
+ * Exception}, implementers are strongly encouraged to
+ * declare concrete implementations of the {@code close} method to
+ * throw more specific exceptions, or to throw no exception at all
+ * if the close operation cannot fail.
+ *
+ *
Cases where the close operation may fail require careful
+ * attention by implementers. It is strongly advised to relinquish
+ * the underlying resources and to internally mark the
+ * resource as closed, prior to throwing the exception. The {@code
+ * close} method is unlikely to be invoked more than once and so
+ * this ensures that the resources are released in a timely manner.
+ * Furthermore it reduces problems that could arise when the resource
+ * wraps, or is wrapped, by another resource.
+ *
+ *
Implementers of this interface are also strongly advised
+ * to not have the {@code close} method throw {@link
+ * InterruptedException}.
+ *
+ * This exception interacts with a thread's interrupted status,
+ * and runtime misbehavior is likely to occur if an {@code
+ * InterruptedException} is {@linkplain Throwable#addSuppressed
+ * suppressed}.
+ *
+ * More generally, if it would cause problems for an
+ * exception to be suppressed, the {@code AutoCloseable.close}
+ * method should not throw it.
+ *
+ *
Note that unlike the {@link Closeable#close close}
+ * method of {@link Closeable}, this {@code close} method
+ * is not required to be idempotent. In other words,
+ * calling this {@code close} method more than once may have some
+ * visible side effect, unlike {@code Closeable.close} which is
+ * required to have no effect if called more than once.
+ *
+ * However, implementers of this interface are strongly encouraged
+ * to make their {@code close} methods idempotent.
+ *
+ * @throws Exception if this resource cannot be closed
+ * @since 1.0.1
+ */
+ @Override
+ public void close() throws Exception {
+ // Override close() method and do nothing here
+ // to prevent the console output stream from
+ // being closed.
+ }
}
diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/FileInputProvider.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/FileInputProvider.java
index 35be675..b9ead63 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/FileInputProvider.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/FileInputProvider.java
@@ -18,7 +18,10 @@
import io.github.jidcoo.opto.lcdb.enhancer.base.InputProvider;
-import java.io.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
/**
*
FileInputProvider is a {@link InputProvider} and
diff --git a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/FileOutputConsumer.java b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/FileOutputConsumer.java
index 4e25e02..babf747 100644
--- a/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/FileOutputConsumer.java
+++ b/src/main/java/io/github/jidcoo/opto/lcdb/enhancer/core/io/builtin/FileOutputConsumer.java
@@ -18,7 +18,10 @@
import io.github.jidcoo.opto.lcdb.enhancer.base.OutputConsumer;
-import java.io.*;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
/**
*
@@ -77,22 +80,18 @@ public int getOrder() {
@Override
Object parse(InputParserContext context) {
// Define the boss invoker.
- Method bossInvoker = null;
+ LeetcodeInvoker bossInvoker = null;
// Define the boss input.
List