MCPcopy Create free account
hub / github.com/cinit/TMoe / BaseDynamicHook

Class BaseDynamicHook

app/src/main/java/cc/ioctl/tmoe/hook/base/BaseDynamicHook.java:10–45  ·  view source on GitHub ↗

@author cinit

Source from the content-addressed store, hash-verified

8 * @author cinit
9 */
10public abstract class BaseDynamicHook implements DynamicHook {
11 /**
12 * Check if the hook should be applied.
13 *
14 * @return true if the hook should work
15 */
16 public boolean isEnabled() {
17 return isAvailable() && isEnabledByUser();
18 }
19
20 @Override
21 public boolean isAvailable() {
22 return true;
23 }
24
25 @Nullable
26 @Override
27 public List<Throwable> getErrors() {
28 return null;
29 }
30
31 @Override
32 public boolean isPreparationRequired() {
33 return false;
34 }
35
36 @Override
37 public boolean makePreparations() {
38 return true;
39 }
40
41 @Override
42 public boolean isApplicationRestartRequired() {
43 return false;
44 }
45}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected