
org.bytedeco.javacpp.annotation.NoException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacpp Show documentation
Show all versions of javacpp Show documentation
The missing bridge between Java and native C++
package org.bytedeco.javacpp.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.bytedeco.javacpp.tools.Generator;
/**
* By default, {@link Generator} assumes all native functions may throw exceptions.
* This way, any C++ exception thrown from a function gets caught and translated
* into a {@link RuntimeException}. However, this adds some overhead and requires
* additional support from the compiler. Annotating a class or a method with this
* annotation indicates that none of the enclosed functions can throw exceptions,
* and need not be included in a {@code try{ ... }} block.
*
* @see Generator
*
* @author Samuel Audet
*/
@Documented @Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface NoException { }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy