public interface RefactoringRule<E extends CtElement> extends Iteration, CaseDetector, CaseTransformer, CaseProcessor
| Modifier and Type | Method and Description |
|---|---|
static CtBlock |
getClosestBlockParent(CtElement element)
The closest CtBlock by bubbling up
|
static CtClass |
getClosestClassParent(CtElement element)
The closest CtClass by bubbling up
|
static CtMethod |
getClosestMethodParent(CtElement element)
The closest Method by bubbling up
|
static <T> T |
getClosestTypeParent(CtElement element,
java.lang.Class<T> type,
java.util.List<CtElement> stopAt)
The closest T by bubbling up
|
static <T> java.util.List<T> |
getCtElementsOfInterest(CtElement root,
java.util.function.Predicate<CtElement> isElementOfInterest,
java.lang.Class<T> type)
Finds a element of interest
|
static <T> java.util.List<T> |
getCtElementsOfInterestWithFilter(CtElement root,
java.util.function.Predicate<CtElement> isElementOfInterest,
java.util.function.Predicate<CtElement> filter,
java.lang.Class<T> type)
Finds a element of interest with filter
|
static boolean |
hasCtElementOfInterest(CtElement root,
java.util.function.Predicate<CtElement> isCtElementOfInterest)
Finds a element of interest
|
iterateBlock, iterateMethod, onDidIterate, onDidRefactorCase, onDidTransformCase, onSetup, onWillIterate, onWillRefactor, onWillRefactorCase, onWillTransform, onWillTransformCasecombineCaseDetector, detectCasecombineCaseProcessor, createPassThroughTransformation, transformCasecombineCaseProcessor, processCasestatic boolean hasCtElementOfInterest(CtElement root,
java.util.function.Predicate<CtElement> isCtElementOfInterest)
root - The baseline elementisCtElementOfInterest - A predicate that identifies the interested elementstatic <T> java.util.List<T> getCtElementsOfInterest(CtElement root,
java.util.function.Predicate<CtElement> isElementOfInterest,
java.lang.Class<T> type)
root - The baseline elementisElementOfInterest - A predicate that identifies the interested elementstatic <T> java.util.List<T> getCtElementsOfInterestWithFilter(CtElement root,
java.util.function.Predicate<CtElement> isElementOfInterest,
java.util.function.Predicate<CtElement> filter,
java.lang.Class<T> type)
root - The baseline elementisElementOfInterest - A predicate that identifies the interested elementstatic <T> T getClosestTypeParent(CtElement element,
java.lang.Class<T> type,
java.util.List<CtElement> stopAt)
element - The element from which to startstatic CtBlock getClosestBlockParent(CtElement element)
element - The element from which to startstatic CtClass getClosestClassParent(CtElement element)
element - The element from which to startstatic CtMethod getClosestMethodParent(CtElement element)
element - The element from which to start