Top Description Fields Constructors
java.lang.classfile.constantpool

public Class ConstantPoolException

extends IllegalArgumentException
Class Inheritance
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

Programs can only use ConstantPoolException when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

Thrown to indicate that requested entry cannot be obtained from the constant pool.
Since
22

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
ConstantPoolException()

Constructs a ConstantPoolException with no detail message.

public
ConstantPoolException(String
the detail message.
message
)

Constructs a ConstantPoolException with the specified detail message.

public
ConstantPoolException(Throwable
the cause (which is saved for later retrieval by the Throwable#getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
cause
)

Constructs a ConstantPoolException with the specified cause and a detail message of (cause==null ?

public
ConstantPoolException(String
the detail message (which is saved for later retrieval by the Throwable#getMessage() method).
message
,
Throwable
the cause (which is saved for later retrieval by the Throwable#getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
cause
)

Constructs a ConstantPoolException with the specified detail message and cause.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.IllegalArgumentException.serialVersionUID.

Annotations
@Serial

Constructor Detail

ConstantPoolExceptionback to summary
public ConstantPoolException()

Constructs a ConstantPoolException with no detail message.

ConstantPoolExceptionback to summary
public ConstantPoolException(String message)

Constructs a ConstantPoolException with the specified detail message.

Parameters
message:String

the detail message.

ConstantPoolExceptionback to summary
public ConstantPoolException(Throwable cause)

Constructs a ConstantPoolException with the specified cause and a detail message of (cause==null ? null : cause.toString()).

Parameters
cause:Throwable

the cause (which is saved for later retrieval by the Throwable#getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

ConstantPoolExceptionback to summary
public ConstantPoolException(String message, Throwable cause)

Constructs a ConstantPoolException with the specified detail message and cause.

Parameters
message:String

the detail message (which is saved for later retrieval by the Throwable#getMessage() method).

cause:Throwable

the cause (which is saved for later retrieval by the Throwable#getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)