- All Superinterfaces:
Attribute<ExceptionsAttribute>,ClassFileElement,MethodElement,WritableElement<ExceptionsAttribute>
- All Known Implementing Classes:
BoundAttribute.BoundExceptionsAttribute,UnboundAttribute.UnboundExceptionsAttribute
public sealed interface ExceptionsAttribute
extends Attribute<ExceptionsAttribute>, MethodElement
permits BoundAttribute.BoundExceptionsAttribute, UnboundAttribute.UnboundExceptionsAttribute
Models the
Exceptions attribute , which can appear on
methods, and records the exceptions declared to be thrown by this method.
Delivered as a MethodElement when traversing the elements of a
MethodModel.
The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionReturns the exceptions declared to be thrown by this method.static ExceptionsAttributeof(List<ClassEntry> exceptions) Returns anExceptionsattribute.static ExceptionsAttributeof(ClassEntry... exceptions) Returns anExceptionsattribute.static ExceptionsAttributeReturns anExceptionsattribute.static ExceptionsAttributeReturns anExceptionsattribute.Methods inherited from interface org.glavo.classfile.Attribute
attributeMapper, attributeNameMethods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
Method Details
-
exceptions
List<ClassEntry> exceptions()Returns the exceptions declared to be thrown by this method.- Returns:
- the exceptions declared to be thrown by this method
-
of
Returns anExceptionsattribute.- Parameters:
exceptions- the checked exceptions that may be thrown from this method- Returns:
- an
Exceptionsattribute
-
of
Returns anExceptionsattribute.- Parameters:
exceptions- the checked exceptions that may be thrown from this method- Returns:
- an
Exceptionsattribute
-
ofSymbols
Returns anExceptionsattribute.- Parameters:
exceptions- the checked exceptions that may be thrown from this method- Returns:
- an
Exceptionsattribute
-
ofSymbols
Returns anExceptionsattribute.- Parameters:
exceptions- the checked exceptions that may be thrown from this method- Returns:
- an
Exceptionsattribute
-