1 /*--------------------------------------------------------------------------
2 * Copyright 2009 Taro L. Saito
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *--------------------------------------------------------------------------*/
16 //--------------------------------------
20 // Since: Jan 30, 2009 7:36:19 PM
24 //--------------------------------------
25 package org.xerial.silk.impl;
27 import java.util.ArrayList;
28 import java.util.List;
30 import org.xerial.util.StringUtil;
38 public class SilkFunction
41 private String indent;
42 private ArrayList<SilkFunctionArg> argumentList = new ArrayList<SilkFunctionArg>();
44 public void setName(String name)
49 public String getName()
54 public void addArgument(String argument)
56 argumentList.add(SilkFunctionArg.newArgValue(argument));
59 public void addKeyValuePair(SilkFunctionArg argument)
61 argumentList.add(argument);
64 public List<SilkFunctionArg> getArgumentList()
69 public String getNodeIndent()
74 public void setNodeIndent(String indent)
80 public String toString()
82 return String.format("function %s(%s)", name, StringUtil.join(argumentList, ", "));