public class HorizontalEntityVisitor extends Object implements TopiaEntityVisitor
| Modifier and Type | Field and Description |
|---|---|
protected List<TopiaEntity> |
alreadyExplored
Cache used to remember entity during exploration.
|
protected TopiaEntityVisitor |
delegateVisitor
Delegate visitor.
|
protected List<TopiaEntity> |
toVisitEntities
Entity to be visited later.
|
| Constructor and Description |
|---|
HorizontalEntityVisitor(TopiaEntityVisitor delegateVisitor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Reset all states of the visitor.
|
void |
end(TopiaEntity entity)
Ends the visit of the given entity.
|
void |
start(TopiaEntity entity)
Start the visit of the given entity.
|
void |
visit(TopiaEntity entity,
String propertyName,
Class<?> collectionType,
Class<?> type,
int index,
Object value)
Visit a indexed value from a collection property for the given entity.
|
void |
visit(TopiaEntity entity,
String propertyName,
Class<?> collectionType,
Class<?> type,
Object value)
Visit a collection property for the given entity.
|
void |
visit(TopiaEntity entity,
String propertyName,
Class<?> type,
Object value)
Visit a none indexed property for the given entity.
|
protected TopiaEntityVisitor delegateVisitor
protected List<TopiaEntity> alreadyExplored
protected List<TopiaEntity> toVisitEntities
public HorizontalEntityVisitor(TopiaEntityVisitor delegateVisitor)
delegateVisitor - visitor to delegate visitingpublic void start(TopiaEntity entity)
TopiaEntityVisitorstart in interface TopiaEntityVisitorentity - the visited entitypublic void visit(TopiaEntity entity, String propertyName, Class<?> type, Object value)
TopiaEntityVisitorvisit in interface TopiaEntityVisitorentity - the visited entitypropertyName - the name of the visited propertytype - the type of the visited propertyvalue - the value of the visited propertypublic void visit(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, Object value)
TopiaEntityVisitorvisit in interface TopiaEntityVisitorentity - the visited entitypropertyName - 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 entity, String propertyName, Class<?> collectionType, Class<?> type, int index, Object value)
TopiaEntityVisitorvisit in interface TopiaEntityVisitorentity - the visited entitypropertyName - 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 end(TopiaEntity entity)
TopiaEntityVisitorend in interface TopiaEntityVisitorentity - the visited entitypublic void clear()
TopiaEntityVisitorclear in interface TopiaEntityVisitorCopyright © 2004–2016 CodeLutin. All rights reserved.