Package org.eclipse.php.internal.core.ast.nodes

Examples of org.eclipse.php.internal.core.ast.nodes.FormalParameter


  {
    ArrayList<FormalParameter> parameters = new ArrayList<FormalParameter>();
   
    for(ParameterInfo parameter : fExtractedMethodParameters)
    {
      FormalParameter formalParameter = new FormalParameter(ast);
     
      Expression variable = ast.newVariable(parameter.getParameterName());
     
      if(passByReference(parameter.getParameterName())) {
        variable = ast.newReference(variable);
      }
     
      formalParameter.setParameterName(variable);
     
      if(parameter.getParameterDefaultValue() != null && !parameter.getParameterDefaultValue().isEmpty()) {
        formalParameter.setDefaultValue(ast.newScalar(parameter.getParameterDefaultValue()));
      }
     
      if(fAddTypeHint && parameter.getParameterType() != null && !parameter.getParameterType().isEmpty()) {
        formalParameter.setParameterType(ast.newIdentifier(parameter.getParameterType()));
      }
     
      parameters.add(formalParameter);
    }
     
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.ast.nodes.FormalParameter

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.