| Constructor and Description |
|---|
DefaultCode(String sourcesName,
Map<Source,CompiledSourceInfo> compiledSourceInfoMap,
Map<String,Bytecode> bytecodeMap)
constructor (typically called by the compiler).
|
| 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.
|
public DefaultCode(String sourcesName, Map<Source,CompiledSourceInfo> compiledSourceInfoMap, Map<String,Bytecode> bytecodeMap)
sourcesName - the name of the originating Sources instancecompiledSourceInfoMap - the map of originating Source to CompiledSourceInfobytecodeMap - the map of class name to BytecodeNullPointerException - if any argument is nullpublic String getSourcesName()
CodeSources instance,
or a similar name that can help a human reader to identify
the originating sources.getSourcesName in interface Codepublic boolean isForSource(Source source)
CodeisForSource in interface Codesource - sourcepublic String getMainClassName(Source source)
CodegetMainClassName in interface Codesource - sourcepublic Set<String> getClassNames(Source source)
CodegetClassNames in interface Codesource - sourcepublic long getLastModifiedAtCompileTime(Source source)
CodegetLastModifiedAtCompileTime in interface Codesource - sourcepublic Set<Source> getSourceSet()
CodeNote that if code is not in memory, this operation may be slow or expensive in terms of resources.
getSourceSet in interface Codepublic Bytecode getBytecode(String className)
CodegetBytecode in interface CodeclassName - class namepublic Set<String> getClassNameSet()
CodeNote that if code is not in memory, this operation may be slow or expensive in terms of resources.
getClassNameSet in interface Code