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(Resolver resolver) Adds the given resolver to the end of the list.voidaddResolvers(Iterable<Resolver> resolvers) Adds all the provided 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
-
addResolver
Adds the given resolver to the end of the list.- Parameters:
resolver- The resolver to add.
-
addResolvers
Adds all the provided resolvers.- Parameters:
resolvers- The resolvers.
-
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()
-