Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.EnumDeclaration.modifiers()


      Object[] enumTypeModifierCollection) {

    final EnumDeclaration enumDecl = ast.newEnumDeclaration();
    enumDecl.setName(name);
    for (int i = 0; i < enumTypeModifierCollection.length; i++)
      enumDecl.modifiers().add(enumTypeModifierCollection[i]);
    enumDecl.enumConstants().addAll(enumConstantDeclarationCollection);
    return enumDecl;
  }

  private static Type getNewType(AST ast, String typeName) {
View Full Code Here


  @SuppressWarnings("unchecked")
  public EnumDeclaration generateEnum(Classifier clazz, AST ast,
      CompilationUnit cu) {
    String className = getClassName(clazz);
    EnumDeclaration ed = ast.newEnumDeclaration();
    ed.modifiers().add(
        ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
    ed.setName(ast.newSimpleName(className));
    cu.types().add(ed);
    return ed;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.