Top Description Inners Fields Constructors Methods
javassist.bytecode

public Class SignatureAttribute

extends AttributeInfo
Class Inheritance
Imports
java.io.DataInputStream, .IOException, java.util.ArrayList, .Arrays, .HashMap, .List, .Map, javassist.CtClass

Signature_attribute.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
private static class
public static class
SignatureAttribute.MethodSignature

Method type signature.

public static class
public abstract static class
SignatureAttribute.ObjectType

Class types, array types, and type variables.

public abstract static class
SignatureAttribute.Type

Primitive types and object types.

public static class
public static class
SignatureAttribute.TypeParameter

Formal type parameters.

public static class

Field Summary

Modifier and TypeField and Description
public static final String
tag

The name of this attribute "Signature".

Inherited from javassist.bytecode.AttributeInfo:
constPoolinfoname

Constructor Summary

AccessConstructor and Description
pack-priv
public
SignatureAttribute(ConstPool
a constant pool table.
cp
,
String
the signature represented by this attribute.
signature
)

Constructs a Signature attribute.

Method Summary

Modifier and TypeMethod and Description
public AttributeInfo
copy(ConstPool
the constant pool table used by the new copy.
newCp
,
Map<String, String>
pairs of replaced and substituted class names.
classnames
)

Overrides javassist.bytecode.AttributeInfo.copy.

Makes a copy.

private static BadBytecode
public String
getSignature()

Returns the generic signature indicated by signature_index.

private static boolean
isNamePart(int c)

private static boolean
makeNewClassName(String desc, Map<String, String> map, String name, String newname, StringBuilder newdesc, int head, int j, ArrayList<StringBuilder> nameBufs, ArrayList<StringBuilder> genericParamBufs)

private static SignatureAttribute.ObjectType
private static int
parseClassName(ArrayList<StringBuilder> nameBufs, ArrayList<StringBuilder> genericParamBufs, String desc, int j)

private static SignatureAttribute.ClassType
private static SignatureAttribute.ClassType
private static SignatureAttribute.MethodSignature
private static SignatureAttribute.ObjectType
parseObjectType(String sig, SignatureAttribute.Cursor c, boolean dontThrow)

private static SignatureAttribute.ClassSignature
private static SignatureAttribute.Type
private static SignatureAttribute.TypeArgument[]
private static SignatureAttribute.TypeParameter[]
pack-priv void
pack-priv void
pack-priv static String
renameClass(String desc, String oldname, String newname)

pack-priv static String
private static boolean
replaceTypeArguments(String desc, Map<String, String> map, StringBuilder newdesc, int head, int j, ArrayList<StringBuilder> nameBufs, ArrayList<StringBuilder> genericParamBufs)

public void
setSignature(String
new signature.
sig
)

Sets signature_index to the index of the given generic signature, which is added to a constant pool.

public static SignatureAttribute.ClassSignature

Returns:

a tree-like data structure representing a class signature. It provides convenient accessor methods.
toClassSignature
(String
the signature obtained from the SignatureAttribute of a ClassFile.
sig
)

Parses the given signature string as a class signature.

public static SignatureAttribute.ObjectType

Returns:

the field type signature.
toFieldSignature
(String
the signature string obtained from the SignatureAttribute of a FieldInfo.
sig
)

Parses the given signature string as a field type signature.

public static SignatureAttribute.MethodSignature

Returns:

@return a tree-like data structure representing a method signature. It provides convenient accessor methods.
toMethodSignature
(String
the signature obtained from the SignatureAttribute of a MethodInfo.
sig
)

Parses the given signature string as a method type signature.

public static SignatureAttribute.Type
toTypeSignature(String sig)

Parses the given signature string as a type signature.

Inherited from javassist.bytecode.AttributeInfo:
copyAllgetgetConstPoolgetLengthgetNamegetRefClassesgetRefClasseslengthlookupreadremoverenameClassrenameClasssetwritewriteAll