pub struct JavaConfig { /* private fields */ }Expand description
Configuration for Java binding generation
Implementations§
Source§impl JavaConfig
impl JavaConfig
Sourcepub fn new(output_dir: PathBuf, package_name: String) -> JavaConfig
pub fn new(output_dir: PathBuf, package_name: String) -> JavaConfig
Create JavaConfig
§Arguments
output_dir- directory where place generated java filespackage_name- package name for generated java files
Sourcepub fn use_null_annotation(self, import_annotation: String) -> JavaConfig
👎Deprecated: Use use_null_annotation_from_package instead
pub fn use_null_annotation(self, import_annotation: String) -> JavaConfig
Use @NonNull for types where appropriate
§Arguments
import_annotation- import statement for @NonNull, for example android.support.annotation.NonNull
Sourcepub fn use_null_annotation_from_package(
self,
null_annotation_package: String,
) -> JavaConfig
pub fn use_null_annotation_from_package( self, null_annotation_package: String, ) -> JavaConfig
Use @NonNull/@Nullable for types where appropriate
§Arguments
null_annotation_package- from which package import annotations like NonNull, for example for Android Studio you should pass android.support.annotation
Sourcepub fn use_optional_package(self, optional_package: String) -> JavaConfig
pub fn use_optional_package(self, optional_package: String) -> JavaConfig
If you use JDK without java.util.Optional*, then you can provide name of custom package with Optional. Default value is “java.util”
Sourcepub fn use_reachability_fence(
self,
reachability_fence: JavaReachabilityFence,
) -> JavaConfig
pub fn use_reachability_fence( self, reachability_fence: JavaReachabilityFence, ) -> JavaConfig
Choose reachability fence variant, JavaReachabilityFence::Std provide
ability to generate better code, but not available untill Java 9 and
Android API level 28
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JavaConfig
impl RefUnwindSafe for JavaConfig
impl Send for JavaConfig
impl Sync for JavaConfig
impl Unpin for JavaConfig
impl UnwindSafe for JavaConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more