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

public Class UnknownElementException

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

Indicates that an unknown kind of element was encountered. This can occur if the language evolves and new kinds of elements are added to the Element hierarchy. May be thrown by an element visitor to indicate that the visitor was created for a prior version of the language.
Since
1.6
See Also
ElementVisitor#visitUnknown

Field Summary

Modifier and TypeField and Description
private transient Element
private transient Object
private static final long

Constructor Summary

AccessConstructor and Description
public
UnknownElementException(Element
the unknown element, may be null
e
,
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 Element

Returns:

the unknown element, or null if unavailable
getUnknownElement
()

Returns the unknown element.

Field Detail

elementback to summary
private transient Element element
parameterback to summary
private transient Object parameter
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.lang.model.UnknownEntityException.serialVersionUID.

Annotations
@Serial

Constructor Detail

UnknownElementExceptionback to summary
public UnknownElementException(Element e, 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 element was encountered; for example, the visit methods of ElementVisitor may pass in their additional parameter.

Parameters
e:Element

the unknown element, 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

getUnknownElementback to summary
public Element getUnknownElement()

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

Returns:Element

the unknown element, or null if unavailable