Module de.carne.mcd.jvmdecoder
Class SourceFileAttribute
- java.lang.Object
-
- de.carne.mcd.jvmdecoder.classfile.ClassInfoElement
-
- de.carne.mcd.jvmdecoder.classfile.attribute.Attribute
-
- de.carne.mcd.jvmdecoder.classfile.attribute.SourceFileAttribute
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEThe SourceFile attribute name.-
Fields inherited from class de.carne.mcd.jvmdecoder.classfile.ClassInfoElement
classInfo
-
-
Constructor Summary
Constructors Constructor Description SourceFileAttribute(ClassInfo classInfo, int sourceFileIndex)Constructs a new SourceFileAttribute instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetValue()Gets the source file name stored via this attribute.voidprint(ClassPrinter out, ClassContext context)Prints this instance.java.lang.StringtoString()
-
-
-
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.IOExceptionGets 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:PrintablePrints 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:
toStringin classjava.lang.Object
-
-