public class Foo {
private String name;
public Foo(@NonNull String name){...};
...
}
Here @NonNull is annotation which is processed compile time by the android studio to warn you that the particular function needs non null parameter.