diff options
author | Brian Vosburgh | 2013-03-26 15:58:05 +0000 |
---|---|---|
committer | Brian Vosburgh | 2013-03-26 15:58:05 +0000 |
commit | a5042d1e45be11f7950e3ee1a82c084a87f1d2b1 (patch) | |
tree | 82417fb560f12c9ad97d48ad78e75feae771f813 /common/plugins | |
parent | fb21b6d3beaced63c5f96c12b221055236c648af (diff) | |
download | webtools.dali-a5042d1e45be11f7950e3ee1a82c084a87f1d2b1.tar.gz webtools.dali-a5042d1e45be11f7950e3ee1a82c084a87f1d2b1.tar.xz webtools.dali-a5042d1e45be11f7950e3ee1a82c084a87f1d2b1.zip |
clean up NullAnnotation
Diffstat (limited to 'common/plugins')
-rw-r--r-- | common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java index 4c19360a15..7df6db0145 100644 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java +++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java @@ -1,9 +1,9 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 Oracle. All rights reserved. + * Copyright (c) 2010, 2013 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 ******************************************************************************/ @@ -23,11 +23,10 @@ public abstract class NullAnnotation<A extends Annotation> extends AbstractJavaResourceModel implements Annotation { - protected NullAnnotation(JavaResourceModel parent) { super(parent); } - + public void initialize(CompilationUnit astRoot) { // do nothing } @@ -44,10 +43,6 @@ public abstract class NullAnnotation<A extends Annotation> throw new UnsupportedOperationException(); } - public boolean isMappingAnnotation() { - return false; - } - public void newAnnotation() { throw new UnsupportedOperationException(); } @@ -56,7 +51,11 @@ public abstract class NullAnnotation<A extends Annotation> throw new UnsupportedOperationException(); } - public void moveAnnotation(int index) { + /** + * Convenience implementation of + * {@link org.eclipse.jpt.common.core.resource.java.NestableAnnotation#moveAnnotation(int)}. + */ + public void moveAnnotation(@SuppressWarnings("unused") int index) { throw new UnsupportedOperationException(); } @@ -77,18 +76,17 @@ public abstract class NullAnnotation<A extends Annotation> } /** - * Convenience method: Cast the annotation's parent to a - * persistent member. + * Convenience method: Cast the annotation's parent to an + * annotated element. */ protected JavaResourceAnnotatedElement getAnnotatedElement() { return (JavaResourceAnnotatedElement) this.parent; } - + /** - * Convenience method: Add the type or attribute's annotation + * Convenience method: Add the annotated element's annotation * and return it. - * Pre-condition: The annotation's parent must be a persistent member - * (type or attribute). + * Pre-condition: The annotation's parent must be a annotated element. */ protected A addAnnotation() { return this.addAnnotation_(); @@ -98,5 +96,4 @@ public abstract class NullAnnotation<A extends Annotation> protected A addAnnotation_() { return (A) this.getAnnotatedElement().addAnnotation(this.getAnnotationName()); } - } |