mirror of
https://gitee.com/BDWare/common
synced 2025-04-27 06:22:19 +00:00
upgrade annotation hook type
This commit is contained in:
parent
017c68fc60
commit
4fec45d789
@ -50,7 +50,7 @@ dependencies {
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
}
|
||||
group = "org.bdware.sc"
|
||||
version = "1.6.1"
|
||||
version = "1.6.3"
|
||||
|
||||
tasks.processResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE)
|
||||
|
||||
|
@ -26,6 +26,10 @@ public class ContractResult {
|
||||
}
|
||||
|
||||
public enum Status {
|
||||
Success, Exception, Error, Executing
|
||||
Success, Exception, Error;
|
||||
public Status merge(Status status) {
|
||||
if (status == null) status = Error;
|
||||
return this.ordinal() < status.ordinal() ? status : this;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
package org.bdware.sc.node;
|
||||
|
||||
import org.bdware.sc.JSEngine;
|
||||
import org.bdware.sc.bean.ContractRequest;
|
||||
|
||||
public interface AnnotationHook {
|
||||
Object handle(ContractRequest input, JSEngine desktopEngine, Object ret);
|
||||
ArgPacks handle(JSEngine desktopEngine, ArgPacks argPacks);
|
||||
}
|
||||
|
15
src/main/base/org/bdware/sc/node/ArgPacks.java
Normal file
15
src/main/base/org/bdware/sc/node/ArgPacks.java
Normal file
@ -0,0 +1,15 @@
|
||||
package org.bdware.sc.node;
|
||||
|
||||
import org.bdware.sc.bean.ContractRequest;
|
||||
|
||||
public class ArgPacks {
|
||||
public Object ret;
|
||||
public ContractRequest request;
|
||||
public Object arg;
|
||||
|
||||
public ArgPacks(ContractRequest request, Object arg, Object ret) {
|
||||
this.request = request;
|
||||
this.arg = arg;
|
||||
this.ret = ret;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user