public static class Collector.CollectorVisitor extends DepthEntityVisitor
Modifier and Type | Field and Description |
---|---|
protected Deque<TopiaEntity> |
stack
la pile des entites en cours de parcours
|
alreadyExplored, delegateVisitor
Constructor and Description |
---|
CollectorVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Reset all states of the visitor.
|
void |
end(TopiaEntity e)
Ends the visit of the given entity.
|
protected Collection<TopiaEntity> |
getAlreadyExplored() |
protected Deque<TopiaEntity> |
getStack() |
protected void |
setCollector(Collector<?> collector) |
void |
start(TopiaEntity e)
Start the visit of the given entity.
|
void |
visit(TopiaEntity e,
String name,
Class<?> collectionType,
Class<?> type,
int index,
Object value)
Visit a indexed value from a collection property for the given entity.
|
void |
visit(TopiaEntity e,
String name,
Class<?> collectionType,
Class<?> type,
Object value)
Visit a collection property for the given entity.
|
void |
visit(TopiaEntity e,
String name,
Class<?> type,
Object value)
Visit a none indexed property for the given entity.
|
protected Deque<TopiaEntity> stack
protected void setCollector(Collector<?> collector)
protected Deque<TopiaEntity> getStack()
protected Collection<TopiaEntity> getAlreadyExplored()
public void start(TopiaEntity e)
EntityVisitor
start
in interface EntityVisitor
start
in class DepthEntityVisitor
e
- the visited entitypublic void end(TopiaEntity e)
EntityVisitor
end
in interface EntityVisitor
end
in class DepthEntityVisitor
e
- the visited entitypublic void visit(TopiaEntity e, String name, Class<?> type, Object value)
EntityVisitor
visit
in interface EntityVisitor
visit
in class DepthEntityVisitor
e
- the visited entityname
- the name of the visited propertytype
- the type of the visited propertyvalue
- the value of the visited propertypublic void visit(TopiaEntity e, String name, Class<?> collectionType, Class<?> type, Object value)
EntityVisitor
visit
in interface EntityVisitor
visit
in class DepthEntityVisitor
e
- the visited entityname
- the name of the visited propertycollectionType
- the type of the visited collectiontype
- the type of the visited propertyvalue
- the value of the visited propertypublic void visit(TopiaEntity e, String name, Class<?> collectionType, Class<?> type, int index, Object value)
EntityVisitor
visit
in interface EntityVisitor
visit
in class DepthEntityVisitor
e
- the visited entityname
- the name of the visited propertycollectionType
- the type of the container of the visited propertytype
- the type of the visited propertyindex
- the index of the visited property in his containervalue
- the value of the visited propertypublic void clear()
EntityVisitor
clear
in interface EntityVisitor
clear
in class DepthEntityVisitor
Copyright © 2004–2022 Code Lutin. All rights reserved.