Package org.codehaus.janino

# Class Java.ArrayInitializer

java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.ArrayInitializer

All Implemented Interfaces:
  `Java.ArrayInitializerOrRvalue`, `Java.Locatable`

Enclosing class:
  `Java`

public static final class Java.ArrayInitializer extends Java.Located implements Java.ArrayInitializerOrRvalue
Representation of a JLS7 10.6 "array initializer".

Allocates an array and initializes its members with (not necessarily constant) values.

## Field Summary

Fields
Modifier and Type
Field
Description
`final Java.ArrayInitializerOrRvalue[]`
`values`
The values to assign to the array elements.

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

`NOWHERE`

## Constructor Summary

Constructors
Constructor
Description
`ArrayInitializer(Location location, Java.ArrayInitializerOrRvalue[] values)`

## Method Summary

Modifier and Type
Method
Description
`<R, EX extends Throwable>
R`
`accept(Visitor.ArrayInitializerOrRvalueVisitor<R,EX> aiorvv)`
`void`
`setEnclosingScope(Java.Scope s)`
Sets the immediately enclosing scope for this array initializer or rvalue.
`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

### values

public final Java.ArrayInitializerOrRvalue[] values
The values to assign to the array elements.

## Constructor Details

### ArrayInitializer

public ArrayInitializer(Location location, Java.ArrayInitializerOrRvalue[] values)

## Method Details

### setEnclosingScope

public void setEnclosingScope(Java.Scope s)
Description copied from interface: `Java.ArrayInitializerOrRvalue`
Sets the immediately enclosing scope for this array initializer or rvalue.

Specified by:
  `setEnclosingScope` in interface `Java.ArrayInitializerOrRvalue`

### accept

@Nullable public <R, EX extends Throwable> R accept(Visitor.ArrayInitializerOrRvalueVisitor<R,EX> aiorvv) throws EX

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

### toString

public String toString()

Overrides:
  `toString` in class `Object`