1 11 12 package org.eclipse.jdt.apt.core.internal.declaration; 13 14 import com.sun.mirror.declaration.InterfaceDeclaration; 15 import com.sun.mirror.declaration.MethodDeclaration; 16 import com.sun.mirror.type.InterfaceType; 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 InterfaceDeclarationImpl extends TypeDeclarationImpl implements InterfaceDeclaration, InterfaceType 25 { 26 public InterfaceDeclarationImpl(final ITypeBinding binding, final BaseProcessorEnv env) 27 { 28 super(binding, env); 29 assert binding.isInterface() : "binding does not represents an interface."; } 31 32 public void accept(DeclarationVisitor visitor) 33 { 34 visitor.visitInterfaceDeclaration(this); 35 } 36 37 public Collection <? extends MethodDeclaration> getMethods() 38 { 39 return _getMethods(); 40 } 41 42 public void accept(TypeVisitor visitor) 44 { 45 visitor.visitInterfaceType(this); 46 } 47 48 public InterfaceDeclaration getDeclaration() 49 { 50 return (InterfaceDeclaration)super.getDeclaration(); 51 } 52 54 public MirrorKind kind(){ return MirrorKind.TYPE_INTERFACE; } 55 } 56 | Popular Tags |