1 11 12 package org.eclipse.jdt.apt.core.internal.declaration; 13 14 import com.sun.mirror.declaration.EnumConstantDeclaration; 15 import com.sun.mirror.declaration.EnumDeclaration; 16 import com.sun.mirror.util.DeclarationVisitor; 17 18 import org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv; 19 import org.eclipse.jdt.core.dom.IVariableBinding; 20 21 public class EnumConstantDeclarationImpl extends FieldDeclarationImpl implements EnumConstantDeclaration 22 { 23 public EnumConstantDeclarationImpl(IVariableBinding binding, BaseProcessorEnv env) 24 { 25 super(binding, env); 26 assert binding.isEnumConstant() : "binding does not represent an enum constant"; } 28 29 public void accept(DeclarationVisitor visitor) 30 { 31 visitor.visitEnumConstantDeclaration(this); 32 } 33 34 public EnumDeclaration getDeclaringType() 35 { 36 return (EnumDeclaration)super.getDeclaringType(); 37 } 38 39 public MirrorKind kind(){ return MirrorKind.ENUM_CONSTANT; } 40 } 41 | Popular Tags |