Package io.github.mkoncek.classpathless
Class ClasspathClassesProvider
- java.lang.Object
-
- io.github.mkoncek.classpathless.ClasspathClassesProvider
-
- All Implemented Interfaces:
ClassesProvider
public class ClasspathClassesProvider extends java.lang.Object implements ClassesProvider
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Map<java.lang.String,java.nio.file.Path>
classesToClassFilePaths
java.util.List<java.lang.String>
classpath
(package private) static java.lang.String
CP_SEPARATOR
-
Constructor Summary
Constructors Constructor Description ClasspathClassesProvider(java.lang.String classpath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.Map<java.lang.String,java.nio.file.Path>
findAllClasses(java.util.List<java.lang.String> classpath)
java.util.Collection<IdentifiedBytecode>
getClass(ClassIdentifier... names)
Callback for compiler, which provides, on demand, the dependencies compiler is missing.java.util.List<java.lang.String>
getClassPathListing()
Warning: may include lambdas and will include inner classes with $notations.private static java.util.List<java.lang.String>
obtainClasspath(java.lang.String classpath)
-
-
-
Method Detail
-
getClass
public java.util.Collection<IdentifiedBytecode> getClass(ClassIdentifier... names)
Description copied from interface:ClassesProvider
Callback for compiler, which provides, on demand, the dependencies compiler is missing.- Specified by:
getClass
in interfaceClassesProvider
- Parameters:
names
- names of classes the provider should return- Returns:
- bytecode of all found classes
-
getClassPathListing
public java.util.List<java.lang.String> getClassPathListing()
Description copied from interface:ClassesProvider
Warning: may include lambdas and will include inner classes with $notations. Intentionally not using ClassIdentifier, but may change to it- Specified by:
getClassPathListing
in interfaceClassesProvider
- Returns:
- all fully qualified classes visible from classpath
-
obtainClasspath
private static java.util.List<java.lang.String> obtainClasspath(java.lang.String classpath)
- Parameters:
classpath
-- Returns:
- A list of strings representing the roots and /* expanded to jar files
-
findAllClasses
private static java.util.Map<java.lang.String,java.nio.file.Path> findAllClasses(java.util.List<java.lang.String> classpath)
-
-