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