~svn/ubuntu/raring/subversion/ppa

« back to all changes in this revision

Viewing changes to subversion/bindings/java/javahl/native/JNIStackElement.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:26:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205012614-qom4xfypgtsqc2xq
Tags: 1.2.3dfsg1-3ubuntu1
Merge with the final Debian release of 1.2.3dfsg1-3, bringing in
fixes to the clean target, better documentation of the libdb4.3
upgrade and build fixes to work with swig1.3_1.3.27.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @copyright
 
3
 * ====================================================================
 
4
 * Copyright (c) 2003-2004 CollabNet.  All rights reserved.
 
5
 *
 
6
 * This software is licensed as described in the file COPYING, which
 
7
 * you should have received as part of this distribution.  The terms
 
8
 * are also available at http://subversion.tigris.org/license-1.html.
 
9
 * If newer versions of this license are posted there, you may use a
 
10
 * newer version instead, at your option.
 
11
 *
 
12
 * This software consists of voluntary contributions made by many
 
13
 * individuals.  For exact contribution history, see the revision
 
14
 * history and logs, available at http://subversion.tigris.org/.
 
15
 * ====================================================================
 
16
 * @endcopyright
 
17
 *
 
18
 * @file JNIStackElement.h
 
19
 * @brief Interface of the class JNIStackElement
 
20
 */
 
21
 
 
22
#if !defined(AFX_JNISTACKELEMENT_H__81945F80_D56F_4782_B8E7_6A82483E6463__INCLUDED_)
 
23
#define AFX_JNISTACKELEMENT_H__81945F80_D56F_4782_B8E7_6A82483E6463__INCLUDED_
 
24
 
 
25
#if _MSC_VER > 1000
 
26
#pragma once
 
27
#endif // _MSC_VER > 1000
 
28
#include <jni.h>
 
29
#include "JNIUtil.h"
 
30
 
 
31
/**
 
32
 * JNIEntry create a stack element on the stack, which will be used to track
 
33
 * the entry and exit of methods
 
34
 */ 
 
35
#define JNIEntry(c,m) JNIStackElement se(env, #c, #m, jthis);
 
36
/**
 
37
 * JNIEntry create a stack element on the stack, which will be used to track
 
38
 * the entry and exit of static methods
 
39
 */ 
 
40
#define JNIEntryStatic(c,m) JNIStackElement se(env, #c, #m, jclazz);
 
41
 
 
42
/**
 
43
 * This class is used to mark the entry and exists of methods. It can generate
 
44
 * a log message on entry and exits. The members are used to generate the exit
 
45
 * message
 
46
 */
 
47
class JNIStackElement
 
48
{
 
49
public:
 
50
    JNIStackElement(JNIEnv *env, const char *clazz,
 
51
                        const char *method, jobject jthis);
 
52
    virtual ~JNIStackElement();
 
53
 
 
54
private:
 
55
    /**
 
56
     * the name of the method
 
57
     */
 
58
    const char * m_method;
 
59
    /**
 
60
     * the name of the clazz
 
61
     */
 
62
    const char * m_clazz;
 
63
    /**
 
64
     * a buffer for the result for jthis.toString to identify the object
 
65
     */
 
66
    char m_objectID[JNIUtil::formatBufferSize];
 
67
};
 
68
// !defined(AFX_JNISTACKELEMENT_H__81945F80_D56F_4782_B8E7_6A82483E6463__INCLUDED_)
 
69
#endif