@Target(value=TYPE) @Retention(value=RUNTIME) public @interface Java4Cpp
A class, interface or enum annotated with
Java4Cpp will be added to the java4cpp list of classes to be
processed. Controls the mappings between the java type and the proxy with the
annotation attributes.
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
all
Enable the generation of the public methods and public inner-classes of
the class.
|
boolean |
interfaces
Enable the generation of the C++ proxies for the interfaces classes
implemented by the current type.
|
String |
name
The name of the C++ class proxy for the current type.
|
Class<?>[] |
noWrappeInterfaces
Disable the generation of the C++ proxies for the listed interfaces
classes implemented by the current type.
|
boolean |
staticFields
Enable the generation of the public static fields of the class.
|
boolean |
superclass
Enable the generation of the C++ proxy of the superclass and derive the
C++ proxy from this class.
|
Class<?>[] |
wrappeInterfaces
Enable the generation of the C++ proxies for the listed interfaces
classes implemented by the current type.
|
public abstract String name
By default, the C++ class proxy have the same name as the current type.
You have to provide a valid C++ class name (no C/C++ reserved words).
public abstract boolean superclass
By default, superclass is false and the superclass of the
current type will not be added to the java4cpp list of classes.
Sets superclass to true, will had the superclass type to
the java4cpp list of classes.
If superclass is set on type with no superclass (java.lang.Object
for exemple), the annotation has no effects.
Due to the mecanism of dependency management of java4cpp, even if
superclass is false, if a method requiere this type as a
parameter or as a return type, then the corresponding C++ proxy of the
superclass will be generated, BUT the C++ proxy will not be the
superclass of this C++ proxy.
public abstract boolean interfaces
By default, interfaces is false and only the interfaces
classes that appears in wrappeInterfaces will be added to the
java4cpp list of classes.
Sets interfaces to true will add all the interfaces
classes implemented by the current type except those which appears in
noWrappeInterfaces.
If the current type has no interfaces, the annotation has no effects.
public abstract Class<?>[] wrappeInterfaces
If interfaces is false then the interfaces classes that
appears in this list will be added to the java4cpp list of classes.
If interfaces is true, wrappeInterfaces will be
ignored.
It's not an error if a listed class does not appear in the implemented interfaces of the current type.
public abstract Class<?>[] noWrappeInterfaces
If interfaces is true then the interfaces classes that
appears in this list will not be added to the java4cpp list of classes.
If interfaces is false, noWrappeInterfaces will
be ignored.
It's not an error if a listed class does not appear in the interfaces of the current type.
public abstract boolean all
By default, all is true and all the public methods and
public inner-classes declared in the class will be added to the C++
proxy. If the annotation Java4CppNoWrappe is present for a method
or an inner-class, this later will not be added to the C++ proxy class.
If all is false, then nothing will be added to the C++
proxy class unless the annotation Java4CppWrappe will be present
for a public method or a public inner-class.
Note that for the case of an inner-class (static or not), it is possible
to use the Java4Cpp annotation instead of Java4CppWrappe
to gain a finner control of the corresponding generated C++ proxy
(superclass, interfaces etc.).
It is not an error to annotate a method or an inner-class with
Java4CppWrappe if all is true, or with
Java4CppNoWrappe if all is false.
Due to the mecanism of dependency management of java4cpp, even if an
inner-class is annotated with Java4CppNoWrappe, if an exported
method has this inner-class as a parameters or as a return type, then the
inner-class will be wrapped.
public abstract boolean staticFields
By default, staticFields is false, and no public static
fields will be added to the C++ proxy class unless the annotation
Java4CppWrappe is present for a particular public static field.
If staticFields is true then all the public static fields
declared in the class will be added to the C++ proxy. If the annotation
Java4CppNoWrappe is present for a public static field, this later
will not be added to the C++ proxy class.
It is not an error to annotate a static field with Java4CppWrappe
if staticFields is true, or with Java4CppNoWrappe
if staticFields is false.
Copyright © 2013. All Rights Reserved.