diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OverrideResource.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OverrideResource.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OverrideResource.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OverrideResource.java new file mode 100644 index 0000000000..a2bcce1a13 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OverrideResource.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2007 Oracle. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0, which accompanies this distribution + * and is available at http://www.eclipse.org/legal/epl-v10.html. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.jpt.core.internal.resource.java; + +import org.eclipse.jdt.core.dom.CompilationUnit; +import org.eclipse.jpt.core.internal.ITextRange; + +/** + * Corresponds to the javax.persistence.AttributeOverride annotation + */ +public interface OverrideResource extends JavaResource +{ + + /** + * Corresponds to the name element of the AttributeOverride annotation. + * Returns null if the name element does not exist in java. + */ + String getName(); + + /** + * Corresponds to the name element of the AttributeOverride annotation. + * Set to null to remove the name element. + */ + void setName(String name); + String NAME_PROPERTY = "nameProperty"; + + /** + * Return the ITextRange for the name element. If name element + * does not exist return the ITextRange for the AttributeOverride annotation. + */ + ITextRange nameTextRange(CompilationUnit astRoot); + + /** + * Return whether the specified postition touches the table element. + * Return false if the table element does not exist. + */ + boolean nameTouches(int pos, CompilationUnit astRoot); + +} |