|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Annotation
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.resource.java.JavaResourceNode |
|---|
JavaResourceNode.Root |
| Method Summary | |
|---|---|
java.lang.String |
getAnnotationName()
Return the annotation's fully qualified name, as opposed to the value of the annotation's name element. |
org.eclipse.jdt.core.dom.Annotation |
getAstAnnotation(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return the corresponding JDT DOM annotation from the specified AST compilation unit. |
boolean |
isUnset()
Return whether all the annotation's member values are null;
implying the annotation can be removed if it has no semantic value as a
marker annotation. |
void |
newAnnotation()
Create and add the corresponding Java annotation to the JDT DOM. |
void |
removeAnnotation()
Remove the corresponding Java annotation from the JDT DOM. |
void |
restoreFrom(java.util.Map<java.lang.String,java.lang.Object> map)
Restore the annotation's state from the specified map, recursing into nested annotations. |
void |
storeOn(java.util.Map<java.lang.String,java.lang.Object> map)
Store the annotation's state in the specified map, recursing into nested annotations. |
| Methods inherited from interface org.eclipse.jpt.jpa.core.resource.java.JavaResourceNode |
|---|
getFile, getJavaResourceCompilationUnit, getParent, getRoot, getTextRange, initialize, synchronizeWith |
| Methods inherited from interface org.eclipse.jpt.common.utility.model.Model |
|---|
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener |
| Method Detail |
|---|
java.lang.String getAnnotationName()
name element. For example:
@com.foo.Bar(name="Thomas")
#getAnnotationName() will return "com.foo.Bar".
In typical subclasses, #getName() would return
"Thomas".
JPAorg.eclipse.jdt.core.dom.Annotation getAstAnnotation(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
void newAnnotation()
void removeAnnotation()
boolean isUnset()
null;
implying the annotation can be removed if it has no semantic value as a
marker annotation.
void storeOn(java.util.Map<java.lang.String,java.lang.Object> map)
This is used to save an annotation's state when it is converted from stand-alone to nested (and vice versa). During tests, and possibly at other times (albeit asynchronously), the annotation's state is cleared out when the new annotation is written to the Java source file; since this will trigger a Java change event and the annotation will be sync'ed with the, now empty, Java source code annotation.
restoreFrom(Map)void restoreFrom(java.util.Map<java.lang.String,java.lang.Object> map)
storeOn(Map)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||