You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ExpectedMessageSpec.java 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /* *******************************************************************
  2. * Copyright (c) 2004 IBM Corporation
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v 2.0
  6. * which accompanies this distribution and is available at
  7. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  8. *
  9. * Contributors:
  10. * Adrian Colyer,
  11. * ******************************************************************/
  12. package org.aspectj.testing;
  13. import org.aspectj.tools.ajc.AjcTestCase;
  14. /**
  15. * @author colyer
  16. *
  17. * TODO To change the template for this generated type comment go to
  18. * Window - Preferences - Java - Code Style - Code Templates
  19. */
  20. public class ExpectedMessageSpec {
  21. private String kind = "error";
  22. private int line = -1;
  23. private int aspectLine = -1;
  24. private String text;
  25. private String file;
  26. private String aspectFile;
  27. private String details;
  28. public AjcTestCase.Message toMessage() {
  29. return new AjcTestCase.Message(line, file, text, null);
  30. }
  31. public AjcTestCase.Message toWeaveMessage() {
  32. return new AjcTestCase.Message(line, file, aspectLine, aspectFile, text, null);
  33. }
  34. /**
  35. * @return Returns the details.
  36. */
  37. public String getDetails() {
  38. return details;
  39. }
  40. /**
  41. * @param details The details to set.
  42. */
  43. public void setDetails(String details) {
  44. this.details = details;
  45. }
  46. /**
  47. * @return Returns the file.
  48. */
  49. public String getFile() {
  50. return file;
  51. }
  52. /**
  53. * @param file The file to set.
  54. */
  55. public void setFile(String file) {
  56. this.file = file;
  57. }
  58. /**
  59. * @return Returns the aspect file.
  60. */
  61. public String getAspectFile() {
  62. return aspectFile;
  63. }
  64. /**
  65. * @param aspectFile The aspect file to set.
  66. */
  67. public void setAspectFile(String aspectFile) {
  68. this.aspectFile = aspectFile;
  69. }
  70. /**
  71. * @return Returns the kind.
  72. */
  73. public String getKind() {
  74. return kind;
  75. }
  76. /**
  77. * @param kind The kind to set.
  78. */
  79. public void setKind(String kind) {
  80. this.kind = kind;
  81. }
  82. /**
  83. * @return Returns the line.
  84. */
  85. public int getLine() {
  86. return line;
  87. }
  88. /**
  89. * @param line The line to set.
  90. */
  91. public void setLine(int line) {
  92. this.line = line;
  93. }
  94. /**
  95. * @return Returns the asperct line.
  96. */
  97. public int getAspectLine() {
  98. return aspectLine;
  99. }
  100. /**
  101. * @param aspectLine The aspect line to set.
  102. */
  103. public void setAspectLine(int aspectLine) {
  104. this.aspectLine = aspectLine;
  105. }
  106. /**
  107. * @return Returns the text.
  108. */
  109. public String getText() {
  110. return text;
  111. }
  112. /**
  113. * @param text The text to set.
  114. */
  115. public void setText(String text) {
  116. this.text = text;
  117. }
  118. }