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 visitdefault 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 visitp
- a visitor-specified parameterR visitRequires(ModuleElement.RequiresDirective d, P p)
requires
directive.d
- the directive to visitp
- a visitor-specified parameterR visitExports(ModuleElement.ExportsDirective d, P p)
exports
directive.d
- the directive to visitp
- a visitor-specified parameterR visitOpens(ModuleElement.OpensDirective d, P p)
opens
directive.d
- the directive to visitp
- a visitor-specified parameterR visitUses(ModuleElement.UsesDirective d, P p)
uses
directive.d
- the directive to visitp
- a visitor-specified parameterR visitProvides(ModuleElement.ProvidesDirective d, P p)
provides
directive.d
- the directive to visitp
- a visitor-specified parameterdefault R visitUnknown(ModuleElement.Directive d, P p)
new UnknownDirectiveException(d, p)
.d
- the directive to visitp
- a visitor-specified parameterUnknownDirectiveException
- a visitor implementation may optionally throw this exception Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps