public class JarTypeSolver extends Object implements TypeSolver
JAVA_LANG_OBJECT| Constructor and Description |
|---|
JarTypeSolver(File pathToJar)
Create a
JarTypeSolver from a File. |
JarTypeSolver(InputStream jarInputStream)
Create a
JarTypeSolver from a InputStream. |
JarTypeSolver(Path pathToJar)
Create a
JarTypeSolver from a Path. |
JarTypeSolver(String pathToJar)
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, hasTypepublic JarTypeSolver(Path pathToJar) throws IOException
JarTypeSolver from a Path.pathToJar - The path where the jar is located.IOException - If an I/O exception occurs while reading the Jar.public JarTypeSolver(File pathToJar) throws IOException
JarTypeSolver from a File.pathToJar - The file pointing to the jar is located.IOException - If an I/O exception occurs while reading the Jar.public JarTypeSolver(String pathToJar) throws IOException
JarTypeSolver from a path in a String format.pathToJar - The path pointing to the jar.IOException - If an I/O exception occurs while reading the Jar.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–2024. All rights reserved.