- All Implemented Interfaces:
Serializable
,Comparable<Elements.Origin>
,Constable
- Enclosing interface:
Elements
The origin of an element or other language model
item. The origin of an element or item models how a construct
in a program is declared in the source code, explicitly,
implicitly, etc.
Note that it is possible additional kinds of origin values will be added in future versions of the platform.
- See Java Language Specification:
-
13.1 The Form of a Binary
- Since:
- 9
-
Nested Class Summary
Nested classes/interfaces declared in class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDescribes a construct explicitly declared in source code.A mandated construct is one that is not explicitly declared in the source code, but whose presence is mandated by the specification.A synthetic construct is one that is neither implicitly nor explicitly declared in the source code. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
for values corresponding to constructs that are implicitly or explicitly declared,false
otherwise.static Elements.Origin
Returns the enum constant of this class with the specified name.static Elements.Origin[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXPLICIT
Describes a construct explicitly declared in source code. -
MANDATED
A mandated construct is one that is not explicitly declared in the source code, but whose presence is mandated by the specification. Such a construct is said to be implicitly declared. One example of a mandated element is a default constructor in a class that contains no explicit constructor declarations. Another example of a mandated construct is an implicitly declared container annotation used to hold multiple annotations of a repeatable annotation interface. -
SYNTHETIC
A synthetic construct is one that is neither implicitly nor explicitly declared in the source code. Such a construct is typically a translation artifact created by a compiler.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
isDeclared
-