Class SourceFileAttribute

  • All Implemented Interfaces:
    Printable

    public class SourceFileAttribute
    extends Attribute
    SourceFile attribute.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME
      The SourceFile attribute name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getValue()
      Gets the source file name stored via this attribute.
      void print​(ClassPrinter out, ClassContext context)
      Prints this instance.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • NAME

        public static final java.lang.String NAME
        The SourceFile attribute name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SourceFileAttribute

        public SourceFileAttribute​(ClassInfo classInfo,
                                   int sourceFileIndex)
        Constructs a new SourceFileAttribute instance.
        Parameters:
        classInfo - the ClassInfo instance this attribute is part of.
        sourceFileIndex - the source file name index.
    • Method Detail

      • getValue

        public java.lang.String getValue()
                                  throws java.io.IOException
        Gets the source file name stored via this attribute.
        Returns:
        the source file name stored via this attribute.
        Throws:
        java.io.IOException - if the attribute cannot be resolved.
      • print

        public void print​(ClassPrinter out,
                          ClassContext context)
                   throws java.io.IOException
        Description copied from interface: Printable
        Prints this instance.
        Parameters:
        out - the ClassPrinter instance to print to.
        context - the context of this print invocation.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object