public class Info
extends java.lang.Object
Parser and associated with C++ identifiers.
Info objects are meant to be added by the user to an InfoMap passed as
argument to InfoMapper.map(InfoMap). A class inheriting from the latter
becomes a kind of configuration file entirely written in Java.
For usage examples, one can refer to the source code of the default values defined
in the initializer of InfoMap.defaults.
| Modifier and Type | Field and Description |
|---|---|
java.lang.String[] |
annotations
Additional Java annotations that should prefix the identifiers on output.
|
java.lang.String |
base
Allows to override the base class of
pointerTypes. |
boolean |
cast
|
java.lang.String[] |
cppNames
A list of C++ identifiers, expressions, or header filenames to which this info is to be bound.
|
java.lang.String |
cppText
Replaces the code associated with the declaration of C++ identifiers, before parsing.
|
java.lang.String[] |
cppTypes
A list of C++ types to supply to or substitute from macros, templates, typedefs, etc.
|
boolean |
define
Indicates expressions of conditional macro groups to parse, or templates to specialize.
|
boolean |
enumerate
Maps native C++
enum classes to Java enum types, along with methods using them. |
boolean |
flatten
Outputs declarations for this class into their subclasses as well.
|
java.lang.String[] |
javaNames
The Java identifiers to output corresponding to the C++ identifiers of
cppNames. |
java.lang.String |
javaText
Outputs the given code, instead of the result parsed from the declaration of C++ identifiers.
|
java.lang.String[] |
linePatterns
A list of regular expressions (start1, end1, start2, end2, ...) that are matched against lines
in header files, where only the ones in between each pair are parsed (or not if
skip is true). |
boolean |
objectify
Map global functions to instance methods, without
static modifier, to implement an interface, etc. |
java.lang.String[] |
pointerTypes
A list of (usually)
Pointer Java subclasses to be used to map C++ pointer types. |
boolean |
purify
Forces a class to be treated as if it were abstract.
|
boolean |
skip
Skips entirely all the code associated with the C++ identifiers, expressions, or header filenames.
|
boolean |
skipDefaults
Ignores default function arguments to avoid ambiguous C++ function calls.
|
boolean |
translate
Attempts to translate naively the statements of variable-like macros to Java.
|
java.lang.String[] |
valueTypes
A list of (usually) primitive Java types to be used to map C++ value types.
|
boolean |
virtualize
Annotates virtual functions with @
Virtual and adds appropriate constructors. |
| Constructor and Description |
|---|
Info() |
Info(Info i) |
Info(java.lang.String... cppNames) |
| Modifier and Type | Method and Description |
|---|---|
Info |
annotations(java.lang.String... annotations) |
Info |
base(java.lang.String base) |
Info |
cast() |
Info |
cast(boolean cast) |
Info |
cppNames(java.lang.String... cppNames) |
Info |
cppText(java.lang.String cppText) |
Info |
cppTypes(java.lang.String... cppTypes) |
Info |
define() |
Info |
define(boolean define) |
Info |
enumerate() |
Info |
enumerate(boolean enumerate) |
Info |
flatten() |
Info |
flatten(boolean flatten) |
Info |
javaNames(java.lang.String... javaNames) |
Info |
javaText(java.lang.String javaText) |
Info |
linePatterns(java.lang.String... linePatterns) |
Info |
objectify() |
Info |
objectify(boolean objectify) |
Info |
pointerTypes(java.lang.String... pointerTypes) |
Info |
purify() |
Info |
purify(boolean purify) |
Info |
skip() |
Info |
skip(boolean skip) |
Info |
skipDefaults() |
Info |
skipDefaults(boolean skipDefaults) |
Info |
translate() |
Info |
translate(boolean translate) |
Info |
valueTypes(java.lang.String... valueTypes) |
Info |
virtualize() |
Info |
virtualize(boolean virtualize) |
public java.lang.String[] cppNames
Info(String...).public java.lang.String[] javaNames
public java.lang.String[] annotations
public java.lang.String[] cppTypes
public java.lang.String[] valueTypes
pointerTypes prefixed with @ByVal are used.public java.lang.String[] pointerTypes
public java.lang.String[] linePatterns
skip is true).public boolean cast
public boolean define
public boolean enumerate
enum classes to Java enum types, along with methods using them.
To use as keys in maps, etc, intern() must be called on instances returned from native code.public boolean flatten
public boolean objectify
static modifier, to implement an interface, etc.public boolean translate
public boolean skip
Info is provided...public boolean skipDefaults
public boolean purify
public boolean virtualize
Virtual and adds appropriate constructors.public java.lang.String base
pointerTypes. Defaults to Pointer.public java.lang.String cppText
public java.lang.String javaText
public Info()
public Info(java.lang.String... cppNames)
public Info(Info i)
public Info cppNames(java.lang.String... cppNames)
public Info javaNames(java.lang.String... javaNames)
public Info annotations(java.lang.String... annotations)
public Info cppTypes(java.lang.String... cppTypes)
public Info valueTypes(java.lang.String... valueTypes)
public Info pointerTypes(java.lang.String... pointerTypes)
public Info linePatterns(java.lang.String... linePatterns)
public Info cast()
public Info cast(boolean cast)
public Info define()
public Info define(boolean define)
public Info enumerate()
public Info enumerate(boolean enumerate)
public Info flatten()
public Info flatten(boolean flatten)
public Info objectify()
public Info objectify(boolean objectify)
public Info translate()
public Info translate(boolean translate)
public Info skip()
public Info skip(boolean skip)
public Info skipDefaults()
public Info skipDefaults(boolean skipDefaults)
public Info purify()
public Info purify(boolean purify)
public Info virtualize()
public Info virtualize(boolean virtualize)
public Info base(java.lang.String base)
public Info cppText(java.lang.String cppText)
public Info javaText(java.lang.String javaText)