Class AbstractPathResolver
java.lang.Object
net.covers1624.coffeegrinder.util.resolver.AbstractPathResolver
- All Implemented Interfaces:
Closeable,AutoCloseable,Resolver
- Direct Known Subclasses:
FolderResolver,JarResolver
Created by covers1624 on 8/4/21.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.covers1624.quack.collection.FastStream<String> Gets all the classes available from thisResolver.net.covers1624.quack.collection.FastStream<String> Gets all the non-class files available from thisResolver.getFiles()byte @Nullable []getResource(String name) Gets the bytes for a given resource.protected PathbooleanhasResource(String name) Checks if this resolver is capable of resolving the given resource.protected abstract voidvalidate()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.covers1624.coffeegrinder.util.resolver.Resolver
close, getClassBytes, hasClass
-
Field Details
-
path
-
files
-
-
Constructor Details
-
AbstractPathResolver
-
-
Method Details
-
validate
protected abstract void validate() -
getRootPath
-
getFiles
-
getResource
Description copied from interface:ResolverGets the bytes for a given resource.- Specified by:
getResourcein interfaceResolver- Parameters:
name- The name of the input.- Returns:
- The bytes of the resource or literal null if no bytes were found.
- Throws:
IOException- If an error occurred whilst reading a file.- See Also:
-
hasResource
Description copied from interface:ResolverChecks if this resolver is capable of resolving the given resource.- Specified by:
hasResourcein interfaceResolver- Parameters:
name- The resource name.- Returns:
- If the resolver can resolve this class.
-
getAllClasses
Description copied from interface:ResolverGets all the classes available from thisResolver.- Specified by:
getAllClassesin interfaceResolver- Returns:
- The classes.
-
getAllResources
Description copied from interface:ResolverGets all the non-class files available from thisResolver.- Specified by:
getAllResourcesin interfaceResolver- Returns:
- The non-class files.
-