- java.lang.Object
- 
- java.lang.Enum<Elements.Origin>
- 
- javax.lang.model.util.Elements.Origin
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<Elements.Origin>
 - Enclosing interface:
- Elements
 
 public static enum Elements.Origin extends Enum<Elements.Origin> 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. - Since:
- 9
- See The Java™ Language Specification:
- 13.1 The Form of a Binary
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description EXPLICITDescribes a construct explicitly declared in source code.MANDATEDA mandated construct is one that is not explicitly declared in the source code, but whose presence is mandated by the specification.SYNTHETICA synthetic construct is one that is neither implicitly nor explicitly declared in the source code.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDeclared()Returnstruefor values corresponding to constructs that are implicitly or explicitly declared,falseotherwise.static Elements.OriginvalueOf(String name)Returns the enum constant of this type with the specified name.static Elements.Origin[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
EXPLICITpublic static final Elements.Origin EXPLICIT Describes a construct explicitly declared in source code.
 - 
MANDATEDpublic static final Elements.Origin 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 type.- See The Java™ Language Specification:
- 8.8.9 Default Constructor, 8.9.3 Enum Members, 9.6.3 Repeatable Annotation Types, 9.7.5 Multiple Annotations of the Same Type
 
 - 
SYNTHETICpublic static final Elements.Origin 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 Detail- 
valuespublic static Elements.Origin[] 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 (Elements.Origin c : Elements.Origin.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static Elements.Origin 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 name
- NullPointerException- if the argument is null
 
 
- 
 
-