Enum-Klasse ImportRewrite.TypeLocation
java.lang.Object
java.lang.Enum<ImportRewrite.TypeLocation>
org.aspectj.org.eclipse.jdt.core.dom.rewrite.ImportRewrite.TypeLocation
- Alle implementierten Schnittstellen:
Serializable
,Comparable<ImportRewrite.TypeLocation>
,java.lang.constant.Constable
- Umschließende Klasse:
ImportRewrite
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
.
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.- Seit:
- 3.13
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum-Konstanten - Übersicht
Enum-KonstanteBeschreibungsee org.eclipse.jdt.annotation.DefaultLocation.ARRAY_CONTENTSThe special valueCAST
is used for casts.The special valueEXCEPTION
is used for exception types in catch and throws declarations, which are implicitly non-null.see org.eclipse.jdt.annotation.DefaultLocation.FIELDThe special valueINSTANCEOF
is used forinstanceof
expressions.The special valueLOCAL_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).The special valueNEW
is used fornew
expressions (object allocations).The special valueOTHER
is used for locations where type annotations are illegal, like type literals (X.class), annotations, or as scope for static field accesses.see org.eclipse.jdt.annotation.DefaultLocation.PARAMETERThe special valueRECEIVER
is used for the receiver type in a method declaration or method reference.see org.eclipse.jdt.annotation.DefaultLocation.RETURN_TYPEsee org.eclipse.jdt.annotation.DefaultLocation.TYPE_ARGUMENTsee org.eclipse.jdt.annotation.DefaultLocation.TYPE_BOUNDsee org.eclipse.jdt.annotation.DefaultLocation.TYPE_PARAMETERThe special valueUNKNOWN
is used for invocations that don't specify the intended type usage. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic ImportRewrite.TypeLocation
Gibt die Enum-Konstante dieser Klasse mit dem angegebenen Namen zurück.static ImportRewrite.TypeLocation[]
values()
Gibt ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration zurück.
-
Enum-Konstanten - Details
-
PARAMETER
see org.eclipse.jdt.annotation.DefaultLocation.PARAMETER- Seit:
- 3.13
-
RETURN_TYPE
see org.eclipse.jdt.annotation.DefaultLocation.RETURN_TYPE- Seit:
- 3.13
-
FIELD
see org.eclipse.jdt.annotation.DefaultLocation.FIELD- Seit:
- 3.13
-
TYPE_PARAMETER
see org.eclipse.jdt.annotation.DefaultLocation.TYPE_PARAMETER- Seit:
- 3.13
-
TYPE_BOUND
see org.eclipse.jdt.annotation.DefaultLocation.TYPE_BOUND- Seit:
- 3.13
-
TYPE_ARGUMENT
see org.eclipse.jdt.annotation.DefaultLocation.TYPE_ARGUMENT- Seit:
- 3.13
-
ARRAY_CONTENTS
see org.eclipse.jdt.annotation.DefaultLocation.ARRAY_CONTENTS- Seit:
- 3.13
-
LOCAL_VARIABLE
The special valueLOCAL_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.- Seit:
- 3.13
-
CAST
The special valueCAST
is used for casts. Casts are never affected by@NonNullByDefault
Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.- Seit:
- 3.13
-
INSTANCEOF
The special valueINSTANCEOF
is used forinstanceof
expressions. Null annotations are not supported in this location. Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.- Seit:
- 3.13
-
NEW
The special valueNEW
is used fornew
expressions (object allocations). Null annotations are not supported in this location. Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.- Seit:
- 3.13
-
RECEIVER
The special valueRECEIVER
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.- Seit:
- 3.13
-
EXCEPTION
The special valueEXCEPTION
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.- Seit:
- 3.13
-
OTHER
The special valueOTHER
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.- Seit:
- 3.13
-
UNKNOWN
The special valueUNKNOWN
is used for invocations that don't specify the intended type usage. Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.- Seit:
- 3.13
-
-
Methodendetails
-
values
Gibt ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration zurück.- Gibt zurück:
- ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration
-
valueOf
Gibt die Enum-Konstante dieser Klasse mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enum-Konstante in dieser Klasse deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)- Parameter:
name
- Name der zurückzugebenden Enumerationskonstante.- Gibt zurück:
- Enumerationskonstante mit dem angegebenen Namen
- Löst aus:
IllegalArgumentException
- wenn diese Enum-Klasse keine Konstante mit dem angegebenen Namen enthältNullPointerException
- wenn das Argument nicht angegeben wird
-