diff options
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java')
21 files changed, 0 insertions, 1424 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/Annotation.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/Annotation.java deleted file mode 100644 index a4cd5e0352..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/Annotation.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 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.common.core.resource.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; - -/** - * Common Java resource annotation behavior - * - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface Annotation - extends JavaResourceNode -{ - /** - * Return the annotation's fully qualified name, as opposed to the value of - * the annotation's 'name' element. For example: - * @com.foo.Bar(name="Thomas") - * #getAnnotationName() will return "com.foo.Bar". - * In typical subclasses, #getName() would return "Thomas". - */ - String getAnnotationName(); - - /** - * Return the corresponding JDT DOM annotation from the specified - * AST compilation unit. - */ - org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot); - - /** - * Create and add the corresponding Java annotation to the JDT DOM. - */ - void newAnnotation(); - - /** - * Remove the corresponding Java annotation from the JDT DOM. - */ - void removeAnnotation(); - - /** - * Return whether all the annotation's member values are <code>null</code>; - * implying the annotation can be removed if it has no semantic value as a - * marker annotation. - */ - boolean isUnset(); -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/AnnotationDefinition.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/AnnotationDefinition.java deleted file mode 100644 index 9df453ed8a..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/AnnotationDefinition.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.common.core.resource.java; - -import org.eclipse.jdt.core.IAnnotation; -import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement; - -/** - * Used to build Annotations discovered in the Java source code. - * To provide new AnnotationDefinitions, create a new JaxbPlatform - * by implementing JaxbPlatformDefinition. - * - * @see Annotation - * @see org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDefinition - * - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface AnnotationDefinition -{ - /** - * Return the name of the annotation the definition will build in the - * various #build...(...) methods. - */ - String getAnnotationName(); - - /** - * Build and return an annotation for the specified annotated element. - */ - Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement); - - /** - * Build and return an annotation for the specified JDT annotation - * on the specified annotated element. - */ - Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation); - - /** - * Build and return a "null" annotation for the specified annotated element. - * Only certain annotations are required to have "null" implementations; - * typically the annotations with reasonably complex default behavior. - * The "null" annotation is used by the corresponding default context model. - * The "null" annotation simplifies the context model code, allowing the - * context model to simply set various bits of state (e.g. 'name') and the - * "null" annotation will create a new "real" annotation and forward the - * new state to it. This reduces the number of null checks in the context - * model (hopefully). - */ - Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent); - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAbstractType.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAbstractType.java deleted file mode 100644 index c228a6e8c6..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAbstractType.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 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.common.core.resource.java; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.dom.AbstractTypeDeclaration; - -/** - * Java source code or binary type. This corresponds to a {@link AbstractTypeDeclaration} - * (which is why the name is somewhat wonky.) - * <p> - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceAbstractType - extends JavaResourceMember { - - /** - * Property change String for the unqualified (short) type name. - * @see JavaResourceMember#getName() - */ - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - - /** - * Return the fully qualified type name. - */ - String getQualifiedName(); - String QUALIFIED_NAME_PROPERTY = "qualifiedName"; //$NON-NLS-1$ - - /** - * Return the package name. - */ - String getPackageName(); - String PACKAGE_NAME_PROPERTY = "packageName"; //$NON-NLS-1$ - - /** - * Return the name of the type's "declaring type". - * Return <code>null</code> if the type is a top-level type. - */ - String getDeclaringTypeName(); - String DECLARING_TYPE_NAME_PROPERTY = "declaringTypeName"; //$NON-NLS-1$ - - /** - * Return whether the type is a member type. - */ - boolean isMemberType(); - String MEMBER_TYPE_PROPERTY = "memberType"; //$NON-NLS-1$ - - boolean isIn(IPackageFragment packageFragment); - - boolean isIn(IPackageFragmentRoot sourceFolder); - - - /** - * Return the immediately nested types (classes or interfaces, not enums or annotations) (children). - */ - Iterable<JavaResourceType> getTypes(); - String TYPES_COLLECTION = "types"; //$NON-NLS-1$ - - /** - * Return all the types; the type itself, its children, its grandchildren, - * etc. - */ - Iterable<JavaResourceType> getAllTypes(); - - /** - * Return the immediately nested enums (children). - */ - Iterable<JavaResourceEnum> getEnums(); - String ENUMS_COLLECTION = "enums"; //$NON-NLS-1$ - - /** - * Return all the enums; the enum itself, its children, its grandchildren, - * etc. - */ - Iterable<JavaResourceEnum> getAllEnums(); - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java deleted file mode 100644 index 5176d120ef..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java +++ /dev/null @@ -1,233 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2012 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.common.core.resource.java; - -import org.eclipse.jdt.core.dom.ASTNode; -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.AnnotationProvider; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Java source code or binary annotated element. - * <p> - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceAnnotatedElement - extends JavaResourceNode -{ - // ********** annotations ********** - - /** - * String associated with changes to the "annotations" collection - */ - String ANNOTATIONS_COLLECTION = "annotations"; //$NON-NLS-1$ - - /** - * String associated with changes to the "nestableAnnotations" collection - */ - String NESTABLE_ANNOTATIONS_COLLECTION = "nestableAnnotations"; //$NON-NLS-1$ - - /** - * Return the member's annotations in the order that they appear. - * Do not return duplicate annotations as this error is handled by the Java - * compiler. - */ - Iterable<Annotation> getAnnotations(); - - /** - * Return the number of annotations. - */ - int getAnnotationsSize(); - - /** - * Return the annotation with the specified name. - * Return the first if there are duplicates in the source code. - */ - Annotation getAnnotation(String annotationName); - - /** - * Return the specified annotation. - * Return the first if there are duplicates in the source code. - * Do not return null, but a Null Object instead if no annotation - * with the specified name exists in the source code. - */ - Annotation getNonNullAnnotation(String annotationName); - - /** - * Return the nestable annotations with the specified name in the order that - * they appear. - * If nestable and container annotations are both specified on the - * member directly, the behavior is undefined - */ - // TODO tie the singular and plural annotations together so we can generate - // a validation error when both are specified - ListIterable<NestableAnnotation> getAnnotations(String nestableAnnotationName); - - /** - * Return the number of nestable annotations with the specified name. - * If nestable and container annotations are both specified on the - * member directly, the behavior is undefined - */ - int getAnnotationsSize(String nestableAnnotationName); - - /** - * Return the nestable annotation at the specified index with the specified name. - * If nestable and container annotations are both specified on the - * member directly, the behavior is undefined - */ - NestableAnnotation getAnnotation(int index, String nestableAnnotationName); - - /** - * Add an annotation with the specified name. - * Return the newly-created annotation. - */ - Annotation addAnnotation(String annotationName); - - /** - * Add a new nestable annotation with the specified name. - * Create a new container annotation if necessary and add the nestable - * annotation to it. - * If both the nestable annotation and the container annotation already - * exist, then add to the container annotation, leaving the existing - * nestable annotation alone. - * If only the nestable annotation exists, then create the new container - * annotation and move the existing nestable annotation to it along with - * the new one. If neither annotation exists, then create a new nestable - * annotation. - */ - NestableAnnotation addAnnotation(int index, String nestableAnnotationName); - - /** - * Move the nestable annotation at the specified source index to the specified target index. - */ - void moveAnnotation(int targetIndex, int sourceIndex, String nestableAnnotationName); - - /** - * Remove the specified annotation. - */ - void removeAnnotation(String annotationName); - - /** - * Remove the specified nestable annotation from the container annotation at the specified - * index. - * If there is no container, assume the index is zero and just remove the nestable annotation - */ - void removeAnnotation(int index, String nestableAnnotationName); - - - // ********** queries ********** - - /** - * Return the element's "top level" annotations. - * For "combination" annotations (i.e. a virtual array of annotations that - * can be either a single <em>standalone</em> annotation [representing an - * array of length one] or an array of annotations witin a - * <em>container</em> annotation), only the <em>container</em> annotation is - * included (if it is present) or the single <em>standalone</em> annotation. - */ - Iterable<Annotation> getTopLevelAnnotations(); - - /** - * Return whether the underlying JDT member is currently annotated with any recognized - * annotations. - */ - boolean isAnnotated(); - - /** - * Return whether the underlying JDT member is annotated with any of the given annotations. - */ - boolean isAnnotatedWithAnyOf(Iterable<String> annotationNames); - - /** - * Return the element kind - */ - Kind getKind(); - - /** - * Return the text range for the member's name. - */ - TextRange getNameTextRange(CompilationUnit astRoot); - - /** - * Return the text range for the nestable annotation if it is currently - * unnested. If it is nested, return the text range for the corresponding - * container annotation. - * - * @see AnnotationProvider#getContainerAnnotationName(String) - */ - TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot); - - /** - * The kind of java element. - */ - public enum Kind { - - /** - * Represents an annotatable package. - * An {@link JavaResourceAnnotatedElement} of {@link Kind} PACKAGE may safely be cast as a - * {@link JavaResourcePackage} - */ - PACKAGE(ASTNode.PACKAGE_DECLARATION), - - /** - * Represents a class or interface. - * An {@link JavaResourceAnnotatedElement} of {@link Kind} TYPE may safely be cast as a - * {@link JavaResourceType} - */ - TYPE(ASTNode.TYPE_DECLARATION), - - /** - * Represents an enum. - * An {@link JavaResourceAnnotatedElement} of {@link Kind} ENUM may safely be cast as a - * {@link JavaResourceEnum} - */ - ENUM(ASTNode.ENUM_DECLARATION), - - /** - * Represents a method. - * An {@link JavaResourceAnnotatedElement} of {@link Kind} METHOD may safely be cast as a - * {@link JavaResourceMethod} - */ - METHOD(ASTNode.METHOD_DECLARATION), - - /** - * Represents a type field. - * An {@link JavaResourceAnnotatedElement} of {@link Kind} FIELD may safely be cast as a - * {@link JavaResourceField} - */ - FIELD(ASTNode.FIELD_DECLARATION), - - /** - * Represents an enum constant. - * An {@link JavaResourceAnnotatedElement} of {@link Kind} ENUM_CONSTANT may safely be cast as a - * {@link JavaResourceEnumConstant} - */ - ENUM_CONSTANT(ASTNode.ENUM_CONSTANT_DECLARATION); - - - private int astNodeType; - - Kind(int astNodeType) { - this.astNodeType = astNodeType; - } - - public int getAstNodeType() { - return this.astNodeType; - } - } -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAttribute.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAttribute.java deleted file mode 100644 index 565c27ea46..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAttribute.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 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.common.core.resource.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Java source code or binary attribute (field/method) - * - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceAttribute - extends JavaResourceMember -{ - JavaResourceType getParent(); - - JavaResourceType getResourceType(); - - /** - * Return whether the attribute's type implements or extends the specified - * type. - */ - boolean typeIsSubTypeOf(String typeName); - - /** - * Return whether the attribute's type is a "variable" primitive type - * (i.e. any primitive type except 'void'). - */ - boolean typeIsVariablePrimitive(); - - /** - * @see java.lang.reflect.Modifier - */ - int getModifiers(); - String MODIFIERS_PROPERTY = "modifiers"; //$NON-NLS-1$ - - /** - * Return the resolved, qualified name of the attribute's type - * (e.g. "java.util.Collection" or "byte[]"). - * If the type is an array, this name will include the appropriate number - * of bracket pairs. - * This name will not include the type's generic type arguments - * (e.g. "java.util.Collection<java.lang.String>" will only return - * "java.util.Collection"). - * @see #getTypeTypeArgumentNames() - */ - String getTypeName(); - String TYPE_NAME_PROPERTY = "typeName"; //$NON-NLS-1$ - - /** - * Return whether the attribute type is an interface. - */ - boolean typeIsInterface(); - String TYPE_IS_INTERFACE_PROPERTY = "typeIsInterface"; //$NON-NLS-1$ - - /** - * Return whether the attribute type is an enum. - */ - boolean typeIsEnum(); - String TYPE_IS_ENUM_PROPERTY = "typeIsEnum"; //$NON-NLS-1$ - - /** - * Return whether the attribute type is an array. - */ - boolean typeIsArray(); - String TYPE_IS_ARRAY_PROPERTY = "typeIsArray"; //$NON-NLS-1$ - - /** - * Return the dimensionality of the array, 0 otherwise. - * (String[][] -> 2, Collection<String> -> 0) - */ - int getTypeArrayDimensionality(); - String TYPE_ARRAY_DIMENSIONALITY_PROPERTY = "typeArrayDimensionality"; //$NON-NLS-1$ - - /** - * Return the component type name of the array, null otherwise. - * (String[][] -> "java.lang.String", Collection<String> -> null) - */ - String getTypeArrayComponentTypeName(); - String TYPE_ARRAY_COMPONENT_TYPE_NAME_PROPERTY = "typeArrayComponentTypeName"; //$NON-NLS-1$ - - /** - * Return the names of the attribute type's superclasses. - */ - ListIterable<String> getTypeSuperclassNames(); - String TYPE_SUPERCLASS_NAMES_LIST = "typeSuperclassNames"; //$NON-NLS-1$ - - /** - * Return the names of the attribute type's interfaces. - */ - Iterable<String> getTypeInterfaceNames(); - String TYPE_INTERFACE_NAMES_COLLECTION = "typeInterfaceNames"; //$NON-NLS-1$ - - /** - * Return the names of the attribute type's type arguments. - * The name for any argument that is an array will contain the appropriate - * number of bracket pairs. - * The names will not include any further generic type arguments. - */ - ListIterable<String> getTypeTypeArgumentNames(); - String TYPE_TYPE_ARGUMENT_NAMES_LIST = "typeTypeArgumentNames"; //$NON-NLS-1$ - - int getTypeTypeArgumentNamesSize(); - - String getTypeTypeArgumentName(int index); - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceClassFile.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceClassFile.java deleted file mode 100644 index ebda076809..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceClassFile.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 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.common.core.resource.java; - - - -/** - * Java class file - * - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceClassFile - extends JavaResourceNode -{ - /** - * Return the class file's type. - */ - JavaResourceAbstractType getType(); - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceCompilationUnit.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceCompilationUnit.java deleted file mode 100644 index 0a752f4137..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceCompilationUnit.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2012 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.common.core.resource.java; - -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.jdt.AnnotationEditFormatter; -import org.eclipse.jpt.common.utility.command.CommandExecutor; - -/** - * Dali resource for JDT compilation unit. - * <p> - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceCompilationUnit - extends JavaResourceNode.Root -{ - /** - * Return the corresponding JDT compilation unit. - */ - ICompilationUnit getCompilationUnit(); - - /** - * Return the JPA project's annotation formatter. This is used to make any - * manipulated annotations reasonably readable after being written to the - * Java source file. - */ - AnnotationEditFormatter getAnnotationEditFormatter(); - - /** - * This allows the resource model to modify the Java source code on the - * UI thread when it is executing on another thread. - */ - CommandExecutor getModifySharedDocumentCommandExecutor(); - - /** - * Resolve type information that could be dependent on other files being - * added/removed. - */ - void resolveTypes(); - - /** - * The primary type of the AST compilation unit, can be null. - * This is named the same as the compilation unit. - */ - JavaResourceAbstractType getPrimaryType(); - - /** - * Something in Java has changed (typically either the compilation unit's - * source code or the Java classpath); synchronize the compilation unit's - * state with the Java source code etc. - */ - void synchronizeWithJavaSource(); - - /** - * Build an AST for the compilation unit with its bindings resolved. - */ - CompilationUnit buildASTRoot(); -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceEnum.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceEnum.java deleted file mode 100644 index 774d95aa5c..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceEnum.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 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.common.core.resource.java; - - - -/** - * Java source code or binary enum. - * <p> - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceEnum - extends JavaResourceAbstractType -{ - - - // ********** enum constants ********** - - /** - * Return the enum's enum constants. - */ - Iterable<JavaResourceEnumConstant> getEnumConstants(); - String ENUM_CONSTANTS_COLLECTION = "enumConstants"; //$NON-NLS-1$ -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceEnumConstant.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceEnumConstant.java deleted file mode 100644 index c72c4c43bd..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceEnumConstant.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.common.core.resource.java; - -/** - * Java source code or binary enum constant - * - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceEnumConstant - extends JavaResourceMember -{ - /** - * The Java resource enum constant's name does not change. - */ - String getName(); - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceField.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceField.java deleted file mode 100644 index 1119f901c9..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceField.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 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.common.core.resource.java; - -/** - * Java source code or binary field - * - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceField - extends JavaResourceAttribute -{ -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceMember.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceMember.java deleted file mode 100644 index 6acbee48d2..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceMember.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2012 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.common.core.resource.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; - -/** - * Java source code or binary persistent member. - * <p> - * 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. - * - * @version 3.0 - * @since 2.0 - */ -public interface JavaResourceMember - extends JavaResourceAnnotatedElement -{ - String getName(); - - // ********** annotations ********** - - /** - * Sets the specified primary annotation as the first annotation, and removes all known - * annotations (i.e. does not remove non-persistence annotations) which are not included - * in the supporting annotations. - */ - Annotation setPrimaryAnnotation(String primaryAnnotationName, Iterable<String> supportingAnnotationNames); - - - - // ********** modifiers ********** - - /** - * Return whether the member is final. - */ - boolean isFinal(); - String FINAL_PROPERTY = "final"; //$NON-NLS-1$ - - boolean isTransient(); - String TRANSIENT_PROPERTY = "transient"; //$NON-NLS-1$ - - boolean isPublic(); - String PUBLIC_PROPERTY = "public"; //$NON-NLS-1$ - - boolean isStatic(); - String STATIC_PROPERTY = "static"; //$NON-NLS-1$ - - boolean isProtected(); - String PROTECTED_PROPERTY = "protected"; //$NON-NLS-1$ - - - // ********** queries ********** - - /** - * Return whether the Java resource member is for the specified - * member. - */ - boolean isFor(String memberName, int occurrence); - - - // ********** behavior ********** - - /** - * Resolve type information that could be dependent on changes elsewhere - * in the workspace. - */ - void resolveTypes(CompilationUnit astRoot); - - /** - * Return whether the Java resource member is public or protected - */ - boolean isPublicOrProtected(); -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceMethod.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceMethod.java deleted file mode 100644 index 491a5c3ca6..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceMethod.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2012 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.common.core.resource.java; - -import org.eclipse.jdt.core.dom.MethodDeclaration; -import org.eclipse.jpt.common.utility.MethodSignature; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Java source code or binary method - * - * 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. - * - * @version 3.2 - * @since 3.0 - */ -public interface JavaResourceMethod - extends JavaResourceAttribute { - - // ***** method name ***** - - /** - * The Java resource method's name does not change. - */ - String getMethodName(); - - - // ***** parameter type names ***** - - String PARAMETER_TYPE_NAMES_LIST = "parameterTypeNames"; //$NON-NLS-1$ - - ListIterable<String> getParameterTypeNames(); - - String getParameterTypeName(int index); - - int getParametersSize(); - - - // ***** constructor ***** - - String CONSTRUCTOR_PROPERTY = "constructor"; //$NON-NLS-1$ - - boolean isConstructor(); - - - // ***** misc ***** - - /** - * Return whether the Java resource persistent attribute is for the specified - * method. - */ - boolean isFor(MethodSignature methodSignature, int occurrence); - - /** - * Call this instead of initialize(CompilationUnit) - * TODO remove initialize(CompilationUnit) from the hierarchy - */ - void initialize(MethodDeclaration methodDeclaration); - - /** - * Call this instead of synchronizeWith(CompilationUnit) - * TODO remove synchronizeWith(CompilationUnit) from the hierarchy - */ - void synchronizeWith(MethodDeclaration methodDeclaration); -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java deleted file mode 100644 index 21e446ebfd..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 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.common.core.resource.java; - -import org.eclipse.core.resources.IFile; -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.AnnotationProvider; -import org.eclipse.jpt.common.core.JptResourceModel; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.model.Model; - -/** - * Common interface for Java resource nodes (source code or binary). - * <p> - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourceNode - extends Model -{ - /** - * Return the node's parent node. - */ - JavaResourceNode getParent(); - - /** - * Return the Eclipse file that contains the Java resource node - * (typically either a Java source code file or a JAR). - */ - IFile getFile(); - - /** - * Return the root of the Java resource containment hierarchy - * (typically either a compilation unit or a package fragment root). - */ - Root getRoot(); - - /** - * Return the [source] node's root (the compilation unit). - */ - // TODO get rid of this method...? - JavaResourceCompilationUnit getJavaResourceCompilationUnit(); - - /** - * Return the [source] node's text range in the compilation unit's file. - */ - TextRange getTextRange(CompilationUnit astRoot); - - /** - * Initialize the [source] node from the specified AST. - */ - void initialize(CompilationUnit astRoot); - - /** - * Synchronize the [source] node with the specified AST. - */ - void synchronizeWith(CompilationUnit astRoot); - - - /** - * Root of Java resource model containment hierarchy. - */ - interface Root - extends JavaResourceNode, JptResourceModel { - - /** - * Return the root's Java resource "abstract" types. - */ - Iterable<JavaResourceAbstractType> getTypes(); - String TYPES_COLLECTION = "types"; //$NON-NLS-1$ - - /** - * Called (via a hook in change notification) whenever anything in the - * Java resource model changes. Forwarded to listeners. - */ - void resourceModelChanged(); - - /** - * Return the annotation provider that supplies the annotations found - * in the Java resource model. - */ - AnnotationProvider getAnnotationProvider(); - } -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackage.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackage.java deleted file mode 100644 index 471b951473..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackage.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is 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 - * - * Contributor: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.common.core.resource.java; - -/** - * @author Dmitry Geraskov - * - * Java source code of package-info - * <p> - * 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. - */ -public interface JavaResourcePackage - extends JavaResourceAnnotatedElement { - - /** - * The Java resource persistent package's name. - */ - String getName(); - String NAME_PROPERTY = "name"; //$NON-NLS-1$ -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageFragment.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageFragment.java deleted file mode 100644 index 87ceb27c66..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageFragment.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2011 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.common.core.resource.java; - -import org.eclipse.jpt.common.core.AnnotationProvider; - - - -/** - * Java package fragment - * - * 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. - * - * @version 2.2 - * @since 2.2 - */ -public interface JavaResourcePackageFragment - extends JavaResourceNode -{ - /** - * Return the package fragment's class files that contain "annotated" types. - * Annotated with the annotations we care about, - * @see AnnotationProvider - */ - Iterable<JavaResourceClassFile> getClassFiles(); - String CLASS_FILES_COLLECTION = "classFiles"; //$NON-NLS-1$ - - /** - * Return the size of the package fragment's class files. - */ - int getClassFilesSize(); - - /** - * Return the package fragment's Java types. - * This is a convenience method that returns the JavaResourceTypes of the classFiles. - */ - Iterable<JavaResourceAbstractType> getTypes(); - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageFragmentRoot.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageFragmentRoot.java deleted file mode 100644 index 12082c6532..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageFragmentRoot.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2010 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.common.core.resource.java; - - -/** - * Java package fragement root - * - * 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. - * - * @version 2.2 - * @since 2.2 - */ -public interface JavaResourcePackageFragmentRoot - extends JavaResourceNode.Root -{ - /** - * Return the package fragment root's package fragments. - */ - Iterable<JavaResourcePackageFragment> getPackageFragments(); - String PACKAGE_FRAGMENTS_COLLECTION = "packageFragments"; //$NON-NLS-1$ - - /** - * Return the size of the package fragment root's package fragments. - */ - int getPackageFragmentsSize(); - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageInfoCompilationUnit.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageInfoCompilationUnit.java deleted file mode 100644 index 9371615344..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourcePackageInfoCompilationUnit.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.common.core.resource.java; - -/** - * Dali resource for JDT compilation unit named package-info.java. - * - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface JavaResourcePackageInfoCompilationUnit - extends JavaResourceCompilationUnit -{ - JavaResourcePackage getPackage(); - String PACKAGE = "package"; //$NON-NLS-1$ - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceType.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceType.java deleted file mode 100644 index b4f237120c..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceType.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2012 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.common.core.resource.java; - - -/** - * Java source code or binary class or interface. - * <p> - * 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. - * - * @version 3.0 - * @since 2.0 - */ -public interface JavaResourceType - extends JavaResourceAbstractType -{ - - /** - * Return the fully qualified name of the type's superclass. - */ - String getSuperclassQualifiedName(); - String SUPERCLASS_QUALIFIED_NAME_PROPERTY = "superclassQualifiedName"; //$NON-NLS-1$ - - /** - * Return whether the type is abstract. - */ - boolean isAbstract(); - String ABSTRACT_PROPERTY = "abstract"; //$NON-NLS-1$ - - /** - * Return whether the type has a no-arg constructor (private, protected, or public) - */ - boolean hasNoArgConstructor(); - String NO_ARG_CONSTRUCTOR_PROPERTY = "noArgConstructor"; //$NON-NLS-1$ - - /** - * Return whether the type has a private no-arg constructor - */ - boolean hasPrivateNoArgConstructor(); - String PRIVATE_NO_ARG_CONSTRUCTOR_PROPERTY = "privateNoArgConstructor"; //$NON-NLS-1$ - - /** - * Return whether the type has a public or protected no-arg constructor - * <em>or</em> only the default constructor. - */ - boolean hasPublicOrProtectedNoArgConstructor(); - - /** - * Return whether the type has a public no-arg constructor - * <em>or</em> only the default constructor. - */ - boolean hasPublicNoArgConstructor(); - - /** - * Return whether the type has any field that have relevant annotations - * on them (which can be used to infer the type's access type). - */ - boolean hasAnyAnnotatedFields(); - - /** - * Return whether the type has any field that have relevant annotations - * on them (which can be used to infer the type's access type). - */ - boolean hasAnyAnnotatedMethods(); - - /** - * Return whether the type overrides the - * {@link Object#equals(Object)} method. - */ - boolean hasEqualsMethod(); - - /** - * Return whether the type overrides the - * {@link Object#hashCode()} method. - */ - boolean hasHashCodeMethod(); - - // ********** fields ********** - - /** - * Return the type's fields. - */ - Iterable<JavaResourceField> getFields(); - String FIELDS_COLLECTION = "fields"; //$NON-NLS-1$ - - - // ********** methods ********** - - /** - * Return the type's methods. This returns *all* methods from the JDT Type - */ - Iterable<JavaResourceMethod> getMethods(); - String METHODS_COLLECTION = "methods"; //$NON-NLS-1$ - - JavaResourceMethod getMethod(String name); -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceTypeCache.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceTypeCache.java deleted file mode 100644 index 59d5e7e883..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceTypeCache.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2011 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.common.core.resource.java; - -import org.eclipse.core.resources.IFile; -import org.eclipse.jdt.core.IType; - -/** - * Java persistent type cache - used to hold "external" types - * - * 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. - * - * @version 2.3 - * @since 2.2 - */ -public interface JavaResourceTypeCache - extends JavaResourceNode.Root -{ - - /** - * Return the size of the cache's types. - */ - int getTypesSize(); - - /** - * Add a Java resource type for the specified JDT type to the - * cache. Return the new type. - */ - JavaResourceAbstractType addType(IType jdtType); - - /** - * Remove all the types associated with the specified JAR file. - * Return whether any types were removed. - */ - boolean removeTypes(IFile jarFile); - -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/NestableAnnotation.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/NestableAnnotation.java deleted file mode 100644 index 68d364bcdd..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/NestableAnnotation.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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.common.core.resource.java; - -/** - * Interface for dealing with annotations that can be "nested" within other - * annotations, typically within arrays. - * - * 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. - * - * @version 3.0 - * @since 2.0 - */ -public interface NestableAnnotation - extends Annotation { - - /** - * Move the annotation to the specified index within its container annotation. - * This should only be called when the annotation is actually nested. - */ - void moveAnnotation(int index); -} diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/NestableAnnotationDefinition.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/NestableAnnotationDefinition.java deleted file mode 100644 index eb9784f1d0..0000000000 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/NestableAnnotationDefinition.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.common.core.resource.java; - -import org.eclipse.jdt.core.IAnnotation; -import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement; - -/** - * Used to build NestableAnnotations discovered in the Java source code. - * To provide new NestableAnnotationDefinitions, create a new JaxbPlatform - * by implementing JaxbPlatformDefinition. - * - * @see NestableAnnotation - * @see org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDefinition - * - * 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. - * - * @version 3.0 - * @since 3.0 - */ -public interface NestableAnnotationDefinition -{ - /** - * Return the name of the annotation the definition will build in the - * various #build...(...) methods. - */ - String getNestableAnnotationName(); - - String getContainerAnnotationName(); - - String getElementName(); - - /** - * Build and return an annotation for the specified annotated element. - */ - NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index); - - /** - * Build and return an annotation for the specified JDT annotation - * on the specified annotated element. - */ - NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index); -} |