PageRenderTime 22ms CodeModel.GetById 12ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/cpp/src/main/java/com/google/test/metric/cpp/dom/FunctionDefinition.java

http://testability-explorer.googlecode.com/
Java | 60 lines | 35 code | 10 blank | 15 comment | 0 complexity | eed9960457d91cfe7ef3d9624e1b9bc8 MD5 | raw file
 1/*
 2 * Copyright 2008 Google Inc.
 3 *
 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 5 * use this file except in compliance with the License. You may obtain a copy of
 6 * the License at
 7 *
 8 * http://www.apache.org/licenses/LICENSE-2.0
 9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16package com.google.test.metric.cpp.dom;
17
18import com.google.test.metric.ParameterInfo;
19import com.google.test.metric.Visibility;
20
21import java.util.List;
22
23public class FunctionDefinition extends Node {
24
25  private final String name;
26  private final int line;
27  private final List<ParameterInfo> parameters;
28  private final Visibility visibility;
29
30  public FunctionDefinition(String name, int line,
31      List<ParameterInfo> parameters, Visibility visibility) {
32    this.name = name;
33    this.line = line;
34    this.parameters = parameters;
35    this.visibility = visibility;
36  }
37
38  public String getName() {
39    return name;
40  }
41
42  public int getLine() {
43    return line;
44  }
45
46  public List<ParameterInfo> getParameters() {
47    return parameters;
48  }
49
50  public Visibility getVisibility() {
51    return visibility;
52  }
53
54  @Override
55  public void accept(Visitor visitor) {
56    visitor.beginVisit(this);
57    visitChildren(visitor);
58    visitor.endVisit(this);
59  }
60}