ErrorProne provides the RestrictedApi annotation which allows to control who calls the annotated part of an API.
We can use it in addition or even instead of run-time checks we currently have. Since this is compile-time check we can gain a slightly better performance because we won't analyze the stack.
ErrorProne provides the
RestrictedApiannotation which allows to control who calls the annotated part of an API.We can use it in addition or even instead of run-time checks we currently have. Since this is compile-time check we can gain a slightly better performance because we won't analyze the stack.