ConcreteElement
E679882
ConcreteElement is a specific implementation of an element in the Visitor design pattern that accepts visitor objects to perform operations without changing its class.
Statements (44)
| Predicate | Object |
|---|---|
| instanceOf |
DesignPatternConcept
ⓘ
ElementRoleInVisitorPattern ⓘ |
| allows | Adding new operations without modifying its class ⓘ |
| belongsToCategory | Behavioral design pattern component ⓘ |
| benefit | Keeps element classes stable while operations evolve ⓘ |
| category | Object-oriented programming concept ⓘ |
| collaboratesWith |
ConcreteVisitor
NERFINISHED
ⓘ
Visitor ⓘ |
| constrains | Client must use visitor to perform operations ⓘ |
| definesMethod | accept(Visitor visitor) ⓘ |
| designLevel | Class-level design construct ⓘ |
| documentedIn | Software design pattern literature ⓘ |
| drawback | Requires changes when new ConcreteElement types are added ⓘ |
| exampleName |
DirectoryElement
ⓘ
FileElement ⓘ ParagraphElement ⓘ ShapeElement ⓘ |
| granularity | Represents a concrete node in the visited structure ⓘ |
| hasConstraint | Must implement accept method consistently with Visitor interface ⓘ |
| hasResponsibility |
Delegate processing to visitor
ⓘ
Provide entry point for visitor operations ⓘ |
| hasRole | Element in Visitor pattern ⓘ |
| implements | Element interface ⓘ |
| invokes | visitor.visit(this) ⓘ |
| mapsTo | Concrete class implementing Element in UML diagrams ⓘ |
| mayContain | State used by visitor operations ⓘ |
| oftenRepresents | Domain-specific element in object structure ⓘ |
| partOf | Visitor design pattern NERFINISHED ⓘ |
| patternContext | Gang of Four Visitor pattern NERFINISHED ⓘ |
| purpose |
To accept visitor objects to perform operations
ⓘ
To separate algorithms from the object structure ⓘ |
| relatedConcept |
ConcreteVisitor
NERFINISHED
ⓘ
Double dispatch NERFINISHED ⓘ Element ⓘ Visitor ⓘ |
| requires | A corresponding visit method in ConcreteVisitor ⓘ |
| supports | Open/closed principle ⓘ |
| typicalLanguage |
C#
NERFINISHED
ⓘ
C++ NERFINISHED ⓘ Java NERFINISHED ⓘ Python NERFINISHED ⓘ |
| usedFor |
Applying multiple unrelated operations to the same structure
ⓘ
Traversing and processing complex object structures ⓘ |
| usedIn | Object structure of Visitor pattern ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.