diff options
author | kmoore | 2011-02-06 02:07:28 +0000 |
---|---|---|
committer | kmoore | 2011-02-06 02:07:28 +0000 |
commit | c9c9e2b3e236ad701f642b72bca0cfabcac1d97b (patch) | |
tree | 346196323dc94395c2348339ac67e4f4cec6ebbf /jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JavaResourcePersistentAttribute.java | |
parent | 8f2746f6b8c2ddc81d653d54d280043c41ed4734 (diff) | |
download | webtools.dali-c9c9e2b3e236ad701f642b72bca0cfabcac1d97b.tar.gz webtools.dali-c9c9e2b3e236ad701f642b72bca0cfabcac1d97b.tar.xz webtools.dali-c9c9e2b3e236ad701f642b72bca0cfabcac1d97b.zip |
renamed org.eclipse.jpt.core to org.eclipse.jpt.jpa.core
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JavaResourcePersistentAttribute.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JavaResourcePersistentAttribute.java | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JavaResourcePersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JavaResourcePersistentAttribute.java new file mode 100644 index 0000000000..653d7df204 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/java/JavaResourcePersistentAttribute.java @@ -0,0 +1,144 @@ +/******************************************************************************* + * 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.jpa.core.resource.java; + +import java.util.Iterator; +import java.util.ListIterator; +import org.eclipse.jpt.common.utility.MethodSignature; + +/** + * Java source code or binary persistent attribute (field or property) + * + * 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.0 + */ +//TODO handle: +// @Basic +// private String foo, bar; +public interface JavaResourcePersistentAttribute + extends JavaResourcePersistentMember +{ + + JavaResourcePersistentType getParent(); + + JavaResourcePersistentType getResourcePersistentType(); + + /** + * The Java resource persistent attribute's name does not change. + */ + String getName(); + + /** + * Return a <em>null</em> annotation for the specified annotation name. + * Return <code>null</code> if the specified annotation name is + * <code>null</code>. + * The corresponding annotation definition must implement + * {@link AnnotationDefinition#buildNullAnnotation(JavaResourcePersistentMember) + * buildNullAnnotation()}. + */ + Annotation buildNullAnnotation(String annotationName); + + /** + * Whether the Java resource persistent attribute is a field does not change. + */ + boolean isField(); + + /** + * Whether the Java resource persistent attribute is a property does not change. + */ + boolean isProperty(); + + /** + * Return the access type explicitly specified by the javax.persistence.Access annotation. + * Return null if the Access annotation is not present. + * For JPA 1.0 this is always going to return null; Access annotation is not supported in 1.0. + */ + AccessType getSpecifiedAccess(); + + /** + * 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(); + + /** + * Return whether the Java resource persistent attribute is for the specified + * method. + */ + boolean isFor(MethodSignature methodSignature, int occurrence); + + /** + * @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 #typeTypeArgumentNames() + */ + 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 the names of the attribute type's superclasses. + */ + ListIterator<String> typeSuperclassNames(); + String TYPE_SUPERCLASS_NAMES_LIST = "typeSuperclassNames"; //$NON-NLS-1$ + + /** + * Return the names of the attribute type's interfaces. + */ + Iterator<String> typeInterfaceNames(); + 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. + */ + ListIterator<String> typeTypeArgumentNames(); + String TYPE_TYPE_ARGUMENT_NAMES_LIST = "typeTypeArgumentNames"; //$NON-NLS-1$ + + int typeTypeArgumentNamesSize(); + + String getTypeTypeArgumentName(int index); +} |