Top Description Fields Constructors Methods
javassist.bytecode

public Class SourceFileAttribute

extends AttributeInfo
Class Inheritance
Imports
java.io.DataInputStream, .IOException, java.util.Map

SourceFile_attribute.

Field Summary

Modifier and TypeField and Description
public static final String
tag

The name of this attribute "SourceFile".

Inherited from javassist.bytecode.AttributeInfo:
constPoolinfoname

Constructor Summary

AccessConstructor and Description
pack-priv
public
SourceFileAttribute(ConstPool
a constant pool table.
cp
,
String
the name of the source file.
filename
)

Constructs a SourceFile 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.

public String
getFileName()

Returns the file name indicated by sourcefile_index.

Inherited from javassist.bytecode.AttributeInfo:
copyAllgetgetConstPoolgetLengthgetNamegetRefClassesgetRefClasseslengthlookupreadremoverenameClassrenameClassrenameClassrenameClasssetwritewriteAll

Field Detail

tagback to summary
public static final String tag

The name of this attribute "SourceFile".

Constructor Detail

SourceFileAttributeback to summary
pack-priv SourceFileAttribute(ConstPool cp, int n, DataInputStream in) throws IOException
SourceFileAttributeback to summary
public SourceFileAttribute(ConstPool cp, String filename)

Constructs a SourceFile attribute.

Parameters
cp:ConstPool

a constant pool table.

filename:String

the name of the source file.

Method Detail

copyback to summary
public AttributeInfo copy(ConstPool newCp, Map<String, String> classnames)

Overrides javassist.bytecode.AttributeInfo.copy.

Makes a copy. Class names are replaced according to the given Map object.

Parameters
newCp:ConstPool

the constant pool table used by the new copy.

classnames:Map<String, String>

pairs of replaced and substituted class names.

Annotations
@Override
getFileNameback to summary
public String getFileName()

Returns the file name indicated by sourcefile_index.