public class ClassResolver
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ClassResolver.ClassNotFoundException
Deprecated.
|
| Constructor and Description |
|---|
ClassResolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResolver(java.nio.file.Path path)
Adds a Resolver to the list.
|
void |
addResolverFirst(java.nio.file.Path path)
Adds a Resolver to the front of the list.
|
void |
addResolvers(java.lang.Iterable<java.nio.file.Path> paths)
Add all the provided paths as resolvers.
|
boolean |
classExists(java.lang.String cName) |
byte[] |
getBytes(java.lang.String cName) |
CachedClassNode |
getClassNode(java.lang.String cName)
Gets a
CachedClassNode from this ClassResolver. |
Resolver |
getTargetResolver() |
void |
reset() |
void |
setTarget(java.nio.file.Path target)
Adds a resolver for a decompilation target.
|
void |
setTarget(Resolver resolver) |
public void setTarget(java.nio.file.Path target)
target - The path to add.java.lang.IllegalArgumentException - Thrown when an unknown
file type is provided.public void setTarget(Resolver resolver)
public void addResolverFirst(java.nio.file.Path path)
Resolvers added to the front have a higher resolution priority.
path - The path to add.java.lang.IllegalArgumentException - Thrown when an unknown
file type is provided.public void addResolver(java.nio.file.Path path)
path - The path to add.java.lang.IllegalArgumentException - Thrown when an unknown
file type is provided.public void addResolvers(java.lang.Iterable<java.nio.file.Path> paths)
paths - The paths to add.java.lang.IllegalArgumentException - Thrown when an unknown
file type is provided.public Resolver getTargetResolver()
public boolean classExists(java.lang.String cName)
public byte[] getBytes(java.lang.String cName)
throws java.io.IOException
java.io.IOExceptionpublic CachedClassNode getClassNode(java.lang.String cName)
CachedClassNode from this ClassResolver.cName - The Class name to load.CachedClassNode or null if the class could not be loaded.java.lang.RuntimeException - If an error occurred whilst loading the class. TODO refine this throwable.public void reset()