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