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

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


              // rename constructors
              Iterator bodyDeclarations = typeNode.bodyDeclarations().iterator();
              while (bodyDeclarations.hasNext()) {
                Object bodyDeclaration = bodyDeclarations.next();
                if (bodyDeclaration instanceof MethodDeclaration) {
                  MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
                  if (methodDeclaration.isConstructor()) {
                    SimpleName methodName = methodDeclaration.getName();
                    if (methodName.getIdentifier().equals(oldTypeName)) {
                      rewriter.replace(methodName, ast.newSimpleName(newTypeName), null);
                    }
                  }
                }
View Full Code Here


* current <code>MethodDeclaration</code>
*/
protected String[] convertASTMethodTypesToSignatures() {
  if (this.parameterTypes == null) {
    if (this.createdNode != null) {
      MethodDeclaration methodDeclaration = (MethodDeclaration) this.createdNode;
      List parameters = methodDeclaration.parameters();
      int size = parameters.size();
      this.parameterTypes = new String[size];
      Iterator iterator = parameters.iterator();
      // convert the AST types to signatures
      for (int i = 0; i < size; i++) {
        SingleVariableDeclaration parameter = (SingleVariableDeclaration) iterator.next();
        String typeSig = Util.getSignature(parameter.getType());
        int extraDimensions = parameter.getExtraDimensions();
        if (methodDeclaration.isVarargs() && i == size-1)
          extraDimensions++;
        this.parameterTypes[i] = Signature.createArraySignature(typeSig, extraDimensions);
      }
    }
  }
View Full Code Here

*/
public String getMainTaskName(){
  return Messages.operation_createMethodProgress;
}
protected SimpleName rename(ASTNode node, SimpleName newName) {
  MethodDeclaration method = (MethodDeclaration) node;
  SimpleName oldName = method.getName();
  method.setName(newName);
  return oldName;
}
View Full Code Here

TOP

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

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.