Writes a formatted trace line for the supplied invocation stage. @param object the receiver object @param methodName the invoked method name @param arguments the invocation arguments @param origin the trace prefix to write
(Object object, String methodName, Object[] arguments, final String origin)
| 111 | * @param origin the trace prefix to write |
| 112 | */ |
| 113 | protected void write(Object object, String methodName, Object[] arguments, final String origin) { |
| 114 | try { |
| 115 | writer.write(indent()); |
| 116 | writer.write(origin); |
| 117 | writer.write(" "); |
| 118 | Class theClass = object instanceof Class ? (Class) object: object.getClass(); |
| 119 | writeInfo(theClass, methodName, arguments); |
| 120 | writer.write("\n"); |
| 121 | writer.flush(); |
| 122 | } catch (IOException e) { |
| 123 | e.printStackTrace(); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Writes a trace line describing the intercepted method invocation. |