Package org.codehaus.janino

# Class Java.OpensModuleDirective

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

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

Enclosing class:
  `Java`

public static final class Java.OpensModuleDirective extends Java.Located implements Java.ModuleDirective
Representation of a (Java 9+) "opens directive", as explained in JLS9 7.7.2.

## Field Summary

Fields
Modifier and Type
Field
Description
`final String[]`
`packageName`
The name of a package to be opened by this module, see JLS9 7.7.2.
`final String[][]`
`toModuleNames`
The names of the modules for which the public and protected types in this package, and their public and protected members, are accessible.

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

`NOWHERE`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`OpensModuleDirective(Location location, String[] packageName, String[][] toModuleNames)`

## Method Summary

Modifier and Type
Method
Description
`<R, EX extends Throwable>
R`
`accept(Visitor.ModuleDirectiveVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.ModuleDirectiveVisitor` for the concrete `Java.ModuleDirective` type.

### 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, toString, wait, wait, wait`

## Field Details

### packageName

public final String[] packageName
The name of a package to be opened by this module, see JLS9 7.7.2.

### toModuleNames

@Nullable public final String[][] toModuleNames
The names of the modules for which the public and protected types in this package, and their public and protected members, are accessible. Iff `null`, then this directive is "unqualified", i.e. it has no "`to`" clause

## Constructor Details

### OpensModuleDirective

protected OpensModuleDirective(Location location, String[] packageName, @Nullable String[][] toModuleNames)

## Method Details

### accept

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

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