300 * @return the module that is required 301 */ 302 ModuleElement getDependency(); 303 } 304 305 /** 306 * An exported package of a module. 307 * @since 9 308 * @spec JPMS 309 */ 310 interface ExportsDirective extends Directive { 311 312 /** 313 * Returns the package being exported. 314 * @return the package being exported 315 */ 316 PackageElement getPackage(); 317 318 /** 319 * Returns the specific modules to which the package is being exported, 320 * or null, if the package is exported to all modules which 321 * have readability to this module. 322 * @return the specific modules to which the package is being exported 323 */ 324 List<? extends ModuleElement> getTargetModules(); 325 } 326 327 /** 328 * An opened package of a module. 329 * @since 9 330 * @spec JPMS 331 */ 332 interface OpensDirective extends Directive { 333 334 /** 335 * Returns the package being opened. 336 * @return the package being opened 337 */ 338 PackageElement getPackage(); 339 340 /** 341 * Returns the specific modules to which the package is being open 342 * or null, if the package is open all modules which 343 * have readability to this module. 344 * @return the specific modules to which the package is being opened 345 */ 346 List<? extends ModuleElement> getTargetModules(); 347 } 348 349 /** 350 * An implementation of a service provided by a module. 351 * @since 9 352 * @spec JPMS 353 */ 354 interface ProvidesDirective extends Directive { 355 /** 356 * Returns the service being provided. 357 * @return the service being provided 358 */ 359 TypeElement getService(); 360 361 /** 362 * Returns the implementations of the service being provided. | 300 * @return the module that is required 301 */ 302 ModuleElement getDependency(); 303 } 304 305 /** 306 * An exported package of a module. 307 * @since 9 308 * @spec JPMS 309 */ 310 interface ExportsDirective extends Directive { 311 312 /** 313 * Returns the package being exported. 314 * @return the package being exported 315 */ 316 PackageElement getPackage(); 317 318 /** 319 * Returns the specific modules to which the package is being exported, 320 * or {@code null}, if the package is exported to all modules which 321 * have readability to this module. 322 * @return the specific modules to which the package is being exported 323 */ 324 List<? extends ModuleElement> getTargetModules(); 325 } 326 327 /** 328 * An opened package of a module. 329 * @since 9 330 * @spec JPMS 331 */ 332 interface OpensDirective extends Directive { 333 334 /** 335 * Returns the package being opened. 336 * @return the package being opened 337 */ 338 PackageElement getPackage(); 339 340 /** 341 * Returns the specific modules to which the package is being open 342 * or {@code null}, if the package is open all modules which 343 * have readability to this module. 344 * @return the specific modules to which the package is being opened 345 */ 346 List<? extends ModuleElement> getTargetModules(); 347 } 348 349 /** 350 * An implementation of a service provided by a module. 351 * @since 9 352 * @spec JPMS 353 */ 354 interface ProvidesDirective extends Directive { 355 /** 356 * Returns the service being provided. 357 * @return the service being provided 358 */ 359 TypeElement getService(); 360 361 /** 362 * Returns the implementations of the service being provided. |