Package org.revapi.java.spi
Enum UseSite.Type
- java.lang.Object
-
- java.lang.Enum<UseSite.Type>
-
- org.revapi.java.spi.UseSite.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<UseSite.Type>
,org.revapi.Reference.Type<JavaElement>
- Enclosing class:
- UseSite
public static enum UseSite.Type extends Enum<UseSite.Type> implements org.revapi.Reference.Type<JavaElement>
The way the used class is used by the use site.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANNOTATES
The used class annotates the use site.CONTAINS
The used class contains the use site (inner class).HAS_TYPE
The use site (field) has the type of the used class.IS_IMPLEMENTED
The used class is implemented by the use site (class).IS_INHERITED
The used class is inherited by the use site (class).IS_THROWN
The use site (method) throws exceptions of the type of the used class.PARAMETER_TYPE
One of the parameters of the use site (method) has the type of the used class.RETURN_TYPE
The use site (method) returns instances of the used class.TYPE_PARAMETER_OR_BOUND
The used class is used as a type parameter or a bound of a type variable or wildcard on the use site (which can be a class, field, method or a method parameter).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
boolean
isMovingToApi()
Consider usingUseSite.isMovingToApi()
, if possible.static UseSite.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static UseSite.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ANNOTATES
public static final UseSite.Type ANNOTATES
The used class annotates the use site.
-
IS_INHERITED
public static final UseSite.Type IS_INHERITED
The used class is inherited by the use site (class).
-
IS_IMPLEMENTED
public static final UseSite.Type IS_IMPLEMENTED
The used class is implemented by the use site (class).
-
HAS_TYPE
public static final UseSite.Type HAS_TYPE
The use site (field) has the type of the used class.
-
RETURN_TYPE
public static final UseSite.Type RETURN_TYPE
The use site (method) returns instances of the used class.
-
PARAMETER_TYPE
public static final UseSite.Type PARAMETER_TYPE
One of the parameters of the use site (method) has the type of the used class.
-
IS_THROWN
public static final UseSite.Type IS_THROWN
The use site (method) throws exceptions of the type of the used class.
-
CONTAINS
public static final UseSite.Type CONTAINS
The used class contains the use site (inner class).
-
TYPE_PARAMETER_OR_BOUND
public static final UseSite.Type TYPE_PARAMETER_OR_BOUND
The used class is used as a type parameter or a bound of a type variable or wildcard on the use site (which can be a class, field, method or a method parameter).
-
-
Method Detail
-
values
public static UseSite.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (UseSite.Type c : UseSite.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UseSite.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isMovingToApi
public boolean isMovingToApi()
Consider usingUseSite.isMovingToApi()
, if possible.- Returns:
- true if this type of use makes the used type part of the API even if it wasn't originally part of it.
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.revapi.Reference.Type<JavaElement>
-
-