public interface Location
Modifier and Type | Method and Description |
---|---|
String |
getClassName()
The fully-qualified class name in which the use happened,
for example "abc.def.Ghi"
|
ClassLoader |
getDependencyClassLoader()
AccessRestriction implementations can use this classloader
to access the classes referenced by classes being inspected. |
int |
getLineNumber()
The line number in the source file where the use happened.
|
String |
getMethodDescriptor()
This is the encoded method signature like "(II)Z"
in which the use happened.
|
String |
getMethodName()
If the use happened in the byte code instruction,
method name that the use occurred in.
|
String |
toString()
Obtains a human readable description of the location.
|
String getClassName()
String getMethodName()
For example "getAbc"
String getMethodDescriptor()
getMethodName()
to disambiguate overload.int getLineNumber()
String toString()
ClassLoader getDependencyClassLoader()
AccessRestriction
implementations can use this classloader
to access the classes referenced by classes being inspected.
Loading a class has a side effect, so it's generally not recommended
to do so, but the caller can use ClassLoader.getResource(String)
and parse the class files via libraries like ASM to define more elaborate
access restrictions.
Copyright © 2013. All Rights Reserved.