public abstract class RefactoringTool extends AbstractRefactoringTool
Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
DefaultRefactoringTool
,
EclipseLinkRefactoringTool
Modifier and Type | Method and Description |
---|---|
IJPQLQueryFormatter |
getFormatter()
Returns the
IJPQLQueryFormatter that creates an accurate representation of the StateObject , i.e. |
JPQLGrammar |
getGrammar()
Returns the
JPQLGrammar that is associated with this builder. |
IJPQLQueryBuilder |
getJPQLQueryBuilder()
Returns the builder that creates the
StateObject representation of the JPQL query. |
JPQLQueryStateObject |
getStateObject()
Returns the
StateObject representation of the JPQL query or JPQL fragment that was parsed. |
void |
renameClassName(java.lang.String oldClassName,
java.lang.String newClassName)
Renames a fully qualified class name.
|
void |
renameEntityName(java.lang.String oldEntityName,
java.lang.String newEntityName)
Renames a given entity name.
|
void |
renameEnumConstant(java.lang.String oldEnumConstant,
java.lang.String newEnumConstant)
Renames an enum constant, which has to be fully qualified.
|
void |
renameField(java.lang.Class<?> type,
java.lang.String oldFieldName,
java.lang.String newFieldName)
Renames a field from the given type.
|
void |
renameField(IType type,
java.lang.String oldFieldName,
java.lang.String newFieldName)
Renames a field from the given type.
|
void |
renameField(java.lang.String typeName,
java.lang.String oldFieldName,
java.lang.String newFieldName)
Renames a field from the given type.
|
void |
renameResultVariable(java.lang.String oldVariableName,
java.lang.String newVariableName)
Renames a result variable name.
|
void |
renameVariable(java.lang.String oldVariableName,
java.lang.String newVariableName)
Renames a variable name.
|
void |
setFormatter(IJPQLQueryFormatter jpqlQueryFormatter)
Sets the
IJPQLQueryFormatter that creates an accurate representation of the StateObject , i.e. |
java.lang.String |
toActualText()
Returns the resulted of the refactoring operations.
|
getJPQLFragment, getJPQLQueryBNFId, getManagedTypeProvider, isTolerant, setTolerant
public IJPQLQueryFormatter getFormatter()
IJPQLQueryFormatter
that creates an accurate representation of the StateObject
, i.e. that output the JPQL query with the case used for the JPQL identifier.IJPQLQueryFormatter
public JPQLGrammar getGrammar()
JPQLGrammar
that is associated with this builder.JPQLGrammar
that was used to parse the JPQL query or JPQL fragmentspublic IJPQLQueryBuilder getJPQLQueryBuilder()
StateObject
representation of the JPQL query.StateObject
to be manipulatedpublic JPQLQueryStateObject getStateObject()
StateObject
representation of the JPQL query or JPQL fragment that was parsed.public void renameClassName(java.lang.String oldClassName, java.lang.String newClassName)
oldClassName
- The current fully qualified class name of the class to renamenewClassName
- The new fully qualified class namepublic void renameEntityName(java.lang.String oldEntityName, java.lang.String newEntityName)
oldEntityName
- The current name of the entity to renamenewEntityName
- The new name of the entitypublic void renameEnumConstant(java.lang.String oldEnumConstant, java.lang.String newEnumConstant)
oldEnumConstant
- The current fully qualified name of the enum constant to renamenewEnumConstant
- The new fully qualified name of the enum constantpublic void renameField(java.lang.Class<?> type, java.lang.String oldFieldName, java.lang.String newFieldName)
type
- The Java class from which the change originateoldFieldName
- The current name of the attribute to renamenewFieldName
- The new name of the attributepublic void renameField(IType type, java.lang.String oldFieldName, java.lang.String newFieldName)
type
- The IType
from which the change originateoldFieldName
- The current name of the attribute to renamenewFieldName
- The new name of the attributepublic void renameField(java.lang.String typeName, java.lang.String oldFieldName, java.lang.String newFieldName)
typeName
- The fully qualified name of the type that got one of its attributes renamedoldFieldName
- The current name of the attribute to renamenewFieldName
- The new name of the attributepublic void renameResultVariable(java.lang.String oldVariableName, java.lang.String newVariableName)
oldVariableName
- The current identification variable namenewVariableName
- The new name of the identification variablepublic void renameVariable(java.lang.String oldVariableName, java.lang.String newVariableName)
oldVariableName
- The current identification variable namenewVariableName
- The new name of the identification variablepublic void setFormatter(IJPQLQueryFormatter jpqlQueryFormatter)
IJPQLQueryFormatter
that creates an accurate representation of the StateObject
, i.e. that output the JPQL query with the case used for the JPQL identifier.jpqlQueryFormatter
- This formatter converts a StateObject
representation of the
JPQL query into a string representationpublic java.lang.String toActualText()
toActualText
in class AbstractRefactoringTool
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference