Package com.google.inject.internal.util
Class LineNumbers
java.lang.Object
com.google.inject.internal.util.LineNumbers
Looks up line numbers for classes and their members.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLineNumbers
(Class<?> type) Reads line number information from the given class, if available. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the first line number.getLineNumber
(Member member) Get the line number associated with the given member.Get the source file name as read from the bytecode.private String
-
Field Details
-
ASM_API_LEVEL
private static final int ASM_API_LEVEL- See Also:
-
type
-
lines
-
source
-
firstLine
private int firstLine
-
-
Constructor Details
-
LineNumbers
Reads line number information from the given class, if available.- Parameters:
type
- the class to read line number information from- Throws:
IOException
-
-
Method Details
-
getSource
Get the source file name as read from the bytecode.- Returns:
- the source file name if available, or null
-
getLineNumber
Get the line number associated with the given member.- Parameters:
member
- a field, constructor, or method belonging to the class used during construction- Returns:
- the wrapped line number, or null if not available
- Throws:
IllegalArgumentException
- if the member does not belong to the class used during construction
-
getFirstLine
public int getFirstLine()Gets the first line number. -
memberKey
-