Class ImportRewrite.ImportRewriteContext

    • Field Detail

      • RES_NAME_FOUND

        public static final int RES_NAME_FOUND
        Result constant signaling that the given element is know in the context.
        See Also:
        Constant Field Values
      • RES_NAME_UNKNOWN

        public static final int RES_NAME_UNKNOWN
        Result constant signaling that the given element is not know in the context.
        See Also:
        Constant Field Values
      • RES_NAME_CONFLICT

        public static final int RES_NAME_CONFLICT
        Result constant signaling that the given element is conflicting with an other element in the context.
        See Also:
        Constant Field Values
      • RES_NAME_UNKNOWN_NEEDS_EXPLICIT_IMPORT

        public static final int RES_NAME_UNKNOWN_NEEDS_EXPLICIT_IMPORT
        Result constant signaling that the given element must be imported explicitly (and must not be folded into an on-demand import or filtered as an implicit import).
        Since:
        3.11
        See Also:
        Constant Field Values
      • KIND_TYPE

        public static final int KIND_TYPE
        Kind constant specifying that the element is a type import.
        See Also:
        Constant Field Values
      • KIND_STATIC_FIELD

        public static final int KIND_STATIC_FIELD
        Kind constant specifying that the element is a static field import.
        See Also:
        Constant Field Values
      • KIND_STATIC_METHOD

        public static final int KIND_STATIC_METHOD
        Kind constant specifying that the element is a static method import.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ImportRewriteContext

        public ImportRewriteContext()
    • Method Detail

      • removeRedundantTypeAnnotations

        public IAnnotationBinding[] removeRedundantTypeAnnotations​(IAnnotationBinding[] annotations,
                                                                   ImportRewrite.TypeLocation location,
                                                                   ITypeBinding type)
        This method can be overridden in subclasses to remove annotations that are redundant, e.g. because of NonNullByDefault.
        Parameters:
        annotations - The array of type annotations to be filtered.
        location - Specifies how the type being annotated will be used.
        type - the type being annotated
        Returns:
        Returns the annotations that should be added to the type.
        Since:
        3.13