Package org.aspectj.org.eclipse.jdt.core.dom

Examples of org.aspectj.org.eclipse.jdt.core.dom.TypeDeclaration


    if (node.getNodeType() != ASTNode.TYPE_DECLARATION) {
      createdNodeSource = generateSyntaxIncorrectAST();
      if (this.createdNode == null)
        throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_CONTENTS));
    } else {
      TypeDeclaration typeDeclaration = (TypeDeclaration) node;
      this.createdNode = (ASTNode) typeDeclaration.bodyDeclarations().iterator().next();
      createdNodeSource = this.source;
    }
    if (this.alteredName != null) {
      SimpleName newName = this.createdNode.getAST().newSimpleName(this.alteredName);
      SimpleName oldName = rename(this.createdNode, newName);
View Full Code Here


  buff.append(this.source);
  buff.append(lineSeparator).append('}');
  ASTParser parser = ASTParser.newParser(AST.JLS3);
  parser.setSource(buff.toString().toCharArray());
  CompilationUnit compilationUnit = (CompilationUnit) parser.createAST(null);
  TypeDeclaration typeDeclaration = (TypeDeclaration) compilationUnit.types().iterator().next();
  List bodyDeclarations = typeDeclaration.bodyDeclarations();
  if (bodyDeclarations.size() != 0)
    this.createdNode = (ASTNode) bodyDeclarations.iterator().next();
  return buff.toString();
}
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.core.dom.TypeDeclaration

Copyright © 2018 www.massapicom. 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.