Examples of newTypeDeclaration()


Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

    when(clazz.getOwnedTemplateSignature()).thenReturn(templateSignature);
    when(templateSignature.getParameters()).thenReturn(templateParameters);

    AST ast = AST.newAST(AST.JLS3);
    CompilationUnit cu = ast.newCompilationUnit();
    TypeDeclaration td = ast.newTypeDeclaration();
    td.setInterface(true);

    Modifier modifier = ast
        .newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
    td.modifiers().add(modifier);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

  @SuppressWarnings("unchecked")
  @Test
  public void testGenerateMethods() {
    AST ast = AST.newAST(AST.JLS3);
    ast.newCompilationUnit();
    TypeDeclaration td = ast.newTypeDeclaration();
    td.setInterface(true);

    Modifier modifier = ast
        .newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
    td.modifiers().add(modifier);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

  @SuppressWarnings("unchecked")
  @Test
  public void testGenerateMethodJavadoc() {
    AST ast = AST.newAST(AST.JLS3);
    ast.newCompilationUnit();
    TypeDeclaration td = ast.newTypeDeclaration();
    td.setInterface(true);
    Modifier modifier = ast
        .newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

  @SuppressWarnings("unchecked")
  @Test
  public void testGenerateClassJavadoc() {
    AST ast = AST.newAST(AST.JLS3);
    ast.newCompilationUnit();
    TypeDeclaration td = ast.newTypeDeclaration();
    td.setInterface(true);
    Modifier modifier = ast
        .newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

  @SuppressWarnings("unchecked")
  @Test
  public void testGenerateGetterSetterJavadoc() {
    AST ast = AST.newAST(AST.JLS3);
    ast.newCompilationUnit();
    TypeDeclaration td = ast.newTypeDeclaration();
    td.setInterface(true);
    Modifier modifier = ast
        .newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

  @SuppressWarnings("unchecked")
  @Test
  public void testGenerateMethodTemplateParams() {
    AST ast = AST.newAST(AST.JLS3);
    ast.newCompilationUnit();
    TypeDeclaration td = ast.newTypeDeclaration();
    td.setInterface(true);
    Modifier modifier = ast
        .newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

  @SuppressWarnings("unchecked")
  @Test
  public void testGenerateAssociationEndUpperCardinalityMultiplesIsOrdered() {
    AST ast = AST.newAST(AST.JLS3);
    ast.newCompilationUnit();
    TypeDeclaration td = ast.newTypeDeclaration();
    td.setInterface(true);
    Modifier modifier = ast
        .newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

    ImportDeclaration id = ast.newImportDeclaration();
    id.setName(ast.newName(new String[] {
        "java", "util", "Set" }));
    cu.imports().add(id);

    TypeDeclaration td = ast.newTypeDeclaration();
    td.setName(ast.newSimpleName("Foo"));
    TypeParameter tp = ast.newTypeParameter();
    tp.setName(ast.newSimpleName("X"));
    td.typeParameters().add(tp);
    cu.types().add(td);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

  private ASTFake() {
  }

  public static TypeDeclaration newTypeDeclaration() {
    AST ast = AST.newAST(AST.JLS8);
    return ast.newTypeDeclaration();
  }

}
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newTypeDeclaration()

  @SuppressWarnings("unchecked")
  @Override
  public TypeDeclaration write(CompilationUnit compilationUnit, TypeInfo typeInfo) {
    AST ast = compilationUnit.getAST();

    TypeDeclaration typeDeclaration = ast.newTypeDeclaration();
    compilationUnit.types().add(typeDeclaration);

    accessInfo.writeTo(typeDeclaration);
    typeNameWriter.write(typeDeclaration, typeInfo);
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.