org.eclipse.persistence.jpa.jpql.tools.TextEdit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eclipselink Show documentation
Show all versions of eclipselink Show documentation
EclipseLink build based upon Git transaction f2b9fc5
/*
* Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// Oracle - initial API and implementation
//
package org.eclipse.persistence.jpa.jpql.tools;
/**
* A TextEdit
contains the information of a change that can be made to the JPQL query
* after performing a refactoring operation.
* TextRange
* objects are stored in a {@link RefactoringDelta}.
*
* @see BasicRefactoringTool
*
* @version 2.4
* @since 2.4
* @author Pascal Filion
*/
public interface TextEdit {
/**
* Returns the length of the text to replace with the new value.
*
* @return The old value's length
*/
int getLength();
/**
* Returns the new value that should replace the old value.
*
* @return The value to replace the old value
*/
String getNewValue();
/**
* Returns the location of the old value within the text.
*
* @return The location of the old value within the text
*/
int getOffset();
/**
* Returns the value that was found within the text that should be replaced by the new value.
*
* @return The value to replace
*/
String getOldValue();
}