Package io.sundr.builder
Interface Visitor<T>
-
- All Known Implementing Classes:
DelegatingVisitor,PathAwareTypedVisitor,TypedVisitor,VisitorWiretap
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Visitor<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <P> Visitor<T>addRequirement(Class<P> type, Predicate<P> predicate)default Visitor<T>addRequirement(Predicate predicate)default <F> BooleancanVisit(List<Map.Entry<String,Object>> path, F target)default Predicate<List<Map.Entry<String,Object>>>getRequirement()default Class<T>getType()default <I> Predicate<List<Map.Entry<String,Object>>>hasItem(Class<I> type, Predicate<I> predicate)default <F> BooleanhasVisitMethodMatching(F target)Checks if the specified visitor has a visit method compatible with the specified fluent.default intorder()default voidvisit(List<Map.Entry<String,Object>> path, T element)voidvisit(T element)
-
-
-
Method Detail
-
visit
void visit(T element)
-
hasItem
default <I> Predicate<List<Map.Entry<String,Object>>> hasItem(Class<I> type, Predicate<I> predicate)
-
hasVisitMethodMatching
default <F> Boolean hasVisitMethodMatching(F target)
Checks if the specified visitor has a visit method compatible with the specified fluent.- Type Parameters:
F- The type of the candidate- Parameters:
target- The candidate to check if current visitor can visit.- Returns:
- True if matching method was found.
-
order
default int order()
-
-