Package org.kohsuke.accmod.impl
Interface Location
-
public interface LocationIndicates the location that the use occurred.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetClassName()The fully-qualified class name in which the use happened, for example "abc.def.Ghi"ClassLoadergetDependencyClassLoader()AccessRestrictionimplementations can use this classloader to access the classes referenced by classes being inspected.intgetLineNumber()The line number in the source file where the use happened.StringgetMethodDescriptor()This is the encoded method signature like "(II)Z" in which the use happened.StringgetMethodName()If the use happened in the byte code instruction, method name that the use occurred in.StringgetProperty(String key)Loads a configuration setting from the environment, such as when configured by a Maven plugin.StringtoString()Obtains a human readable description of the location.
-
-
-
Method Detail
-
getClassName
String getClassName()
The fully-qualified class name in which the use happened, for example "abc.def.Ghi"
-
getMethodName
String getMethodName()
If the use happened in the byte code instruction, method name that the use occurred in.For example "getAbc"
-
getMethodDescriptor
String getMethodDescriptor()
This is the encoded method signature like "(II)Z" in which the use happened. Used in conjunction withgetMethodName()to disambiguate overload.
-
getLineNumber
int getLineNumber()
The line number in the source file where the use happened.
-
toString
String toString()
Obtains a human readable description of the location. Useful for an error message.
-
getDependencyClassLoader
ClassLoader getDependencyClassLoader()
AccessRestrictionimplementations 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.
-
-