|
||||||||||
| 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 java.lang.String |
COMPONENT_LIST
Location in the classloader of the file defining the list of component implementation class to parser for annotations. |
static java.lang.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 | |
|---|---|
java.util.Set<java.lang.Class<?>> |
findComponentRoleClasses(java.lang.Class<?> componentClass)
Finds the interfaces that implement component roles by looking recursively in all interfaces of the passed component implementation class. |
java.util.List<ComponentDescriptor> |
getComponentsDescriptors(java.lang.Class<?> componentClass)
|
java.util.List<java.lang.String> |
getDeclaredComponents(java.io.InputStream componentListStream)
Get all components listed in the passed resource stream. |
void |
initialize(ComponentManager manager,
java.lang.ClassLoader classLoader)
Loads all components defined using annotations. |
void |
initialize(ComponentManager manager,
java.lang.ClassLoader classLoader,
java.util.List<java.lang.String> componentClassNames,
java.util.List<java.lang.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 java.lang.String COMPONENT_LIST
public static final java.lang.String COMPONENT_OVERRIDE_LIST
| Constructor Detail |
|---|
public ComponentAnnotationLoader()
| Method Detail |
|---|
public void initialize(ComponentManager manager,
java.lang.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,
java.lang.ClassLoader classLoader,
java.util.List<java.lang.String> componentClassNames,
java.util.List<java.lang.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 java.util.List<ComponentDescriptor> getComponentsDescriptors(java.lang.Class<?> componentClass)
public java.util.Set<java.lang.Class<?>> findComponentRoleClasses(java.lang.Class<?> componentClass)
componentClass - the component implementation class for which to find the component roles it implements
public java.util.List<java.lang.String> getDeclaredComponents(java.io.InputStream componentListStream)
throws java.io.IOException
componentListStream - the stream to parse
java.io.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 | |||||||||