|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.component.annotation.ComponentAnnotationLoader
public class ComponentAnnotationLoader
Dynamically loads all components defined using Annotations and declared in META-INF/components.txt files.
| Field Summary | |
|---|---|
static String |
COMPONENT_LIST
Location in the classloader of the file defining the list of component implementation class to parser for annotations. |
static String |
COMPONENT_OVERRIDE_LIST
Location in the classloader of the file specifying which component implementation to use when several with the same role/hint are found. |
| Constructor Summary | |
|---|---|
ComponentAnnotationLoader()
|
|
| Method Summary | |
|---|---|
Set<Class<?>> |
findComponentRoleClasses(Class<?> componentClass)
Finds the interfaces that implement component roles by looking recursively in all interfaces of the passed component implementation class. |
List<ComponentDescriptor> |
getComponentsDescriptors(Class<?> componentClass)
|
List<String> |
getDeclaredComponents(InputStream componentListStream)
Get all components listed in the passed resource stream. |
void |
initialize(ComponentManager manager,
ClassLoader classLoader)
Loads all components defined using annotations. |
void |
initialize(ComponentManager manager,
ClassLoader classLoader,
List<String> componentClassNames,
List<String> componentOverrideClassNames)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPONENT_LIST
public static final String COMPONENT_OVERRIDE_LIST
| Constructor Detail |
|---|
public ComponentAnnotationLoader()
| Method Detail |
|---|
public void initialize(ComponentManager manager,
ClassLoader classLoader)
manager - the component manager to use to dynamically register componentsclassLoader - the classloader to use to look for the Component list declaration file (
META-INF/components.txt)
public void initialize(ComponentManager manager,
ClassLoader classLoader,
List<String> componentClassNames,
List<String> componentOverrideClassNames)
manager - the component manager to use to dynamically register componentsclassLoader - the classloader to use to look for the Component list declaration file (
META-INF/components.txt)componentClassNames - the list of components to loadcomponentOverrideClassNames - the list of components to overridepublic List<ComponentDescriptor> getComponentsDescriptors(Class<?> componentClass)
public Set<Class<?>> findComponentRoleClasses(Class<?> componentClass)
componentClass - the component implementation class for which to find the component roles it implements
public List<String> getDeclaredComponents(InputStream componentListStream)
throws IOException
componentListStream - the stream to parse
IOException - in case of an error loading the component list resource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||