public class JarTypeSolver extends Object implements TypeSolver
JAVA_LANG_OBJECT, JAVA_LANG_RECORD| Constructor and Description |
|---|
JarTypeSolver(File pathToJarOrClassFileHierarchy)
Create a
JarTypeSolver from a File. |
JarTypeSolver(InputStream jarInputStream)
Create a
JarTypeSolver from a InputStream. |
JarTypeSolver(Path pathToJarOrClassFileHierarchy)
Create a
JarTypeSolver from a Path. |
JarTypeSolver(String pathToJarOrClassFileHierarchy)
Create a
JarTypeSolver from a path in a String format. |
| Modifier and Type | Method and Description |
|---|---|
static JarTypeSolver |
getJarTypeSolver(String pathToJar)
Deprecated.
Use of this static method (previously following singleton pattern) is strongly discouraged
and will be removed in a future version. For now, it has been modified to return a new instance to
prevent the IllegalStateException being thrown (as reported in #2547), allowing it to be called multiple times.
|
Set<String> |
getKnownClasses()
Get the set of classes that can be resolved in the current type solver.
|
TypeSolver |
getParent() |
void |
setParent(TypeSolver parent) |
ResolvedReferenceTypeDeclaration |
solveType(String name) |
SymbolReference<ResolvedReferenceTypeDeclaration> |
tryToSolveType(String name) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRoot, getSolvedJavaLangObject, getSolvedJavaLangRecord, hasTypepublic JarTypeSolver(Path pathToJarOrClassFileHierarchy) throws IOException
JarTypeSolver from a Path.pathToJarOrClassFileHierarchy - The path where the jar or class file hierarchy is located.IOException - If an I/O exception occurs while reading the Jar or class file hierarchy.public JarTypeSolver(File pathToJarOrClassFileHierarchy) throws IOException
JarTypeSolver from a File.pathToJarOrClassFileHierarchy - The file pointing to the jar or class file hierarchy is located.IOException - If an I/O exception occurs while reading the Jar or class file hierarchy.public JarTypeSolver(String pathToJarOrClassFileHierarchy) throws IOException
JarTypeSolver from a path in a String format.pathToJarOrClassFileHierarchy - The path pointing to the jar or class file hierarchy.IOException - If an I/O exception occurs while reading the Jar or class file hierarchy.public JarTypeSolver(InputStream jarInputStream) throws IOException
JarTypeSolver from a InputStream.
The content will be dumped into a temporary file to be used in the type solver.jarInputStream - The input stream to be used.IOException - If an I/O exception occurs while creating the temporary file.@Deprecated public static JarTypeSolver getJarTypeSolver(String pathToJar) throws IOException
IOExceptionpublic Set<String> getKnownClasses()
public TypeSolver getParent()
getParent in interface TypeSolverpublic void setParent(TypeSolver parent)
setParent in interface TypeSolverpublic SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveType(String name)
tryToSolveType in interface TypeSolverpublic ResolvedReferenceTypeDeclaration solveType(String name) throws UnsolvedSymbolException
solveType in interface TypeSolverUnsolvedSymbolExceptionCopyright © 2007–2025. All rights reserved.