public abstract class TreeElementPattern<ParentType,T extends ParentType,Self extends TreeElementPattern<ParentType,T,Self>> extends ObjectPattern<T,Self>
ObjectPattern.Capture<T>
Modifier | Constructor and Description |
---|---|
protected |
TreeElementPattern(java.lang.Class<T> aClass) |
protected |
TreeElementPattern(InitialPatternCondition<T> condition) |
protected TreeElementPattern(InitialPatternCondition<T> condition)
protected TreeElementPattern(java.lang.Class<T> aClass)
protected abstract ParentType getParent(ParentType parentType)
protected abstract ParentType[] getChildren(ParentType parentType)
@SafeVarargs public final Self withParents(java.lang.Class<? extends ParentType>... types)
public Self withParent(java.lang.Class<? extends ParentType> type)
public Self withParent(ElementPattern<? extends ParentType> pattern)
public Self withChild(ElementPattern<? extends ParentType> pattern)
public Self withFirstChild(ElementPattern<? extends ParentType> pattern)
public Self withLastChild(ElementPattern<? extends ParentType> pattern)
public Self withChildren(ElementPattern<java.util.Collection<ParentType>> pattern)
public Self isFirstAcceptedChild(ElementPattern<? super ParentType> pattern)
public Self withSuperParent(int level, java.lang.Class<? extends ParentType> aClass)
public Self withSuperParent(int level, ElementPattern<? extends ParentType> pattern)
public Self inside(java.lang.Class<? extends ParentType> pattern)
public Self inside(ElementPattern<? extends ParentType> pattern)
public Self inside(boolean strict, ElementPattern<? extends ParentType> pattern)
public Self withAncestor(int levelsUp, ElementPattern<? extends ParentType> pattern)
public Self inside(boolean strict, ElementPattern<? extends ParentType> pattern, ElementPattern<? extends ParentType> stopAt)
@SafeVarargs public final Self insideSequence(boolean strict, ElementPattern<? extends ParentType>... patterns)
public Self afterSibling(ElementPattern<? extends ParentType> pattern)
public Self afterSiblingSkipping(ElementPattern skip, ElementPattern<? extends ParentType> pattern)