Class Compiled
java.lang.Object
org.springframework.aot.test.generator.compile.Compiled
Fully compiled results provided from a 
TestCompiler.- Since:
- 6.0
- Author:
- Phillip Webb
- 
Method SummaryModifier and TypeMethodDescriptionReturn all compiled classes.Return the classloader containing the compiled content and access to the resources.<T> TgetInstance(Class<T> type) Return a new instance of a compiled class of the given type.<T> TgetInstance(Class<T> type, String className) Return an instance of a compiled class identified by its class name.Return the single resource file that was used when compiled.Return all resource files that were compiled.Return the single source file that was compiled.getSourceFile(String pattern) Return the single matching source file that was compiled.getSourceFileFromPackage(String packageName) Return the single source file that was compiled in the given package.Return all source files that were compiled.
- 
Method Details- 
getClassLoaderReturn the classloader containing the compiled content and access to the resources.- Returns:
- the classLoader
 
- 
getSourceFileReturn the single source file that was compiled.- Returns:
- the single source file
- Throws:
- IllegalStateException- if the compiler wasn't passed exactly one file
 
- 
getSourceFileReturn the single matching source file that was compiled.- Parameters:
- pattern- the pattern used to find the file
- Returns:
- the single source file
- Throws:
- IllegalStateException- if the compiler wasn't passed exactly one file
 
- 
getSourceFileFromPackageReturn the single source file that was compiled in the given package.- Parameters:
- packageName- the package name to check
- Returns:
- the single source file
- Throws:
- IllegalStateException- if the compiler wasn't passed exactly one file
 
- 
getSourceFilesReturn all source files that were compiled.- Returns:
- the source files used by the compiler
 
- 
getResourceFileReturn the single resource file that was used when compiled.- Returns:
- the single resource file
- Throws:
- IllegalStateException- if the compiler wasn't passed exactly one file
 
- 
getResourceFilesReturn all resource files that were compiled.- Returns:
- the resource files used by the compiler
 
- 
getInstanceReturn a new instance of a compiled class of the given type. There must be only a single instance and it must have a default constructor.- Type Parameters:
- T- the required type
- Parameters:
- type- the required type
- Returns:
- an instance of type created from the compiled classes
- Throws:
- IllegalStateException- if no instance can be found or instantiated
 
- 
getInstanceReturn an instance of a compiled class identified by its class name. The class must have a default constructor.- Type Parameters:
- T- the type to return
- Parameters:
- type- the type to return
- className- the class name to load
- Returns:
- an instance of the class
- Throws:
- IllegalStateException- if no instance can be found or instantiated
 
- 
getAllCompiledClassesReturn all compiled classes.- Returns:
- a list of all compiled classes
 
 
-