LoaderEnumerator.java
2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
* This file is part of LiteLoader.
* Copyright (C) 2012-16 Adam Mummery-Smith
* All Rights Reserved.
*/
package com.mumfrey.liteloader.interfaces;
import java.util.Collection;
import java.util.Map;
import com.mumfrey.liteloader.LiteMod;
import com.mumfrey.liteloader.core.ModInfo;
/**
* Interface for the enumerator
*
* @author Adam Mummery-Smith
*/
public interface LoaderEnumerator extends ModularEnumerator
{
/**
* Perform pre-init tasks (container discovery)
*/
public abstract void onPreInit();
/**
* Perform init tasks (injection and mod discovery)
*/
public abstract void onInit();
/**
* Check API requirements for the supplied container
*
* @param container
*/
public abstract boolean checkAPIRequirements(LoadableMod<?> container);
/**
* Check intra-mod dependencies for the supplied container
*
* @param base
*/
public abstract boolean checkDependencies(LoadableMod<?> base);
/**
* Inflect mod identifier from the supplied mod class
*
* @param modClass
*/
public abstract String getIdentifier(Class<? extends LiteMod> modClass);
/**
* Get the container which the specified mod is loaded from
*
* @param modClass
*/
public abstract LoadableMod<?> getContainer(Class<? extends LiteMod> modClass);
/**
* Get the container for the specified mod identifier
*
* @param identifier
*/
public abstract LoadableMod<?> getContainer(String identifier);
/**
* Get all containers identified at discover-time as disabled
*/
public abstract Collection<? extends ModInfo<Loadable<?>>> getDisabledContainers();
/**
* Get all bad containers
*/
public abstract Collection<? extends ModInfo<Loadable<?>>> getBadContainers();
/**
* @param modClass
* @param metaDataKey
* @param defaultValue
*/
public abstract String getModMetaData(Class<? extends LiteMod> modClass, String metaDataKey, String defaultValue);
/**
* Get the total number of mods to load
*/
public abstract int modsToLoadCount();
/**
* Get all mods to load
*/
public abstract Collection<? extends ModInfo<LoadableMod<?>>> getModsToLoad();
/**
* Get all tweakers which were injected
*/
public abstract Collection<? extends ModInfo<Loadable<?>>> getInjectedTweaks();
/**
* Get the shared modlist data
*/
public abstract Map<String, Map<String, String>> getSharedModList();
}