01: package org.testng.internal;
02:
03: import java.io.Serializable;
04:
05: import org.testng.ITestNGMethod;
06:
07: public class InvokedMethod implements Serializable {
08: transient private Object m_instance;
09: private ITestNGMethod m_testMethod;
10: private Object[] m_parameters;
11: private boolean m_isTest = true;
12: private boolean m_isConfigurationMethod = false;
13: private long m_date = System.currentTimeMillis();
14:
15: /**
16: * @param m_object
17: * @param m_method
18: * @param m_parameters
19: */
20: public InvokedMethod(Object instance, ITestNGMethod method,
21: Object[] parameters, boolean isTest,
22: boolean isConfiguration, long date) {
23: m_instance = instance;
24: m_testMethod = method;
25: m_parameters = parameters;
26: m_isTest = isTest;
27: m_isConfigurationMethod = isConfiguration;
28: m_date = date;
29: }
30:
31: /**
32: * @return
33: */
34: public boolean isTestMethod() {
35: return m_isTest;
36: }
37:
38: @Override
39: public String toString() {
40: StringBuffer result = new StringBuffer(m_testMethod.toString());
41: for (Object p : m_parameters) {
42: result.append(p).append(" ");
43: }
44: result.append(" ").append(m_instance.hashCode());
45:
46: return result.toString();
47: }
48:
49: /**
50: * @return Returns the isClass.
51: */
52: public boolean isConfigurationMethod() {
53: return m_isConfigurationMethod;
54: }
55:
56: public ITestNGMethod getTestMethod() {
57: return m_testMethod;
58: }
59:
60: public long getDate() {
61: return m_date;
62: }
63:
64: }
|