- All Superinterfaces:
Attribute<SignatureAttribute>,ClassElement,ClassFileElement,FieldElement,MethodElement,WritableElement<SignatureAttribute>
- All Known Implementing Classes:
BoundAttribute.BoundSignatureAttribute,UnboundAttribute.UnboundSignatureAttribute
public sealed interface SignatureAttribute
extends Attribute<SignatureAttribute>, ClassElement, MethodElement, FieldElement
permits BoundAttribute.BoundSignatureAttribute, UnboundAttribute.UnboundSignatureAttribute
Models the
Signature attribute , 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:
- 22
-
Method Summary
Modifier and TypeMethodDescriptiondefault ClassSignatureParse the signature as a class signature.default MethodSignatureParse the signature as a method signature.default SignatureParse the signature as a type signature.static SignatureAttributeof(ClassSignature classSignature) Returns aSignatureattribute for a class.static SignatureAttributeReturns aSignatureattribute.static SignatureAttributeof(MethodSignature methodSignature) Returns aSignatureattribute for a method.static SignatureAttributeReturns aSignatureattribute.Returns the signature for the class, method, or field.Methods inherited from interface org.glavo.classfile.Attribute
attributeMapper, attributeNameMethods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
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 aSignatureattribute for a class.- Parameters:
classSignature- the signature- Returns:
- a
Signatureattribute for a class
-
of
Returns aSignatureattribute for a method.- Parameters:
methodSignature- the signature- Returns:
- a
Signatureattribute for a method
-
of
Returns aSignatureattribute.- Parameters:
signature- the signature- Returns:
- a
Signatureattribute
-
of
Returns aSignatureattribute.- Parameters:
signature- the signature- Returns:
- a
Signatureattribute
-