APIdia Launch Partner
Top Description Fields Constructors Methods
javax.lang.model.element

public Class UnknownDirectiveException

extends UnknownEntityException
Class Inheritance
Imports
java.io.Serial, javax.lang.model.UnknownEntityException

Indicates that an unknown kind of module directive was encountered. This can occur if the language evolves and new kinds of directives are added to the Directive hierarchy. May be thrown by a directive visitor to indicate that the visitor was created for a prior version of the language.
Since
9
See Also
ModuleElement.DirectiveVisitor#visitUnknown

Field Summary

Modifier and TypeField and Description
private final transient ModuleElement.Directive
private final transient Object
private static final long

Constructor Summary

AccessConstructor and Description
public
UnknownDirectiveException(ModuleElement.Directive
the unknown directive, may be null
d
,
Object
an additional parameter, may be null
p
)

Creates a new UnknownElementException.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the additional argument, or null if unavailable
getArgument
()

Returns the additional argument.

public ModuleElement.Directive

Returns:

the unknown directive, or null if unavailable
getUnknownDirective
()

Returns the unknown directive.

Field Detail

directiveback to summary
private final transient ModuleElement.Directive directive
parameterback to summary
private final transient Object parameter
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.lang.model.UnknownEntityException.serialVersionUID.

Annotations
@Serial

Constructor Detail

UnknownDirectiveExceptionback to summary
public UnknownDirectiveException(ModuleElement.Directive d, Object p)

Creates a new UnknownElementException. The p parameter may be used to pass in an additional argument with information about the context in which the unknown directive was encountered; for example, the visit methods of DirectiveVisitor may pass in their additional parameter.

Parameters
d:ModuleElement.Directive

the unknown directive, may be null

p:Object

an additional parameter, may be null

Method Detail

getArgumentback to summary
public Object getArgument()

Returns the additional argument.

Returns:Object

the additional argument, or null if unavailable

getUnknownDirectiveback to summary
public ModuleElement.Directive getUnknownDirective()

Returns the unknown directive. The value may be unavailable if this exception has been serialized and then read back in.

Returns:ModuleElement.Directive

the unknown directive, or null if unavailable