ComponentFinderStrategy
StructurizrAnnotationsComponentFinderStrategy
, TypeMatcherComponentFinderStrategy
public abstract class AbstractComponentFinderStrategy extends java.lang.Object implements ComponentFinderStrategy
Modifier and Type | Field | Description |
---|---|---|
protected ComponentFinder |
componentFinder |
|
protected java.util.List<SupportingTypesStrategy> |
supportingTypesStrategies |
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractComponentFinderStrategy(SupportingTypesStrategy... strategies) |
Modifier and Type | Method | Description |
---|---|---|
protected com.structurizr.model.Component |
addComponent(com.structurizr.model.Container container,
java.lang.String name,
java.lang.String type,
java.lang.String description,
java.lang.String technology) |
|
void |
addSupportingTypesStrategy(SupportingTypesStrategy supportingTypesStrategy) |
Adds a supporting type strategy to this component finder strategy.
|
void |
afterFindComponents() |
Called after all component finder strategies belonging to the
same component finder have found components.
|
void |
beforeFindComponents() |
Called before all component finder strategies belonging to the
same component finder are asked to find components.
|
protected abstract java.util.Set<com.structurizr.model.Component> |
doFindComponents() |
A template method into which subclasses can put their component finding code.
|
protected java.util.Set<com.structurizr.model.Component> |
findClassesWithAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> type,
java.lang.String technology) |
|
protected java.util.Set<com.structurizr.model.Component> |
findClassesWithAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> type,
java.lang.String technology,
boolean includePublicTypesOnly) |
|
java.util.Set<com.structurizr.model.Component> |
findComponents() |
Finds components.
|
protected java.util.Set<java.lang.Class<?>> |
findTypesAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
|
protected ComponentFinder |
getComponentFinder() |
|
protected TypeRepository |
getTypeRepository() |
|
void |
setComponentFinder(ComponentFinder componentFinder) |
Sets a reference to the parent component finder.
|
void |
setDuplicateComponentStrategy(DuplicateComponentStrategy duplicateComponentStrategy) |
protected ComponentFinder componentFinder
protected java.util.List<SupportingTypesStrategy> supportingTypesStrategies
protected AbstractComponentFinderStrategy(SupportingTypesStrategy... strategies)
protected ComponentFinder getComponentFinder()
public void setComponentFinder(ComponentFinder componentFinder)
setComponentFinder
in interface ComponentFinderStrategy
componentFinder
- a ComponentFinder instanceprotected TypeRepository getTypeRepository()
public void beforeFindComponents()
ComponentFinderStrategy
beforeFindComponents
in interface ComponentFinderStrategy
public java.util.Set<com.structurizr.model.Component> findComponents()
ComponentFinderStrategy
findComponents
in interface ComponentFinderStrategy
protected abstract java.util.Set<com.structurizr.model.Component> doFindComponents()
public void afterFindComponents()
ComponentFinderStrategy
afterFindComponents
in interface ComponentFinderStrategy
public void addSupportingTypesStrategy(SupportingTypesStrategy supportingTypesStrategy)
supportingTypesStrategy
- a SupportingTypesStrategy instanceprotected java.util.Set<java.lang.Class<?>> findTypesAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
protected java.util.Set<com.structurizr.model.Component> findClassesWithAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> type, java.lang.String technology)
protected java.util.Set<com.structurizr.model.Component> findClassesWithAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> type, java.lang.String technology, boolean includePublicTypesOnly)
public void setDuplicateComponentStrategy(DuplicateComponentStrategy duplicateComponentStrategy)
protected com.structurizr.model.Component addComponent(com.structurizr.model.Container container, java.lang.String name, java.lang.String type, java.lang.String description, java.lang.String technology)