javassist.bytecode

Class SignatureAttribute

public class SignatureAttribute extends AttributeInfo

Signature_attribute.
Nested Class Summary
static classSignatureAttribute.ArrayType
Array types.
static classSignatureAttribute.BaseType
Primitive types.
static classSignatureAttribute.ClassSignature
Class signature.
static classSignatureAttribute.ClassType
Class types.
static classSignatureAttribute.MethodSignature
Method type signature.
abstract static classSignatureAttribute.ObjectType
Class types, array types, and type variables.
abstract static classSignatureAttribute.Type
Primitive types and object types.
static classSignatureAttribute.TypeArgument
Type argument.
static classSignatureAttribute.TypeParameter
Formal type parameters.
static classSignatureAttribute.TypeVariable
Type variables.
Field Summary
static Stringtag
The name of this attribute "Signature".
Constructor Summary
SignatureAttribute(ConstPool cp, String signature)
Constructs a Signature attribute.
Method Summary
AttributeInfocopy(ConstPool newCp, Map classnames)
Makes a copy.
StringgetSignature()
Returns the signature indicated by signature_index.
static SignatureAttribute.ClassSignaturetoClassSignature(String sig)
Parses the given signature string as a class signature.
static SignatureAttribute.ObjectTypetoFieldSignature(String sig)
Parses the given signature string as a field type signature.
static SignatureAttribute.MethodSignaturetoMethodSignature(String sig)
Parses the given signature string as a method type signature.

Field Detail

tag

public static final String tag
The name of this attribute "Signature".

Constructor Detail

SignatureAttribute

public SignatureAttribute(ConstPool cp, String signature)
Constructs a Signature attribute.

Parameters: cp a constant pool table. signature the signature represented by this attribute.

Method Detail

copy

public AttributeInfo copy(ConstPool newCp, Map classnames)
Makes a copy. Class names are replaced according to the given Map object.

Parameters: newCp the constant pool table used by the new copy. classnames pairs of replaced and substituted class names.

getSignature

public String getSignature()
Returns the signature indicated by signature_index.

See Also: toClassSignature toMethodSignature

toClassSignature

public static SignatureAttribute.ClassSignature toClassSignature(String sig)
Parses the given signature string as a class signature.

Parameters: sig the signature.

Throws: BadBytecode thrown when a syntactical error is found.

Since: 3.5

toFieldSignature

public static SignatureAttribute.ObjectType toFieldSignature(String sig)
Parses the given signature string as a field type signature.

Parameters: sig the signature string.

Returns: the field type signature.

Throws: BadBytecode thrown when a syntactical error is found.

Since: 3.5

toMethodSignature

public static SignatureAttribute.MethodSignature toMethodSignature(String sig)
Parses the given signature string as a method type signature.

Parameters: sig the signature.

Throws: BadBytecode thrown when a syntactical error is found.

Since: 3.5

Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.