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 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,EX extends java.lang.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.java.lang.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 Detail
-
elementValues
public final Java.ElementValue[] elementValues
The element values in the body of the array initializer.
-
-
Constructor Detail
-
ElementValueArrayInitializer
public ElementValueArrayInitializer(Java.ElementValue[] elementValues, Location location)
-
-
Method Detail
-
setEnclosingScope
public void setEnclosingScope(Java.Scope scope)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
accept
@Nullable public <R,EX extends java.lang.Throwable> R accept(Visitor.ElementValueVisitor<R,EX> visitor) throws EX extends java.lang.Throwable
Description 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 java.lang.Throwable
-
-