Project Report: fawkez

Packagesummary org.jcoderz.commons.tracing

org.jcoderz.commons.tracing.Tracer

LineHitsNoteSource
1  /*
2   * $Id: ArraysUtil.java 1011 2008-06-16 17:57:36Z amandel $
3   *
4   * Copyright 2006, The jCoderZ.org Project. All rights reserved.
5   *
6   * Redistribution and use in source and binary forms, with or without
7   * modification, are permitted provided that the following conditions are
8   * met:
9   *
10   *    * Redistributions of source code must retain the above copyright
11   *      notice, this list of conditions and the following disclaimer.
12   *    * Redistributions in binary form must reproduce the above
13   *      copyright notice, this list of conditions and the following
14   *      disclaimer in the documentation and/or other materials
15   *      provided with the distribution.
16   *    * Neither the name of the jCoderZ.org Project nor the names of
17   *      its contributors may be used to endorse or promote products
18   *      derived from this software without specific prior written
19   *      permission.
20   *
21   * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
22   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24   * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS
25   * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
28   * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32   */
33  package org.jcoderz.commons.tracing;
34  
35  
36  /**
37   * Interface for classes that collect tracing information about a certain 
38   * class.
39   * 
40   * Instances must also hold a static factory method that returns a 
41   * specific tracer, with a given name
42   * <pre>
43   *   public static Tracer getTracer(String className);
44   * </pre>
45   * the returned tracer must be multi-thread-save.
46   * 
47   * @author Andreas Mandel
48   *
49   */
50  public interface Tracer
51  {
52 (1)(2)(3)    public boolean isTracing();
53  
54      /**
55       * Indicates if the tracer is evaluating the contents of the arguments.
56       * Otherwise the entering/exiting method without the arguments / result 
57       * can be called by the traced code.
58       * This value can change during runtime, but it is only needed to 
59       * check this once, before the entering call.  
60       * @return true, if the tracer is evaluating the contents of the arguments.
61       */
62 (4)(5)    public boolean isTracingArguments();
63      
64      /**
65       * <p>A null return value is a indication that tracing is
66 (6)     * currently not enabled.</b>
67       * @param className name of the class
68       * @param methodName name of the method entered.
69       * @return a token, holding the context for the followup
70       *  exiting / throwing call.
71       */
72 (7)(8)    public TracingToken entering(String className, String methodName);
73 (9)(10)(11)(12)    public TracingToken entering(String className, String methodName, Object argument);
74 (13)(14)(15)(16)    public TracingToken entering(String className, String methodName, Object[] arguments);
75 (17)(18)(19)    public void exiting(TracingToken token);
76 (20)(21)(22)    public void exiting(TracingToken token, Object result);
77 (23)(24)(25)    public void throwing(TracingToken token, Throwable thrown);
78  
79  
80 (26)(27)    public interface TracingToken
81      {
82      }
83  }

Findings in this File

c (1) 52 : 5 Missing a Javadoc comment.
c (2) 52 : 29 '(' is not preceded with whitespace.
c (3) 52 : 12 Avoid modifiers which are implied by the context
c (4) 62 : 38 '(' is not preceded with whitespace.
c (5) 62 : 12 Avoid modifiers which are implied by the context
c (6) 66 : 30 Extra HTML tag found: </b>
c (7) 72 : 33 '(' is not preceded with whitespace.
c (8) 72 : 12 Avoid modifiers which are implied by the context
c (9) 73 : 0 Line is longer than 80 characters.
c (10) 73 : 5 Missing a Javadoc comment.
c (11) 73 : 33 '(' is not preceded with whitespace.
c (12) 73 : 12 Avoid modifiers which are implied by the context
c (13) 74 : 0 Line is longer than 80 characters.
c (14) 74 : 5 Missing a Javadoc comment.
c (15) 74 : 33 '(' is not preceded with whitespace.
c (16) 74 : 12 Avoid modifiers which are implied by the context
c (17) 75 : 5 Missing a Javadoc comment.
c (18) 75 : 24 '(' is not preceded with whitespace.
c (19) 75 : 12 Avoid modifiers which are implied by the context
c (20) 76 : 5 Missing a Javadoc comment.
c (21) 76 : 24 '(' is not preceded with whitespace.
c (22) 76 : 12 Avoid modifiers which are implied by the context
c (23) 77 : 5 Missing a Javadoc comment.
c (24) 77 : 25 '(' is not preceded with whitespace.
c (25) 77 : 12 Avoid modifiers which are implied by the context
c (26) 80 : 0 Missing a Javadoc comment.
c (27) 80 : 12 Avoid modifiers which are implied by the context