Package org.codehaus.janino
Class Java.ElementValueArrayInitializer
java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.ElementValueArrayInitializer
- All Implemented Interfaces:
Java.ElementValue
,Java.Locatable
- Enclosing class:
- Java
public static final class Java.ElementValueArrayInitializer
extends Java.Located
implements Java.ElementValue
An element value in the form of an array initializer, e.g. "
SuppressWarnings({ "null", "unchecked"
})
".-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Java.ElementValue[]
The element values in the body of the array initializer.Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
-
Constructor Summary
ConstructorsConstructorDescriptionElementValueArrayInitializer
(Java.ElementValue[] elementValues, Location location) -
Method Summary
Modifier and TypeMethodDescription<R,
EX extends Throwable>
Raccept
(Visitor.ElementValueVisitor<R, EX> visitor) Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.void
setEnclosingScope
(Java.Scope scope) In most cases, the scope is the enclosingJava.BlockStatement
, except for top-level class/interface annotation class-literal element-value-pairs, where the enclosing scope is the compilation unit.toString()
Methods inherited from class org.codehaus.janino.Java.Located
getLocation, throwCompileException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.codehaus.janino.Java.Locatable
getLocation, throwCompileException
-
Field Details
-
elementValues
The element values in the body of the array initializer.
-
-
Constructor Details
-
ElementValueArrayInitializer
-
-
Method Details
-
setEnclosingScope
Description copied from interface:Java.ElementValue
In most cases, the scope is the enclosingJava.BlockStatement
, except for top-level class/interface annotation class-literal element-value-pairs, where the enclosing scope is the compilation unit.- Specified by:
setEnclosingScope
in interfaceJava.ElementValue
-
toString
-
accept
@Nullable public <R,EX extends Throwable> R accept(Visitor.ElementValueVisitor<R, EX> visitor) throws EXDescription copied from interface:Java.ElementValue
Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.- Specified by:
accept
in interfaceJava.ElementValue
- Throws:
EX extends Throwable
-