1 /* |
1 /* |
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 package com.nokia.helium.internaldata.ant.listener; |
18 package com.nokia.helium.internaldata.ant.listener; |
19 |
19 |
20 //import com.nokia.ant.taskdefs.HlmAssertMessage; |
20 //import com.nokia.ant.taskdefs.HlmAssertMessage; |
21 import com.nokia.helium.internaldata.ant.taskdefs.HlmAssertMessageTask; |
21 import com.nokia.helium.internaldata.ant.taskdefs.HlmAssertMessageTask; |
|
22 |
22 /** |
23 /** |
23 * Object to set end time for a task. |
24 * Object to set end time for a task. |
24 * |
25 * |
25 */ |
26 */ |
26 public class AssertNode extends DataNode { |
27 public class AssertNode extends DataNode { |
27 |
28 |
28 private String name; |
29 private String name; |
29 |
30 |
30 |
|
31 // location |
31 // location |
32 private String filename; |
32 private String filename; |
33 private String message; |
33 private String message; |
34 private int line = -1; |
34 private int line = -1; |
35 private String assertName; |
35 private String assertName; |
36 |
36 |
37 public AssertNode(DataNode parent, HlmAssertMessageTask task) { |
37 public AssertNode(DataNode parent, HlmAssertMessageTask task) { |
38 super(parent, task); |
38 super(parent, task); |
39 name = task.getTaskName(); |
39 name = task.getTaskName(); |
40 this.setFilename(task.getLocation().getFileName()); |
40 this.setFilename(task.getLocation().getFileName()); |
41 this.setLine(task.getLocation().getLineNumber()); |
41 this.setLine(task.getLocation().getLineNumber()); |
42 message = task.getMessage(); |
42 message = task.getMessage(); |
43 assertName = task.getAssertName(); |
43 assertName = task.getAssertName(); |
44 } |
44 } |
|
45 |
45 /** |
46 /** |
46 * Return the assert message |
47 * Return the assert message |
|
48 * |
47 * @return |
49 * @return |
48 */ |
50 */ |
49 public String getMessage() { |
51 public String getMessage() { |
50 return message; |
52 return message; |
51 } |
53 } |
|
54 |
52 /** |
55 /** |
53 * Return the assert task name. |
56 * Return the assert task name. |
|
57 * |
54 * @return |
58 * @return |
55 */ |
59 */ |
56 public String getName() { |
60 public String getName() { |
57 return name; |
61 return name; |
58 } |
62 } |
|
63 |
59 /** |
64 /** |
60 * Return the assert name. |
65 * Return the assert name. |
|
66 * |
61 * @return |
67 * @return |
62 */ |
68 */ |
63 public String getAssertName() |
69 public String getAssertName() { |
64 { |
|
65 return assertName; |
70 return assertName; |
66 } |
71 } |
|
72 |
67 /** |
73 /** |
68 * Return the path to file name. |
74 * Return the path to file name. |
|
75 * |
69 * @return |
76 * @return |
70 */ |
77 */ |
71 public String getFilename() { |
78 public String getFilename() { |
72 return filename; |
79 return filename; |
73 } |
80 } |
|
81 |
74 /** |
82 /** |
75 * Sets the path to file name. |
83 * Sets the path to file name. |
|
84 * |
76 * @param filename |
85 * @param filename |
77 */ |
86 */ |
78 public void setFilename(String filename) { |
87 public void setFilename(String filename) { |
79 this.filename = filename; |
88 this.filename = filename; |
80 } |
89 } |
|
90 |
81 /** |
91 /** |
82 * Return the line number. |
92 * Return the line number. |
|
93 * |
83 * @return |
94 * @return |
84 */ |
95 */ |
85 public int getLine() { |
96 public int getLine() { |
86 return line; |
97 return line; |
87 } |
98 } |
|
99 |
88 /** |
100 /** |
89 * Sets the line number. |
101 * Sets the line number. |
|
102 * |
90 * @param line |
103 * @param line |
91 */ |
104 */ |
92 public void setLine(int line) { |
105 public void setLine(int line) { |
93 this.line = line; |
106 this.line = line; |
94 } |
107 } |