|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
Importer.java | - | - | - | - |
|
1 | package org.drools.spi; | |
2 | ||
3 | import java.io.Serializable; | |
4 | import java.util.Set; | |
5 | ||
6 | ||
7 | ||
8 | /** | |
9 | * <p> | |
10 | * Importer holds a Set of ImportEntries and facilitates the | |
11 | * <code> <import/> </code> tag within a <code> <rule-set/> </code> by allowing | |
12 | * Classes to be loaded using a specified ClassLoader | |
13 | * | |
14 | * @author <a href="mailto:mproctor@codehaus.org"> mark proctor </a> | |
15 | */ | |
16 | public interface Importer extends Serializable | |
17 | { | |
18 | /** | |
19 | * <p> | |
20 | * Adds an ImportEntry to a Set | |
21 | * | |
22 | * @param importEntry - | |
23 | * the importEntry | |
24 | */ | |
25 | public abstract void addImport(ImportEntry importEntry); | |
26 | ||
27 | /** | |
28 | * Imports a Class using the given ClassLoader | |
29 | * | |
30 | * @param cl - | |
31 | * the ClassLoader to use | |
32 | * @param className - | |
33 | * the name of the Class to import | |
34 | * @return - the loaded class | |
35 | * @throws ClassNotFoundException - | |
36 | * Thrown if a Class is not found | |
37 | * @throws Error | |
38 | * Thrown is a class is ambiguously imported. | |
39 | */ | |
40 | public abstract Class importClass(ClassLoader cl, | |
41 | String className) throws ClassNotFoundException, Error; | |
42 | /** | |
43 | * @return - The Set of ImportEntries | |
44 | */ | |
45 | public Set getImportEntries(); | |
46 | ||
47 | /** | |
48 | * @return - the Set of imports, in text form. | |
49 | */ | |
50 | public Set getImports(); | |
51 | ||
52 | /** | |
53 | * @return - true if no ImportEntries have been added | |
54 | */ | |
55 | public boolean isEmpty(); | |
56 | ||
57 | } |
|