public abstract class AbstractComponentFinderStrategy extends java.lang.Object implements ComponentFinderStrategy
| Modifier and Type | Field and Description |
|---|---|
protected ComponentFinder |
componentFinder |
protected java.util.Set<com.structurizr.model.Component> |
componentsFound |
protected java.util.List<SupportingTypesStrategy> |
supportingTypesStrategies |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractComponentFinderStrategy(SupportingTypesStrategy... strategies) |
| Modifier and Type | Method and 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 void |
findDependencies() |
protected void |
findSupportingTypes(java.util.Set<com.structurizr.model.Component> components) |
protected java.util.Set<java.lang.Class<?>> |
findTypesAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
protected ComponentFinder |
getComponentFinder() |
DuplicateComponentStrategy |
getDuplicateComponentStrategy() |
protected TypeRepository |
getTypeRepository() |
void |
setComponentFinder(ComponentFinder componentFinder)
Sets a reference to the parent component finder.
|
void |
setDuplicateComponentStrategy(DuplicateComponentStrategy duplicateComponentStrategy) |
protected java.util.Set<com.structurizr.model.Component> componentsFound
protected ComponentFinder componentFinder
protected java.util.List<SupportingTypesStrategy> supportingTypesStrategies
protected AbstractComponentFinderStrategy(SupportingTypesStrategy... strategies)
protected ComponentFinder getComponentFinder()
public void setComponentFinder(ComponentFinder componentFinder)
setComponentFinder in interface ComponentFinderStrategycomponentFinder - a ComponentFinder instanceprotected TypeRepository getTypeRepository()
public void beforeFindComponents()
ComponentFinderStrategybeforeFindComponents in interface ComponentFinderStrategypublic java.util.Set<com.structurizr.model.Component> findComponents()
ComponentFinderStrategyfindComponents in interface ComponentFinderStrategyprotected abstract java.util.Set<com.structurizr.model.Component> doFindComponents()
public void afterFindComponents()
ComponentFinderStrategyafterFindComponents in interface ComponentFinderStrategyprotected void findSupportingTypes(java.util.Set<com.structurizr.model.Component> components)
protected void findDependencies()
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 DuplicateComponentStrategy getDuplicateComponentStrategy()
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)