Package org.codehaus.janino

# 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

Fields
Modifier and Type
Field
Description
`final Java.Modifier[]`
`modifiers`
The resource variable modifiers (annotations and/or flags like FINAL).
`final Java.Type`
`type`
The declared type of the resource variable.
`final Java.VariableDeclarator`
`variableDeclarator`
The "variable declarator" that follows the type.

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

`NOWHERE`

## Constructor Summary

Constructors
Constructor
Description
`LocalVariableDeclaratorResource(Location location, Java.Modifier[] modifiers, Java.Type type, Java.VariableDeclarator variableDeclarator)`

## Method Summary

Modifier and Type
Method
Description
`<R, EX extends Throwable>
R`
`accept(Visitor.TryStatementResourceVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.TryStatementResourceVisitor` for the concrete `Java.TryStatement.Resource` type.
`void`
`setEnclosingTryStatement(Java.TryStatement ts)`
Sets the enclosing scope for this object and all subordinate `Java.TryStatement.Resource` objects.
`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`

## Field Details

### modifiers

public final Java.Modifier[] modifiers
The resource variable modifiers (annotations and/or flags like FINAL).

### type

public final Java.Type type
The declared type of the resource variable.

### variableDeclarator

public final Java.VariableDeclarator 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` - Only `final` allowed

## Method Details

### setEnclosingTryStatement

public void setEnclosingTryStatement(Java.TryStatement ts)
Description copied from class: `Java.TryStatement.Resource`
Sets the enclosing scope for this object and all subordinate `Java.TryStatement.Resource` objects.

Specified by:
  `setEnclosingTryStatement` in class `Java.TryStatement.Resource`

### accept

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

Specified by:
  `accept` in class `Java.TryStatement.Resource`
Throws:
  `EX`

### toString

public String toString()

Overrides:
  `toString` in class `Object`