public final class Refactoring
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
changeLocalVariableName(CtLocalVariable<?> localVariable,
java.lang.String newName)
Changes name of a
CtLocalVariable . |
static void |
changeMethodName(CtMethod<?> method,
java.lang.String newName)
Changes name of a method, propagates the change in the executable references of the model.
|
static void |
changeTypeName(CtType<?> type,
java.lang.String name)
Changes name of a type element.
|
static CtMethod<?> |
copyMethod(CtMethod<?> method)
See doc in
CtMethod.copyMethod() |
static CtType<?> |
copyType(CtType<?> type)
See doc in
CtType.copyType() |
static void |
removeDeprecatedMethods(java.lang.String path)
Removes all deprecated methods for all java files in the given path.
|
static void |
removeDeprecatedMethods(java.lang.String input,
java.lang.String resultPath)
Removes all deprecated methods for all java files in the given path.
|
public static void changeTypeName(CtType<?> type, java.lang.String name)
type
- Type in the AST.name
- New name of the element.public static void changeMethodName(CtMethod<?> method, java.lang.String newName)
public static CtMethod<?> copyMethod(CtMethod<?> method)
CtMethod.copyMethod()
public static CtType<?> copyType(CtType<?> type)
CtType.copyType()
public static void changeLocalVariableName(CtLocalVariable<?> localVariable, java.lang.String newName) throws RefactoringException
CtLocalVariable
.localVariable
- to be renamed CtLocalVariable
in the AST.newName
- New name of the element.RefactoringException
- when rename to newName would cause model inconsistency, like ambiguity, shadowing of other variables, etc.public static void removeDeprecatedMethods(java.lang.String path)
removeDeprecatedMethods(String, String)
.input
- Path to java files in folder.public static void removeDeprecatedMethods(java.lang.String input, java.lang.String resultPath)
input
- Path to java files in folder.resultPath
- Path for the refactored java files.Copyright © 2007–2021 Inria. All rights reserved.