1 11 12 package org.eclipse.jdt.apt.core.internal.declaration; 13 14 import com.sun.mirror.declaration.AnnotationTypeDeclaration; 15 import com.sun.mirror.declaration.AnnotationTypeElementDeclaration; 16 import com.sun.mirror.type.AnnotationType; 17 import com.sun.mirror.util.DeclarationVisitor; 18 import com.sun.mirror.util.TypeVisitor; 19 import java.util.Collection ; 20 21 import org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv; 22 import org.eclipse.jdt.core.dom.ITypeBinding; 23 24 public class AnnotationDeclarationImpl extends InterfaceDeclarationImpl implements AnnotationTypeDeclaration, AnnotationType 25 { 26 public AnnotationDeclarationImpl(final ITypeBinding binding, final BaseProcessorEnv env) 27 { 28 super(binding, env); 29 assert binding.isAnnotation() : "binding does not represent a annotation "; } 31 32 public void accept(DeclarationVisitor visitor) 33 { 34 visitor.visitAnnotationTypeDeclaration(this); 35 } 36 37 @SuppressWarnings ("unchecked") public Collection <AnnotationTypeElementDeclaration> getMethods() 39 { 40 return (Collection <AnnotationTypeElementDeclaration>)_getMethods(); 41 } 42 43 public void accept(TypeVisitor visitor) 45 { 46 visitor.visitAnnotationType(this); 47 } 48 49 public AnnotationTypeDeclaration getDeclaration() 50 { 51 return (AnnotationTypeDeclaration)super.getDeclaration(); 52 } 53 55 public MirrorKind kind(){ return MirrorKind.TYPE_ANNOTATION; } 56 } 57 | Popular Tags |