Class ClassResolver
java.lang.Object
net.covers1624.coffeegrinder.util.resolver.ClassResolver
Created by covers1624 on 8/4/21.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResolver(Path path) Adds a Resolver to the list.voidaddResolverFirst(Path path) Adds a Resolver to the front of the list.voidaddResolvers(Iterable<Path> paths) Add all the provided paths as resolvers.booleanclassExists(String cName) byte @Nullable []getClassNode(String cName) Gets aCachedClassNodefrom thisClassResolver.voidreset()voidAdds a resolver for a decompilation target.void
-
Constructor Details
-
ClassResolver
public ClassResolver()
-
-
Method Details
-
setTarget
Adds a resolver for a decompilation target.- Parameters:
target- The path to add.- Throws:
IllegalArgumentException- Thrown when an unknown file type is provided.
-
setTarget
-
addResolverFirst
Adds a Resolver to the front of the list.Resolvers added to the front have a higher resolution priority.
- Parameters:
path- The path to add.- Throws:
IllegalArgumentException- Thrown when an unknown file type is provided.
-
addResolver
Adds a Resolver to the list.- Parameters:
path- The path to add.- Throws:
IllegalArgumentException- Thrown when an unknown file type is provided.
-
addResolvers
Add all the provided paths as resolvers.- Parameters:
paths- The paths to add.- Throws:
IllegalArgumentException- Thrown when an unknown file type is provided.
-
getTargetResolver
-
classExists
-
getBytes
- Throws:
IOException
-
getClassNode
Gets aCachedClassNodefrom thisClassResolver.- Parameters:
cName- The Class name to load.- Returns:
- The
CachedClassNodeor null if the class could not be loaded. - Throws:
RuntimeException- If an error occurred whilst loading the class. TODO refine this throwable.
-
reset
public void reset()
-