Interface SignatureAttribute
- All Superinterfaces:
Attribute<SignatureAttribute>, ClassElement, ClassFileElement, FieldElement, MethodElement
public sealed interface SignatureAttribute
extends Attribute<SignatureAttribute>, ClassElement, MethodElement, FieldElement
Models the
Signature
attribute (JVMS 4.7.9), which
can appear on classes, methods, or fields. Delivered as a
ClassElement
, FieldElement
, or
MethodElement
when traversing
the corresponding model type.
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.
The attribute was introduced in the Java SE Platform version 5.0.
- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptiondefault ClassSignature
Parse the signature as a class signature.default MethodSignature
Parse the signature as a method signature.default Signature
Parse the signature as a type signature.static SignatureAttribute
of
(ClassSignature classSignature) Returns aSignature
attribute for a class.static SignatureAttribute
Returns aSignature
attribute.static SignatureAttribute
of
(MethodSignature methodSignature) Returns aSignature
attribute for a method.static SignatureAttribute
Returns aSignature
attribute.Returns the signature for the class, method, or field.Methods declared in interface Attribute
attributeMapper, attributeName
-
Method Details
-
signature
Utf8Entry signature()Returns the signature for the class, method, or field.- Returns:
- the signature for the class, method, or field
-
asClassSignature
Parse the signature as a class signature.- Returns:
- the class signature
-
asMethodSignature
Parse the signature as a method signature.- Returns:
- the method signature
-
asTypeSignature
Parse the signature as a type signature.- Returns:
- the type signature
-
of
Returns aSignature
attribute for a class.- Parameters:
classSignature
- the signature- Returns:
- a
Signature
attribute for a class
-
of
Returns aSignature
attribute for a method.- Parameters:
methodSignature
- the signature- Returns:
- a
Signature
attribute for a method
-
of
Returns aSignature
attribute.- Parameters:
signature
- the signature- Returns:
- a
Signature
attribute
-
of
Returns aSignature
attribute.- Parameters:
signature
- the signature- Returns:
- a
Signature
attribute
-