PageRenderTime 16ms CodeModel.GetById 13ms RepoModel.GetById 0ms 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
Possible License(s): Apache-2.0
  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. */
  16. package com.google.test.metric.cpp.dom;
  17. import com.google.test.metric.ParameterInfo;
  18. import com.google.test.metric.Visibility;
  19. import java.util.List;
  20. public class FunctionDefinition extends Node {
  21. private final String name;
  22. private final int line;
  23. private final List<ParameterInfo> parameters;
  24. private final Visibility visibility;
  25. public FunctionDefinition(String name, int line,
  26. List<ParameterInfo> parameters, Visibility visibility) {
  27. this.name = name;
  28. this.line = line;
  29. this.parameters = parameters;
  30. this.visibility = visibility;
  31. }
  32. public String getName() {
  33. return name;
  34. }
  35. public int getLine() {
  36. return line;
  37. }
  38. public List<ParameterInfo> getParameters() {
  39. return parameters;
  40. }
  41. public Visibility getVisibility() {
  42. return visibility;
  43. }
  44. @Override
  45. public void accept(Visitor visitor) {
  46. visitor.beginVisit(this);
  47. visitChildren(visitor);
  48. visitor.endVisit(this);
  49. }
  50. }