Injectable.java
1.16 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
/*
* This file is part of LiteLoader.
* Copyright (C) 2012-16 Adam Mummery-Smith
* All Rights Reserved.
*/
package com.mumfrey.liteloader.interfaces;
import java.net.MalformedURLException;
import java.net.URL;
import com.mumfrey.liteloader.launch.InjectionStrategy;
import net.minecraft.launchwrapper.LaunchClassLoader;
/**
* Interface for objects which can be injected into the classpath
*
* @author Adam Mummery-Smith
*/
public interface Injectable
{
/**
* Get the URL of this injectable resource
* @throws MalformedURLException
*/
public abstract URL getURL() throws MalformedURLException;
/**
* Returns true if this object has been injected already
*/
public abstract boolean isInjected();
/**
* @param classLoader
* @param injectIntoParent
* @return whether the injection was successful or not
* @throws MalformedURLException
*/
public abstract boolean injectIntoClassPath(LaunchClassLoader classLoader, boolean injectIntoParent) throws MalformedURLException;
/**
* Get the injection strategy for this object
*/
public abstract InjectionStrategy getInjectionStrategy();
}