|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<WithoutNativeObject>
org.xbig.base.WithoutNativeObject
public enum WithoutNativeObject
Used as parameter for special constructors of NativeObjects. These constructors allow creation of Java objects without creating a C++ object. This is needed when a return value must be passed as parameter. There are two cases where this happens:
In the first case the returned C++ object is only valid inside the JNI function.
To make it available in Java it must be copied to the heap and thus deleted by
the Java developer. To make sure a Java developer knows about that, he has to pass
a Java object as parameter which must be deleted afterwards.
That object does not need to correspond to a C++ object because it will after the
method returns. To create the parameter object without a C++ object the constructor
using this enum as parameter can be used. The value I_WILL_DELETE_THIS_OBJECT
is intended to be used in this case.
The second case is described in INativeObject. The value
I_WILL_DISCONNECT_THIS_OBJECT should be used then.
If you think you have the second case make sure that that template is not returned by value! If it is returned by value you have the first case!
INativeObject.disconnectFromNativeObject()| Enum Constant Summary | |
|---|---|
I_WILL_DELETE_THIS_OBJECT
|
|
I_WILL_DISCONNECT_THIS_OBJECT
|
|
| Method Summary | |
|---|---|
static WithoutNativeObject |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static WithoutNativeObject[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final WithoutNativeObject I_WILL_DELETE_THIS_OBJECT
public static final WithoutNativeObject I_WILL_DISCONNECT_THIS_OBJECT
| Method Detail |
|---|
public static WithoutNativeObject[] values()
for (WithoutNativeObject c : WithoutNativeObject.values()) System.out.println(c);
public static WithoutNativeObject valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||