Class Java.TryStatement.LocalVariableDeclaratorResource
java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.TryStatement.Resource
org.codehaus.janino.Java.TryStatement.LocalVariableDeclaratorResource
- All Implemented Interfaces:
Java.Locatable
- Enclosing class:
Java.TryStatement
public static class Java.TryStatement.LocalVariableDeclaratorResource
extends Java.TryStatement.Resource
Representation of a JLS9 14.20.2 "local-variable-declarator resource" in a TRY-with-resources statement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Java.Modifier[]The resource variable modifiers (annotations and/or flags like FINAL).final Java.TypeThe declared type of the resource variable.final Java.VariableDeclaratorThe "variable declarator" that follows the type.Fields inherited from class Java.Located
NOWHERE -
Constructor Summary
ConstructorsConstructorDescriptionLocalVariableDeclaratorResource(Location location, Java.Modifier[] modifiers, Java.Type type, Java.VariableDeclarator variableDeclarator) -
Method Summary
Modifier and TypeMethodDescription<R, EX extends Throwable>
Raccept(Visitor.TryStatementResourceVisitor<R, EX> visitor) Invokes the "visit...()" method ofVisitor.TryStatementResourceVisitorfor the concreteJava.TryStatement.Resourcetype.voidSets the enclosing scope for this object and all subordinateJava.TryStatement.Resourceobjects.toString()Methods inherited from class Java.Located
getLocation, throwCompileException
-
Field Details
-
modifiers
The resource variable modifiers (annotations and/or flags like FINAL). -
type
The declared type of the resource variable. -
variableDeclarator
The "variable declarator" that follows the type.
-
-
Constructor Details
-
LocalVariableDeclaratorResource
public LocalVariableDeclaratorResource(Location location, Java.Modifier[] modifiers, Java.Type type, Java.VariableDeclarator variableDeclarator) - Parameters:
modifiers- Onlyfinalallowed
-
-
Method Details
-
setEnclosingTryStatement
Description copied from class:Java.TryStatement.ResourceSets the enclosing scope for this object and all subordinateJava.TryStatement.Resourceobjects.- Specified by:
setEnclosingTryStatementin classJava.TryStatement.Resource
-
accept
@Nullable public <R, EX extends Throwable> R accept(Visitor.TryStatementResourceVisitor<R, EX> visitor) throws EXDescription copied from class:Java.TryStatement.ResourceInvokes the "visit...()" method ofVisitor.TryStatementResourceVisitorfor the concreteJava.TryStatement.Resourcetype.- Specified by:
acceptin classJava.TryStatement.Resource- Throws:
EX
-
toString
-