Package Summary Overview Summary |
R
- the return type of this visitor's methods. Use Void
for visitors that do not need to return results. P
- the type of the additional parameter to this visitor's methods. Use Void
for visitors that do not need an additional parameter. public static interface ModuleElement.DirectiveVisitor<R,P>
accept
method, the visitXyz
method applicable to that directive is invoked. Classes implementing this interface may or may not throw a NullPointerException
if the additional parameter p
is null
; see documentation of the implementing class for details.
WARNING: It is possible that methods will be added to this interface to accommodate new, currently unknown, language structures added to future versions of the Java™ programming language. Methods to accommodate new language constructs will be added in a source compatible way using default methods .
Modifier and Type | Method | Description |
---|---|---|
default R | visit(ModuleElement.Directive d) |
Visits any directive as if by passing itself to that directive's
accept method and passing null for the additional parameter. |
default R | visit(ModuleElement.Directive d, P p) |
Visits any directive as if by passing itself to that directive's
accept method. |
R | visitExports(ModuleElement.ExportsDirective d, P p) |
Visits an
exports directive. |
R | visitOpens(ModuleElement.OpensDirective d, P p) |
Visits an
opens directive. |
R | visitProvides(ModuleElement.ProvidesDirective d, P p) |
Visits a
provides directive. |
R | visitRequires(ModuleElement.RequiresDirective d, P p) |
Visits a
requires directive. |
default R | visitUnknown(ModuleElement.Directive d, P p) |
Visits an unknown directive.
|
R | visitUses(ModuleElement.UsesDirective d, P p) |
Visits a
uses directive. |
default R visit(ModuleElement.Directive d)
accept
method and passing null
for the additional parameter. The invocation v.visit(d)
is equivalent to d.accept(v, null)
. visit(d, null)
d
- the directive to visit default R visit(ModuleElement.Directive d, P p)
accept
method. The invocation v.visit(d, p)
is equivalent to d.accept(v, p)
. d
- the directive to visit p
- a visitor-specified parameter R visitRequires(ModuleElement.RequiresDirective d, P p)
requires
directive. d
- the directive to visit p
- a visitor-specified parameter R visitExports(ModuleElement.ExportsDirective d, P p)
exports
directive. d
- the directive to visit p
- a visitor-specified parameter R visitOpens(ModuleElement.OpensDirective d, P p)
opens
directive. d
- the directive to visit p
- a visitor-specified parameter R visitUses(ModuleElement.UsesDirective d, P p)
uses
directive. d
- the directive to visit p
- a visitor-specified parameter R visitProvides(ModuleElement.ProvidesDirective d, P p)
provides
directive. d
- the directive to visit p
- a visitor-specified parameter default R visitUnknown(ModuleElement.Directive d, P p)
new UnknownDirectiveException(d, p)
. d
- the directive to visit p
- a visitor-specified parameter UnknownDirectiveException
- a visitor implementation may optionally throw this exception Copyright © 1993, 2017, Oracle and/or its affiliates · All rights reserved · License