@OpenApiAll
public final class PatternsManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addPattern(PatternInfo info)
Adds the given pattern in registered patterns collection.
|
boolean |
applyPattern(Target target)
The method starts applying design pattern, i.e.
|
boolean |
applyPattern(Target target,
java.util.Collection patterns)
The method starts applying design pattern, i.e.
|
boolean |
applyPattern(Target target,
java.lang.String categoryName)
Applies design pattern.
|
static PatternsManager |
getInstance()
Returns a shared instance of patterns manager.
|
java.util.Collection |
getPatterns()
Returns all registered patterns.
|
void |
removePattern(PatternInfo info)
Removes the given pattern from registered patterns collection.
|
public static PatternsManager getInstance()
public void addPattern(PatternInfo info)
info
- the give pattern to add.public void removePattern(PatternInfo info)
info
- the given pattern to remove.public java.util.Collection getPatterns()
public boolean applyPattern(Target target, java.lang.String categoryName)
target
- pattern targetcategoryName
- name of category from which patterns will be shown.public boolean applyPattern(Target target)
target
- pattern targetpublic boolean applyPattern(Target target, java.util.Collection patterns)
target
- pattern targetpatterns
- pattern to select from