Interface ExceptionsAttribute
- All Superinterfaces:
Attribute<ExceptionsAttribute>,ClassFileElement,MethodElement
Models the
Exceptions attribute (JVMS 4.7.5), 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:
- 24
-
Method Summary
Modifier and TypeMethodDescriptionReturns the exceptions declared to be thrown by this method.static ExceptionsAttributeof(ClassEntry... exceptions) Returns anExceptionsattribute.static ExceptionsAttributeof(List<ClassEntry> exceptions) Returns anExceptionsattribute.static ExceptionsAttributeReturns anExceptionsattribute.static ExceptionsAttributeReturns anExceptionsattribute.Methods declared in interface java.lang.classfile.Attribute
attributeMapper, attributeName
-
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
-