< prev index next >

src/jdk.jextract/share/classes/com/sun/tools/jextract/tree/EnumTree.java

Print this page




  25 import java.util.List;
  26 import java.util.Collections;
  27 import jdk.internal.clang.Cursor;
  28 
  29 public class EnumTree extends Tree {
  30     private final List<FieldTree> constants;
  31 
  32     public EnumTree(Cursor c, List<FieldTree> constants) {
  33         super(c);
  34         this.constants = Collections.unmodifiableList(constants);
  35     }
  36 
  37     public List<FieldTree> constants() {
  38         return constants;
  39     }
  40 
  41     @Override
  42     public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
  43         return visitor.visitEnum(this, data);
  44     }
  45 
  46     public boolean isAnonymous() {
  47         return cursor().isAnonymousEnum();
  48     }
  49 }


  25 import java.util.List;
  26 import java.util.Collections;
  27 import jdk.internal.clang.Cursor;
  28 
  29 public class EnumTree extends Tree {
  30     private final List<FieldTree> constants;
  31 
  32     public EnumTree(Cursor c, List<FieldTree> constants) {
  33         super(c);
  34         this.constants = Collections.unmodifiableList(constants);
  35     }
  36 
  37     public List<FieldTree> constants() {
  38         return constants;
  39     }
  40 
  41     @Override
  42     public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
  43         return visitor.visitEnum(this, data);
  44     }




  45 }
< prev index next >