Package javassist.bytecode
Class SignatureAttribute
java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.SignatureAttribute
Signature_attribute.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classArray types.static classPrimitive types.static classClass signature.static classClass types.static classMethod type signature.static classNested class types.static classClass types, array types, and type variables.static classPrimitive types and object types.static classType argument.static classFormal type parameters.static classType variables. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSignatureAttribute(ConstPool cp, String signature) Constructs aSignatureattribute. -
Method Summary
Modifier and TypeMethodDescriptionMakes a copy.Returns the generic signature indicated bysignature_index.voidsetSignature(String sig) Setssignature_indexto the index of the given generic signature, which is added to a constant pool.toClassSignature(String sig) Parses the given signature string as a class signature.toFieldSignature(String sig) Parses the given signature string as a field type signature.toMethodSignature(String sig) Parses the given signature string as a method type signature.static SignatureAttribute.TypetoTypeSignature(String sig) Parses the given signature string as a type signature.Methods inherited from class javassist.bytecode.AttributeInfo
get, getConstPool, getName, length, set
-
Field Details
-
tag
The name of this attribute"Signature".- See Also:
-
-
Constructor Details
-
SignatureAttribute
Constructs aSignatureattribute.- Parameters:
cp- a constant pool table.signature- the signature represented by this attribute.
-
-
Method Details
-
getSignature
Returns the generic signature indicated bysignature_index. -
setSignature
Setssignature_indexto the index of the given generic signature, which is added to a constant pool.- Parameters:
sig- new signature.- Since:
- 3.11
-
copy
Makes a copy. Class names are replaced according to the givenMapobject.- Overrides:
copyin classAttributeInfo- Parameters:
newCp- the constant pool table used by the new copy.classnames- pairs of replaced and substituted class names.
-
toClassSignature
Parses the given signature string as a class signature.- Parameters:
sig- the signature obtained from theSignatureAttributeof aClassFile.- Returns:
- a tree-like data structure representing a class signature. It provides convenient accessor methods.
- Throws:
BadBytecode- thrown when a syntactical error is found.- Since:
- 3.5
- See Also:
-
toMethodSignature
Parses the given signature string as a method type signature.- Parameters:
sig- the signature obtained from theSignatureAttributeof aMethodInfo.- Returns:
- Throws:
BadBytecode- thrown when a syntactical error is found.- Since:
- 3.5
- See Also:
-
toFieldSignature
Parses the given signature string as a field type signature.- Parameters:
sig- the signature string obtained from theSignatureAttributeof aFieldInfo.- Returns:
- the field type signature.
- Throws:
BadBytecode- thrown when a syntactical error is found.- Since:
- 3.5
- See Also:
-
toTypeSignature
Parses the given signature string as a type signature. The type signature is either the field type signature or a base type descriptor includingvoidtype.- Throws:
BadBytecode- thrown when a syntactical error is found.- Since:
- 3.18
-