Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.SimpleName.copySubtree()


         */
        String thePropertyKey = method.getName().toString().substring(3);
        StringLiteral literal = ast.newStringLiteral();
        literal.setLiteralValue(thePropertyKey);
        methodInvocation.arguments().add(literal);
        methodInvocation.arguments().add(paramName.copySubtree(newMethod.getAST(), paramName));
       
        ExpressionStatement expressionStatement = ast.newExpressionStatement(methodInvocation);
        block.statements().add(expressionStatement);
         
        newMethod.setBody(block); // add the block to the method
View Full Code Here


      /*
       * the set expression
       */
      String propertyName = method.getName().toString().substring(3);
      MethodInvocation methodInvocation = ast.newMethodInvocation();
      methodInvocation.setExpression((Name)returnValueName.copySubtree(ast, returnValueName));
      methodInvocation.setName(ast.newSimpleName("set"));
      /*
       * the get expression
       */
      MethodInvocation paramInvocation = ast.newMethodInvocation();
View Full Code Here

    }
    /*
     * return the newly created object
     */
    ReturnStatement returnStatement = ast.newReturnStatement();
    returnStatement.setExpression((SimpleName)returnValueName.copySubtree(ast, returnValueName));
    block.statements().add(returnStatement);
    toGXTmethod.setBody(block); // add the block to the method
    return toGXTmethod;
  }
 
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.