Package org.codehaus.janino

# Class Java.UsesModuleDirective

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

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

Enclosing class:
  `Java`

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

## Field Summary

Fields
Modifier and Type
Field
Description
`final String[]`
`typeName`
The "service" for which the current module may discover providers via `ServiceLoader`.

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

`NOWHERE`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`UsesModuleDirective(Location location, String[] typeName)`

## 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

### typeName

public final String[] typeName
The "service" for which the current module may discover providers via `ServiceLoader`. See JLS9 7.7.3.

## Constructor Details

### UsesModuleDirective

protected UsesModuleDirective(Location location, String[] typeName)

## 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`