public static enum ImportRewrite.TypeLocation extends Enum<ImportRewrite.TypeLocation>
@NonNullByDefault
.
This enum is a superset of org.eclipse.jdt.annotation.DefaultLocation, and roughly corresponds
to the classification of type locations as introduced by JSR 308.Enum Constant and Description |
---|
ARRAY_CONTENTS
see org.eclipse.jdt.annotation.DefaultLocation.ARRAY_CONTENTS
|
CAST
The special value
CAST is used for casts. |
EXCEPTION
The special value
EXCEPTION is used for exception types in catch and throws declarations, which are
implicitly non-null. |
FIELD
see org.eclipse.jdt.annotation.DefaultLocation.FIELD
|
INSTANCEOF
The special value
INSTANCEOF is used for instanceof expressions. |
LOCAL_VARIABLE
The special value
LOCAL_VARIABLE is used for local variables: their nullness is determines by flow analysis,
so top level nullness annotations are usually not needed for local variables (unless their type is a free
type variable). |
NEW
The special value
NEW is used for new expressions (object allocations). |
OTHER
The special value
OTHER is used for locations where type annotations are illegal, like type literals
(X.class), annotations, or as scope for static field accesses. |
PARAMETER
see org.eclipse.jdt.annotation.DefaultLocation.PARAMETER
|
RECEIVER
The special value
RECEIVER is used for the receiver type in a method declaration or method reference. |
RETURN_TYPE
see org.eclipse.jdt.annotation.DefaultLocation.RETURN_TYPE
|
TYPE_ARGUMENT
see org.eclipse.jdt.annotation.DefaultLocation.TYPE_ARGUMENT
|
TYPE_BOUND
see org.eclipse.jdt.annotation.DefaultLocation.TYPE_BOUND
|
TYPE_PARAMETER
see org.eclipse.jdt.annotation.DefaultLocation.TYPE_PARAMETER
|
UNKNOWN
The special value
UNKNOWN is used for invocations that don't specify the intended type usage. |
Modifier and Type | Method and Description |
---|---|
static ImportRewrite.TypeLocation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ImportRewrite.TypeLocation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ImportRewrite.TypeLocation PARAMETER
public static final ImportRewrite.TypeLocation RETURN_TYPE
public static final ImportRewrite.TypeLocation FIELD
public static final ImportRewrite.TypeLocation TYPE_PARAMETER
public static final ImportRewrite.TypeLocation TYPE_BOUND
public static final ImportRewrite.TypeLocation TYPE_ARGUMENT
public static final ImportRewrite.TypeLocation ARRAY_CONTENTS
public static final ImportRewrite.TypeLocation LOCAL_VARIABLE
LOCAL_VARIABLE
is used for local variables: their nullness is determines by flow analysis,
so top level nullness annotations are usually not needed for local variables (unless their type is a free
type variable). Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.public static final ImportRewrite.TypeLocation CAST
CAST
is used for casts.
Casts are never affected by @NonNullByDefault
Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.public static final ImportRewrite.TypeLocation INSTANCEOF
INSTANCEOF
is used for instanceof
expressions.
Null annotations are not supported in this location.
Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.public static final ImportRewrite.TypeLocation NEW
NEW
is used for new
expressions (object allocations).
Null annotations are not supported in this location.
Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.public static final ImportRewrite.TypeLocation RECEIVER
RECEIVER
is used for the receiver type in a method declaration or method reference.
Null annotations are not supported in this location.
Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.public static final ImportRewrite.TypeLocation EXCEPTION
EXCEPTION
is used for exception types in catch and throws declarations, which are
implicitly non-null. Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.public static final ImportRewrite.TypeLocation OTHER
OTHER
is used for locations where type annotations are illegal, like type literals
(X.class), annotations, or as scope for static field accesses. Does not correspond to a value in
org.eclipse.jdt.annotation.DefaultLocation.public static final ImportRewrite.TypeLocation UNKNOWN
UNKNOWN
is used for invocations that don't specify the intended type usage. Does not
correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.public static ImportRewrite.TypeLocation[] values()
for (ImportRewrite.TypeLocation c : ImportRewrite.TypeLocation.values()) System.out.println(c);
public static ImportRewrite.TypeLocation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.