~ubuntu-branches/ubuntu/quantal/hawtjni/quantal

« back to all changes in this revision

Viewing changes to hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/MethodFlag.java

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2010-08-05 19:40:25 UTC
  • Revision ID: james.westby@ubuntu.com-20100805194025-3004hn889accwu2i
Tags: upstream-1.0~+git0c502e20c4
ImportĀ upstreamĀ versionĀ 1.0~+git0c502e20c4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2009 Progress Software, Inc.
 
3
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 
4
 * 
 
5
 * All rights reserved. This program and the accompanying materials
 
6
 * are made available under the terms of the Eclipse Public License v1.0
 
7
 * which accompanies this distribution, and is available at
 
8
 * http://www.eclipse.org/legal/epl-v10.html
 
9
 *******************************************************************************/
 
10
package org.fusesource.hawtjni.runtime;
 
11
 
 
12
/**
 
13
 * 
 
14
 * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
 
15
 */
 
16
public enum MethodFlag {
 
17
    /** 
 
18
     * Indicate that the item should not be generated. For example, 
 
19
     * custom natives are coded by hand. 
 
20
     */
 
21
    METHOD_SKIP,
 
22
    
 
23
    /**
 
24
     * Indicate that a native method should be looked up dynamically. It 
 
25
     * is useful when having a dependence on a given library is not 
 
26
     * desirable. The library name is specified in the *_custom.h file.
 
27
     */
 
28
    DYNAMIC,
 
29
    
 
30
    /**
 
31
     * Indicate that the native method represents a constant or global 
 
32
     * variable instead of a function. This omits () from the generated 
 
33
     * code.
 
34
     */
 
35
    CONSTANT_GETTER,
 
36
    
 
37
    /**
 
38
     * Indicate that the C function should be casted to a prototype 
 
39
     * generated from the parameters of the native method. Useful for 
 
40
     * variable argument C functions.
 
41
     */
 
42
    CAST,
 
43
    
 
44
    /**
 
45
     * Indicate that the native is part of the Java Native Interface. For 
 
46
     * example: NewGlobalRef(). 
 
47
     */
 
48
    JNI,
 
49
    
 
50
    /**
 
51
     * Indicate that the native method represents a structure global 
 
52
     * variable and the address of it should be returned to Java. This is 
 
53
     * done by prepending &.
 
54
     */
 
55
    ADDRESS,
 
56
    
 
57
    /**
 
58
     * Indicate that the platform source is in C++
 
59
     */
 
60
    CPP,
 
61
 
 
62
    /**
 
63
     * Indicate that the native method is a C++ constructor that allocates 
 
64
     * an object on the heap.
 
65
     */
 
66
    CPP_NEW,
 
67
    
 
68
    /**
 
69
     * Indicate that the native method is a C++ destructor that 
 
70
     * deallocates an object from the heap.
 
71
     */
 
72
    CPP_DELETE,
 
73
    
 
74
    /**
 
75
     * Indicate that the native method is a C# constructor that allocates 
 
76
     * an object on the managed (i.e. garbage collected) heap.
 
77
     */
 
78
    CS_NEW,
 
79
    
 
80
    /**
 
81
     * Indicate that the native method's return value is a 
 
82
     * C# managed object.
 
83
     */
 
84
    CS_OBJECT,
 
85
    
 
86
    /**
 
87
     * Indicate that the native method represents a setter for a field in 
 
88
     * an object or structure
 
89
     */
 
90
    SETTER,
 
91
    
 
92
    /**
 
93
     * Indicate that the native method represents a getter for a field in 
 
94
     * an object or structure.
 
95
     */
 
96
    GETTER,
 
97
    
 
98
    /**
 
99
     * Indicate that the native method takes 2 arguments, a collection and 
 
100
     * an item, and the += operator is used to add the item to the 
 
101
     * collection.
 
102
     */
 
103
    ADDER,
 
104
 
 
105
    /**
 
106
     * Indicate that the return value is a pointer.
 
107
     */
 
108
    POINTER_RETURN,
 
109
 
 
110
    /**
 
111
     * Indicate that this method will be the constant initializer for
 
112
     * the class.  When called, it will set all the static constant fields
 
113
     * to the values defined in your platform.
 
114
     */
 
115
    CONSTANT_INITIALIZER,
 
116
}
 
 
b'\\ No newline at end of file'