Questions tagged [external-annotations]
9 questions
4
votes
2 answers
Change external annotations location in IDEA 2019.3+
IntelliJ IDEA lets you add external annotations.
However, the files go straight into the project's root directory.
How do I change the folder?
I can't find a setting.

LppEdd
- 20,274
- 11
- 84
- 139
4
votes
2 answers
What is the Eclipse External Annotation Format for Static Inner Classes?
I am trying to write an Eclipse External Annotation file for the static inner class Map.Entry. How do I do this?
I created a file named Map$Entry.eea in the java/util sub-folder under the folder where all of my External Annotation files are…

Nathan
- 8,093
- 8
- 50
- 76
3
votes
1 answer
How to define Eclipse external null annotations for parameters in JRE methods
I am trying to annotate the JRE method T[] toArray(T[] a) from java.util.Set using Eclipse's external null annotations. The expected effect should be equivalent to this:
public interface Set extends Collection {
...
T…

Udo Borkowski
- 311
- 1
- 9
2
votes
1 answer
How to properly annotate methods with generic collections using Eclipse external Annotations
I'm trying to annotate the method java.util.List.toArray using Eclipse's external annotations, but I'm not sure how to annotate the return type. If my List has the following signature:
@NonNull List<@NonNull Element>
List.toArray should…

looper
- 1,929
- 23
- 42
2
votes
2 answers
Java 8 Optional.ifPresent is my code wrong or is it eclipse?
I am new to Java 8 and trying out Null type annotations and Optional.
For my example below, I have used String rather than my class and am calling toUpperCase just to call something, in my case I actually call a function passing in a parameter (so…

cfnz
- 196
- 3
- 14
1
vote
1 answer
Eclipse null analysis has @NonNull on generic parameter
I am having trouble with this code...
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
...
StdSerializer

Nathan
- 8,093
- 8
- 50
- 76
1
vote
1 answer
Eclipse External Null Annotation for AbstractStreamEx.nonNull()
Consider the following example code. This code uses Eclipse's @NonNull and @Nullable annotations to check for nulls. Unfortunately, Eclipse flags an error on the line map(toNonNull).
import java.util.function.Function;
import…

Nathan
- 8,093
- 8
- 50
- 76
1
vote
1 answer
Eclipse external null annotation for java.lang.Object#getClass()
I'm using the external null annotation facility available in Eclipse Mars. I'm trying to add an external annotation for java.lang.Object#getClass() but can't seem to get the signature right. I've tried the following variations:
@NonNull Class>…

Rusty Shackleford
- 1,111
- 2
- 14
- 19
0
votes
0 answers
How can I share my external annotations for dependencies used in an Android Project via VCS?
For my task at work (resolving hardcoded String warnings) I want to not only share @NonNls annotations I add inside our project, but also the external annotations I add via "Add external annotation" in Android Studio in order for my coworkers to not…

Wolkenfarmer
- 1
- 1
- 3