public interface Code
Sources.
Contains bytecode and class names, as well as information related to the originating sources.
| Modifier and Type | Method and Description |
|---|---|
Bytecode |
getBytecode(String className)
gets the bytecode for the given class name.
|
Set<String> |
getClassNames(Source source)
gets all class names of the given source.
|
Set<String> |
getClassNameSet()
gets the set of all class names for which bytecode is in this code.
|
long |
getLastModifiedAtCompileTime(Source source)
gets the last modified at compile time of the given source.
|
String |
getMainClassName(Source source)
gets the main class name of the given source.
|
Set<Source> |
getSourceSet()
gets the set of all sources which had been compiled to this code.
|
String |
getSourcesName()
gets the name of the originating
Sources instance,
or a similar name that can help a human reader to identify
the originating sources. |
boolean |
isForSource(Source source)
returns true if the given source is for this code,
i.e. had been part of the sources compiled to this code.
|
String |
toString()
returns a string suitable for logging.
|
String getSourcesName()
Sources instance,
or a similar name that can help a human reader to identify
the originating sources.boolean isForSource(Source source)
source - sourceNullPointerException - if the given source is nullString getMainClassName(Source source)
source - sourceNullPointerException - if the given source is nullIllegalArgumentException - if the given source is not for this codeSet<String> getClassNames(Source source)
source - sourceNullPointerException - if the given source is nullIllegalArgumentException - if the given source is not for this codelong getLastModifiedAtCompileTime(Source source)
source - sourceNullPointerException - if the given source is nullIllegalArgumentException - if the given source is not for this codeSet<Source> getSourceSet()
Note that if code is not in memory, this operation may be slow or expensive in terms of resources.
Bytecode getBytecode(String className)
className - class nameNullPointerException - if the given class name is nullSet<String> getClassNameSet()
Note that if code is not in memory, this operation may be slow or expensive in terms of resources.