Class SourceFileAttribute

java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.SourceFileAttribute

public class SourceFileAttribute extends AttributeInfo
SourceFile_attribute.
  • Field Details

  • Constructor Details

    • SourceFileAttribute

      public SourceFileAttribute(ConstPool cp, String filename)
      Constructs a SourceFile attribute.
      Parameters:
      cp - a constant pool table.
      filename - the name of the source file.
  • Method Details

    • getFileName

      public String getFileName()
      Returns the file name indicated by sourcefile_index.
    • copy

      public AttributeInfo copy(ConstPool newCp, Map<String,String> classnames)
      Makes a copy. Class names are replaced according to the given Map object.
      Overrides:
      copy in class AttributeInfo
      Parameters:
      newCp - the constant pool table used by the new copy.
      classnames - pairs of replaced and substituted class names.