Class RoundEnvironments


  • public class RoundEnvironments
    extends java.lang.Object
    Utility class for RoundEnvironment.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private RoundEnvironments()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Set<? extends javax.lang.model.element.Element> annotatedElementsIn​(javax.annotation.processing.RoundEnvironment roundEnv, java.lang.Class<? extends java.lang.annotation.Annotation> a)
      Sanitizes the result of RoundEnvironment.getElementsAnnotatedWith(javax.lang.model.element.TypeElement), which otherwise can contain elements annotated with annotations of ERROR type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RoundEnvironments

        private RoundEnvironments()
    • Method Detail

      • annotatedElementsIn

        public static java.util.Set<? extends javax.lang.model.element.Element> annotatedElementsIn​(javax.annotation.processing.RoundEnvironment roundEnv,
                                                                                                    java.lang.Class<? extends java.lang.annotation.Annotation> a)
        Sanitizes the result of RoundEnvironment.getElementsAnnotatedWith(javax.lang.model.element.TypeElement), which otherwise can contain elements annotated with annotations of ERROR type.

        The canonical example is forgetting to import @Nullable.