Class ReflectionTypeSolver
java.lang.Object
com.github.javaparser.symbolsolver.resolution.typesolvers.ClassLoaderTypeSolver
com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver
- All Implemented Interfaces:
TypeSolver
Uses reflection to resolve types.
Classes on the classpath used to run your application will be found.
No source code is available for the resolved types.
- Author:
- Federico Tomassetti
-
Field Summary
Fields inherited from interface com.github.javaparser.symbolsolver.model.resolution.TypeSolver
JAVA_LANG_OBJECT
-
Constructor Summary
ConstructorDescriptionResolves classes from the JRE that is currently running.ReflectionTypeSolver(boolean jreOnly)
-
Method Summary
Methods inherited from class com.github.javaparser.symbolsolver.resolution.typesolvers.ClassLoaderTypeSolver
getParent, setParent, tryToSolveType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.github.javaparser.symbolsolver.model.resolution.TypeSolver
getRoot, getSolvedJavaLangObject, hasType, solveType
-
Constructor Details
-
ReflectionTypeSolver
public ReflectionTypeSolver(boolean jreOnly)- Parameters:
jreOnly
- if true, will only resolve types from the java or javax packages. This is an easy way to say "I need a JRE to solve classes, and the one that is currently running is fine." If false, will resolve any kind of type.
-
ReflectionTypeSolver
public ReflectionTypeSolver()Resolves classes from the JRE that is currently running. (It calls the other constructor with "true".)
-
-
Method Details
-
filterName
- Overrides:
filterName
in classClassLoaderTypeSolver
-