The missing bridge between Java and native C++
Loader
methods to Helper
class to avoid deadlocks (issue #737)Parser
failing to pick up Info
for constructors with template arguments (pull #739)MoveAdapter
and UniquePtrAdapter
causing double free on function calls (pull #738)Parser
handling of template
specialization and their friend
declarations (pull #733)Parser
capabilities for operator
and function templates (pull #732)Parser
failing on nested initializer lists and on attributes found inside enum
declarationsParser
for basic containers like std::optional<std::pair<int,int> >
(issue #718)std::basic_string
basic container (issue bytedeco/javacpp-presets#1311)Parser
by adding downcast constructors for polymorphic classes (pull #700)Generator
pick up @Name
annotations on allocate()
as well (pull #700)Parser
failing to place annotations on default constructors (pull #699)Parser
output reset()
methods for basic containers like std::optional
(pull #696)Parser
define front()
and back()
for one-dimensional basic containers (pull #695)Parser
map iterators of basic containers systematically (pull #694)Parser
for function parameters contained in template arguments (pull #693)Parser
on function pointer declarations starting with typedef struct
(pull bytedeco/javacpp-presets#1361)Loader.extractResource()
for nested JAR files from Spring Boot (pull #685)Parser
desugar ...
varargs to array []
for return types as well (pull #682)Parser
failing on some friend
functions for operator
overloading (pull #681)Parser
incorrectly casting const
pointers to template arguments of pointer types (pull #677)Parser
with Info.enumerate
failing to translate enum
values based on other enum
valuesParser
prematurely expanding macros defined in class
, struct
or union
(issue #674)Info.upcast
to support class hierarchies with virtual inheritance (pull #671)@Adapter
, @SharedPtr
, etc annotations on allocate()
as well (pull #668)@Virtual(subclasses=false)
to prevent Generator
from subclassing subclasses (pull #660)Loader.getPlatform()
detection for linux-armhf
with Temurin JDK (issue bytedeco/javacv#2001)Parser
ignoring Info.skip
for enumerators that do not get translated (issue bytedeco/javacpp-presets#1315)Parser
error on C++17 style namespace declarations containing ::
separators (issue #595)Parser
observing Info.virtualize
for non-virtual functions (pull #658)Parser
to match more robustly templates and namespaces (pull #657)Builder
default output path for class names with the same length (pull #654)Info.friendly
to have Parser
map some friend
functions to Java methods (pull #649)Loader.loadProperties(boolean forceReload)
to reset platform properties (issue deepjavalibrary/djl#2318)TokenIndexer
from recursively expanding macrosGenerator
passing empty String
objects on callback for arguments using adaptersParser
failure on enum
enumerators generated using the concat ##
operatorstatic long Pointer.getDirectBufferAddress(Buffer)
method for convenience (pull #629)UniquePtrAdapter
incorrectly deallocating pointers on callbacks (issue #613)Generator
incorrectly casting @ByVal
or @ByRef
annotated FunctionPointer
arguments (issue bytedeco/javacpp-presets#1244)Generator
compiler errors for FunctionPointer
with @UniquePtr
arguments (issue #613)Generator
compiler errors on Mac for Clang without Objective-C support (pull #610)Parser
from outputting cast methods for base classes that are Info.skip
(pull #607)Generator
and Parser
process header files from cinclude
before include
(issue #580)sun.misc.Unsafe
config incompatible/unneeded with GraalVM Native Image 22.x (issue bytedeco/sample-projects#63)SHARED_PTR_NAMESPACE
, UNIQUE_PTR_NAMESPACE
, OPTIONAL_NAMESPACE
to std
on supported compilers (issue #577)Generator
treat long
arguments and return values @ByVal
or @ByRef
with @Cast("...*")
(issue #576)BytePointer.getUnsigned()
and putUnsigned()
methods for convenience (pull #574)Parser
consider alignas
as an explicit attribute to be ignored by default (issue bytedeco/javacpp-presets#1168)Generator
causing memory leaks for String
parameters on callback (issue bytedeco/javacpp-presets#1141)Loader.new/access/deleteGlobalRef()
methods to store JNI Object
references in Pointer
(issue bytedeco/javacpp-presets#1141)Loader.findLibrary()
also search in "sun.boot.library.path" for jlink (pull #565)__int8
, __int16
, __int32
, and __int64
to InfoMap
as "basic/types" to support combinations allowed by Visual StudioPointer.NativeDeallocator
(discussion bytedeco/javacpp-presets#1160)std::function
basic container instances with corresponding FunctionPointer
(issue bytedeco/javacpp-presets#1051)Builder
parsing of command line options for platform properties (issue #564)Generator
to detach automatically native threads on exit for Windows as well (pull #562)Parser
incorrectly shortening type names for nested class template instancesParser
output boolean has_value()
methods for basic containers like std::optional
OptionalAdapter
and corresponding @Optional
annotation for containers like std::optional
AttachCurrentThreadAsDaemon()
when attaching native threads on callback (pull #561)InfoMap
default pointer and value types for integer types in std::
namespaceLoader.clearCacheDir()
along with new ClearMojo
and -clear
command line optionLoader
on Windows when there are no symbolic links or library versions (pull #512)Pointer.physicalBytes()
by excluding shared pages from memory-mapped files, etc (issue #468)Parser
not correctly encoding files of top-level classes produced with @Properties(target=..., global=...)
Pointer.interruptDeallocatorThread()
method to make JavaCPP classes eligible for GC (discussion bytedeco/javacpp-presets#1115)Parser
output the content of Info.javaText
in the case of FunctionPointer
as wellTokenIndexer
failure on macros using the concat ##
operator with empty arguments (issue #525)Parser
support arrays of anonymous struct
or union
containing another one (discussion #528)Parser
from outputting duplicate Pointer
constructors for basic containersGenerator
compiler errors on callback functions returning objects without default constructorsBuilder
copies resources only from the first directories found in the pathsLoader.getCanonicalPath()
to work around bugs in File.getCanonicalPath()
on Windows (pull #519)FunctionPointer
and @Virtual
methods missing from config files required by GraalVM Native ImageTokenizer
convert characters using ASCII escape sequences '\x...'
to normal hexadecimal values 0x...
Parser
incorrectly mapping default function arguments containing multiple template argumentsParser
failures on variadic templates calling sizeof...()
and on variables initialized from template valuesParser
from failing on nonexistent header files contained in @Platform(exclude=...)
classOrPackageNames
parameter to CacheMojo
(pull #510)module-info.java
file for presets package (pull #508)@NoException(true)
value to support overriding virtual noexcept
functionsPointer.sizeof()
method for subclasses of subclasses for primitive types (issue bytedeco/javacpp-presets#1064)UnsatisfiedLinkError
when Loader.load()
fails to find JNI librariesParser
check Info.skipDefaults
also for types to ignore default constructors (issue #493)Parser
failure on enum
declarations without enumeratorsGenerator
use the third element of @Cast(value)
on return values passed to adapters (issue tensorflow/java#345)Generator
from swallowing exceptions caught on Buffer.array()
(pull #504)enum
classes as well as resources missing from config files required by GraalVM Native ImageParser
annotate &&
parameters with new @ByRef(true)
value used by Generator
to call std::move()
Parser
overlooking anonymous class
, struct
or union
with comments after }
(issue #501)Info.beanify
to have Parser
generate JavaBeans-style getters and setters (pull #495)Parser
to use Info.javaNames
for function names containing parameters as well (issue #492)Parser
producing incorrect calls to function templates with non-type parameters (issue #491)presets/package-info.java
required for OSGi and add profile for M2Eclipse (pull #490)Generator
(pull #489)@AsUtf16
handling for setter methods paired with getters in Generator
(pull #488)NO_JNI_DETACH_THREAD
to avoid overhead from pthreads on callbacks (issue #486)@Allocator
, @CriticalRegion
, @NoException
in Generator
from @Properties(inherit=classes)
as well (issue #484)Deleter
of pointer types to UniquePtrAdapter
@Platform(pattern=...)
annotation value to allow matching with regular expressions as wellParser
to consider function pointers declared with using
but without indirectionsParser
map to annotations whole expressions starting with the __attribute__
keywordParser
sometimes failing to create template instances with default arguments (issue #478)Parser
to handle typedef
correctly in the case of enum
as well (issue #477)Pointer.getPointer(Class<P>)
scale position
, limit
, and capacity
with sizeof()
(pull #476)Parser
incorrectly translating non-documentation comments as part of documentation comments (issue #475)Pointer.maxPhysicalBytes
to 4 * Runtime.maxMemory()
by default as workaround for Android, memory-mapped files, ZGC, etc (issue #468)synchronized
code in Pointer
gets skipped with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#313)protected Pointer.offsetAddress()
and use it for getPointer()
instead of position()
Parser
when processing class
, struct
, or union
declarationsParser
wrap the erase()
methods of basic containers with iterators to allow removing from mapsParser
output the content of Info.javaText
in the case of basic containers as wellParser
failure on arguments containing multiple array accesses ending with ]]
Parser
incorrectly considering some array definitions with expressions as multidimensionaljnijavacpp
as debug messages instead of warnings (issue tensorflow/java#189)Pointer.releaseReference()
with "org.bytedeco.javacpp.nopointergc" (issue awslabs/djl#690)Parser
not stripping annotations from Info.pointerTypes
when creating Java peer classesParser
not inheriting constructors with existing Info
or with nested templatesstd::tuple
, std::optional
, and std::variant
basic containers and fix various Parser
failuresLoader.load()
to return path of a specific executable (pull #466)std::uninitialized_copy
in VectorAdapter
to make sure copy constructors get called (pull #465)System.gc()
never gets called with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#208)Info.immutable
to disable generating setters for public data members (pull #461)String
to char*
with Charset.forName(STRING_BYTES_CHARSET)
when that macro is defined (pull #460)Loader.ClassProperties
not always getting overridden correctly when defined multiple timesLoader.load()
to also rename executables on extraction to output filenames specified with the #
character@AsUtf16
annotation to map java.lang.String
to unsigned short*
(array of UTF-16 code units) (pull #442)BasicStringAdapter
and corresponding @StdBasicString
, @StdU16String
, and @StdU32String
annotations (pull #448)Parser
failures on try
blocks as function body, nested class templates, and aliases to namespaces starting with ::
Loader
from failing to find, load, or link libraries multiple timesPointer.getPointer()
methods sometimes calling the wrong constructor (issue bytedeco/javacv#1556)PointerBufferPoolMXBean
by using it via reflection (pull #447)android-*-gcc.properties
(pull #444)Loader
not searching for libraries in more than one packageBuilder
from linking with -framework JavaVM
when a path to the JVM library is foundrequires
with requires static
in JPMS .platform
module (pull #436)Parser
output Info.javaText
even for template declarations with no instancesTokenizer
from using long
literals for unsigned integers of 16 bits or lessParser
considers >=
and <=
as single tokens to prevent failuresParser
use Info.cppTypes
to override the type of enum
valuesParser
not using the correct Info.pointerTypes
for const&
declarationsGenerator
to detach automatically native threads on exit for Linux and Mac as wellLoader.load()
always succeed on optional libraries only available with extensionsBuilder.addProperty()
incorrectly appending values togetherParser
not producing PointerPointer
parameters for FunctionPointer
subclassesBuilder
copy even those platform.executable
files without prefix or suffixGetCurrentThreadId()
in Generator
when NO_WINDOWS_H
is defined#undef
directives to allow redefining macros with Parser
(issue bytedeco/javacpp-presets#935)Parser
methods specified with override
, in addition to virtual
(issue #419)Parser
create a separate Java peer class when Info.pointerTypes
is different for types prefixed with const
Generator
for @Virtual
methods protected in subclasses by casting to superclass (issue #419)Info.Info(Info)
and fix incorrect Info.skipDefaults(boolean)
(issue #420)PointerBufferPoolMXBean
to track allocations and deallocations of Pointer
(pull #413)@Platform(executable=...
property to an array and allow bundling multiple files per classBuilder
unnecessarily linking with -framework JavaVM
to fix GraalVM Native Image on Mac (issue #417)Pointer.getPointer()
methods as shortcuts for new P(p).position(p.position + i)
(issue #155)Generator
for cases when a FunctionPointer
returns another FunctionPointer
Parser
failure with auto
keyword of C++11 used as placeholder type specifier or for trailing return type (issue #407)Builder.configDirectory
option to let Generator
output files that GraalVM needs for AOT compilation (issue eclipse/deeplearning4j#7362)Parser
error on template<>
containing non-type parameters without names (issue bytedeco/javacpp-presets#889)vcruntime140_1.dll
and msvcp140_1.dll
redist files from Visual StudioBuilder
for different "java.home" path returned by latest JDKs from Oracle (pull #400)Builder
a little to work around issues with GradleSecurityException
thrown on Loader.getCacheDir()
instead of swallowing themplatform.library.path
when extracting executables and their libraries on Loader.load()
(issue bytedeco/javacv#1410)Loader.getPlatform()
to Detector
to avoid warning messages (issue #393)HyperslabIndex
class with offsets
, strides
, counts
, and blocks
parameters (pull #392)Index
class to allow overriding how the index is calculated in Indexer
(issue #391)Indexer.rows()
, cols()
, width()
, height()
, and channels()
(pull #390)Parser
producing invalid wrappers for basic containers like std::set<std::pair<...> >
linux-armhf.properties
that work mostly only for Raspberry PiGenerator
support for enum
classes with boolean
values (issue #388)Parser
outputting invalid Java code for enum
of boolean
, byte
, and short
types (issue #388)Generator
the @Namespace
annotation from paired method too for global getters and setters (issue #387)jnijavacpp
and javacpp-platform
artifact to fix issues at load time (issue bytedeco/javacv#1305)NullPointerException
in Loader.checkVersion()
(pull #385)Charset
to avoid UnsupportedEncodingException
from BytePointer
(pull #384)Pointer.isNull(Pointer p)
helper method, for convenienceMoveAdapter
and corresponding @StdMove
annotation to support objects that require std::move
from C++11File.pathSeparator
when passing multiple paths via the BUILD_PATH
environment variableParser
not picking up Info
for declarations with decltype()
specifierPointer
losing its owner when mistakenly ignoring deallocators for const
values returned from adaptersException
from Indexer.close()
signature (pull #382)Parser
recognizes base classes of struct
as public
by defaultParser
error on initializer lists containing C++11 style { ... }
for template instancesjboolean
to BooleanPointer
instead of BoolPointer
Parser
error on function declarations with ...
varargs as single parameterParser
skip over &&
-qualified functions automatically since they cannot be supportedParser
annotating pointer cast operator
methods with incorrect @Cast
(issue #379)Parser
to inherit constructors from template classes with using
Parser
honor Info.skip
for anonymous struct
or union
as wellPointer.sizeof()
method of subclasses for primitive typesInfo.enumerate
on a per-enum
basis and allow attributes after enum class
Parser
not considering identifiers as type names when placed directly after friend
or in template<>
NO_WINDOWS_H
macro in Generator
to skip #include <windows.h>
UIntIndexer
and ULongIndexer
, treating array and buffer data as unsigned 32- or 64-bit integers, for convenience (issue #376)Parser
not evaluating using namespace
with respect to the current block (issue #370)Loader
when running jlink image with JDK 13+ (pull #375)@Virtual @Name("operator ...")
in Generator
by using Java names for C++ (issue #362)Parser
missing const
to parameters of @Virtual
functions using adaptersGenerator
C++11 override
keyword for @Virtual
functions (pull #373)Loader.load()
by caching results returned from Loader.findLibrary()
(issue #287)Info
correctly in Parser
also for anonymous function pointers with const
parametersParser
apply Info.translate
in the case of enumerators as wellBuilder
with platform properties containing relative pathsParser
rename types using Info.javaNames
in addition to valueTypes
and pointerTypes
(pull #367)InfoMap
mappings missing for the std::array
and jchar
typesParser
failures with attributes on constructors, empty macros, enum classes, friend classes, inherited constructors, and keywords in parameter namesParser
support for C++11 attributes found within [[
and ]]
bracketsPointer
values maxBytes
or maxPhysicalBytes
suffixed with %
as relative to Runtime.maxMemory()
(pull #365)Parser
from considering constexpr operator
declarations as const
typesLoader.load()
the default library name of classes without @Properties(target=..., global=...)
Parser
from outputting asPointer()
cast methods with multiple inheritance (issue #360)CacheMojo
to help extract binaries and resources used by command line tools outside of the JVMByteIndexer
with value getters and setters for unsigned byte
or short
, half
, bfloat16
, and boolean
types as wellPointerScope.extend()
to prevent deallocation on the next call to close()
Generator
avoid ambiguous conversion errors from UniquePtrAdapter
to std::unique_ptr
(pull #353)Parser
using fully qualified names for @Name
annotations of nested classes (issue #352)Parser
support for macro expansion of __VA_ARGS__
Builder
not processing all classes when given .**
as input (issue bytedeco/javacv#1311)Pointer
and retrofit PointerScope
to use itParser
incorrectly inheriting default constructors multiple times with using
Parser
fully qualified names as Info.valueTypes
for enumerators as wellParser
also for default argument values (pull #343)PointerScope.forClasses
to limit the Pointer
classes that can be attached to a given instanceAllocator
to VectorAdapter
and custom Deleter
to UniquePtrAdapter
AttachCurrentThread()
(pull #339)canRead()
, canWrite()
, and canExecute()
what Loader.getCacheDir()
returnsGenerator
from copying data unnecessarily when returning Java arrays from adapters (issue #317)Parser
issues when casting const
pointers or enumerating anonymous enum
declarationsInfo.objectify
to map global functions without using the static
modifier, similarly to Scala companion objectsabstract
subclasses of FunctionPointer
(issue #318)Generator
ignores deallocators on const
values returned from adapters (issue #317)Loader.extractResource()
for directories already cached, also preventing failures (issue #197)Parser
writing allocateArray()
when single int
, long
, float
, or double
constructor already exists (issue bytedeco/javacv#1224)Builder.buildCommand
via environment variables, with names uppercase and all .
replaced with _
Parser
add @Name
or @Namespace
annotations to non-translated enumerators as wellParser
pick up the names of type aliases for function pointers declared with using
and prevent NullPointerException
Parser
failing on lambda expressions found inside member initialization lists of constructorsconstexpr
variables in Parser
by disabling their member setters automaticallyParser
not placing &
and *
at the right place inside template arguments containing function declarationsParser
by comparing their names in a case-insensitive manner and add annotations missing from index typesGenerator
taking the @By*
annotation of the paired method for the index instead of the value argument of a setterParser
sometimes considering global C++ identifiers starting with ::
as if they were localPointer.maxPhysicalBytes
to Pointer.maxBytes + Runtime.maxMemory()
(pull #310)Loader.getVersion()
and checkVersion()
to get versions of Maven artifacts and check against JavaCPPGenerator
occurring with callback functions returning a value by referenceBuilder
expand entries from the user class path with *
as basename to all JAR files in the directoryLoader
from creating symbolic links pointing to themselves by comparing with Path.normalize()
(pull #307)Loader.cacheResource()
with the "jrt" protocol as used by jlink (pull #305)SharedPtrAdapter
and UniquePtrAdapter
in callback functions (pull #304)Pointer.DeallocatorThread
with setContextClassLoader(null)
as required by containers (issue deeplearning4j/deeplearning4j#7737)-print
command line option to access platform properties externally, for example, inside build scriptsInfoMap
default pointer and value types for ssize_t
, char16_t
, char32_t
, std::u16string
, and std::u32string
FunctionPointer
subclasses, up to the value in @Allocator(max=...)
(issue bytedeco/javacpp-presets#683):
to specify exact relative paths to libraries, ignoring any additional prefix or suffixLoader.load()
from trying to load library files that do not exist or to create symbolic links to themLoader.load()
extract libraries suffixed with ##
, but still ignored for copying by Builder
Loader.load()
also initializes classes that are passed explicitlyLoader.createLibraryLink()
incorrectly truncating library versions when there is one before and another after the suffixLoader.load()
in reverse to be consistent with properties overriding:
to have Loader
consider them as filenames with prefix and suffix already includedLoader.loadGlobal()
to load symbols globally as often required by Python libraries (issue ContinuumIO/anaconda-issues#6401)