# Uses of Enum Class
org.eclipse.jdt.core.dom.rewrite.ImportRewrite.TypeLocation

Packages that use ImportRewrite.TypeLocation
Package
Description
org.eclipse.jdt.core.dom.rewrite
The Java DOM/AST rewrite is the set of classes that are used to make changes to an existing DOM/AST tree.

## Uses of ImportRewrite.TypeLocation in org.eclipse.jdt.core.dom.rewrite

Subclasses with type arguments of type ImportRewrite.TypeLocation in org.eclipse.jdt.core.dom.rewrite
Modifier and Type
Class
Description
`static enum`
`ImportRewrite.TypeLocation`
Used to determine how a type will be used, so that unwanted annotations can be filtered, which is in particular relevant for avoiding redundant null annotations in the scope of `@NonNullByDefault`.
Methods in org.eclipse.jdt.core.dom.rewrite that return ImportRewrite.TypeLocation
Modifier and Type
Method
Description
`static ImportRewrite.TypeLocation`
ImportRewrite.TypeLocation.`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static ImportRewrite.TypeLocation[]`
ImportRewrite.TypeLocation.`values()`
Returns an array containing the constants of this enum class, in the order they are declared.
Methods in org.eclipse.jdt.core.dom.rewrite with parameters of type ImportRewrite.TypeLocation
Modifier and Type
Method
Description
`Type`
ImportRewrite.`addImport(ITypeBinding binding, AST ast, ImportRewrite.ImportRewriteContext context, ImportRewrite.TypeLocation location)`
Adds a new import to the rewriter's record and returns a `Type` that can be used in the code.
`IAnnotationBinding[]`
ImportRewrite.ImportRewriteContext.`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.