mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1049105: Prevent application of annotations to incorrect entity types. r=kats
This commit is contained in:
parent
6c62798b21
commit
0a4691f9c7
@ -4,8 +4,11 @@
|
||||
|
||||
package org.mozilla.gecko.mozglue;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface JNITarget {}
|
||||
|
@ -4,9 +4,12 @@
|
||||
|
||||
package org.mozilla.gecko.mozglue;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface RobocopTarget {}
|
||||
|
||||
|
@ -4,8 +4,11 @@
|
||||
|
||||
package org.mozilla.gecko.mozglue;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface WebRTCJNITarget {}
|
||||
|
@ -4,9 +4,12 @@
|
||||
|
||||
package org.mozilla.gecko.mozglue.generatorannotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface GeneratorOptions {
|
||||
// Specifies a custom name for the generated C++ class. If left empty, is AndroidJavaClassName.
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
package org.mozilla.gecko.mozglue.generatorannotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Used to annotate parameters which are optional on the C++ side of the bridge. The annotation is
|
||||
@ -14,5 +16,6 @@ import java.lang.annotation.RetentionPolicy;
|
||||
* The default values are zero for numerical types, false for booleans, "" for strings, and null
|
||||
* for all other reference types.
|
||||
*/
|
||||
@Target({ElementType.PARAMETER})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OptionalGeneratedParameter {}
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
package org.mozilla.gecko.mozglue.generatorannotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* This annotation is used to tag methods that are to have wrapper methods generated in the android
|
||||
@ -20,6 +22,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||
* Java method to be invoked from the C side from multiple threads. Often, this isn't what is wanted
|
||||
* and may lead to subtle bugs.
|
||||
*/
|
||||
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface WrapElementForJNI {
|
||||
// Optional parameter specifying the name of the generated method stub. If omitted, the name
|
||||
|
@ -4,12 +4,15 @@
|
||||
|
||||
package org.mozilla.gecko.mozglue.generatorannotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Handy shortcut annotation. Functionally equivalent to tagging every member individually with default
|
||||
* settings.
|
||||
*/
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface WrapEntireClassForJNI {}
|
||||
|
Loading…
Reference in New Issue
Block a user