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

Fields
Modifier and Type
Field
Description
`final Java.ElementValue[]`
`elementValues`
The element values in the body of the array initializer.

### Fields inherited from class org.codehaus.janino.Java.Located

`NOWHERE`

## Constructor Summary

Constructors
Constructor
Description
`ElementValueArrayInitializer(Java.ElementValue[] elementValues, Location location)`

## Method Summary

Modifier and Type
Method
Description
`<R, EX extends Throwable>
R`
`accept(Visitor.ElementValueVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.ElementValueVisitor` for the concrete `Java.ElementValue` type.
`void`
`setEnclosingScope(Java.Scope scope)`
In most cases, the scope is the enclosing `Java.BlockStatement`, except for top-level class/interface annotation class-literal element-value-pairs, where the enclosing scope is the compilation unit.
`String`
`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

public final Java.ElementValue[] elementValues
The element values in the body of the array initializer.

## Constructor Details

### ElementValueArrayInitializer

public ElementValueArrayInitializer(Java.ElementValue[] elementValues, Location location)

## Method Details

### setEnclosingScope

public void setEnclosingScope(Java.Scope scope)
Description copied from interface: `Java.ElementValue`
In most cases, the scope is the enclosing `Java.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 interface `Java.ElementValue`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### accept

@Nullable public <R, EX extends Throwable> R accept(Visitor.ElementValueVisitor<R,EX> visitor) throws EX
Description copied from interface: `Java.ElementValue`
Invokes the "`visit...()`" method of `Visitor.ElementValueVisitor` for the concrete `Java.ElementValue` type.

Specified by:
  `accept` in interface `Java.ElementValue`
Throws:
  `EX`