public abstract class AbstractPathResolver extends java.lang.Object implements Resolver
| Modifier and Type | Field and Description |
|---|---|
protected @Nullable java.util.Set<java.lang.String> |
files |
protected java.nio.file.Path |
path |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPathResolver(java.nio.file.Path path) |
| Modifier and Type | Method and Description |
|---|---|
net.covers1624.quack.collection.FastStream<java.lang.String> |
getAllClasses()
Gets all the classes available from this
Resolver. |
net.covers1624.quack.collection.FastStream<java.lang.String> |
getAllResources()
Gets all the non-class files available from this
Resolver. |
protected java.util.Set<java.lang.String> |
getFiles() |
byte[] |
getResource(java.lang.String name)
Gets the bytes for a given resource.
|
protected java.nio.file.Path |
getRootPath() |
boolean |
hasResource(java.lang.String name)
Checks if this resolver is capable of resolving the given resource.
|
protected abstract void |
validate() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, findResolver, getClassBytes, hasClassprotected final java.nio.file.Path path
@Nullable protected @Nullable java.util.Set<java.lang.String> files
protected abstract void validate()
protected java.nio.file.Path getRootPath()
protected final java.util.Set<java.lang.String> getFiles()
public byte[] getResource(java.lang.String name)
throws java.io.IOException
ResolvergetResource in interface Resolvername - The name of the input.java.io.IOException - If an error occurred whilst reading a file.Resolver.getAllResources()public boolean hasResource(java.lang.String name)
ResolverhasResource in interface Resolvername - The resource name.public net.covers1624.quack.collection.FastStream<java.lang.String> getAllClasses()
ResolverResolver.getAllClasses in interface Resolverpublic net.covers1624.quack.collection.FastStream<java.lang.String> getAllResources()
ResolverResolver.getAllResources in interface Resolver