public class ClassFileSourceChained extends java.lang.Object implements ClassFileSource2
ClassFileSource.Factory| Modifier and Type | Field and Description |
|---|---|
private java.util.Collection<ClassFileSource2> |
sources |
| Constructor and Description |
|---|
ClassFileSourceChained(java.util.Collection<ClassFileSource2> sources) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<java.lang.String> |
addJar(java.lang.String jarPath)
CFR would like to know about all classes contained within the jar at
jarPath |
JarContent |
addJarContent(java.lang.String jarPath,
AnalysisType analysisType)
CFR would like to know about all classes contained within the jar at
jarPath |
Pair<byte[],java.lang.String> |
getClassFileContent(java.lang.String path)
Given a path to a class file, return a pair of
* the content, as a byte array.
|
java.lang.String |
getPossiblyRenamedPath(java.lang.String path)
It's possible that an obfuscator might have generated a bizarre and magic file inside a jar such that
it's path is too big to read.
|
void |
informAnalysisRelativePathDetail(java.lang.String usePath,
java.lang.String classFilePath)
CFR has loaded your class, and it has decided that if it were in the correct location, it would instead
be at
classFilePath. |
private final java.util.Collection<ClassFileSource2> sources
public ClassFileSourceChained(java.util.Collection<ClassFileSource2> sources)
public JarContent addJarContent(java.lang.String jarPath, AnalysisType analysisType)
ClassFileSource2jarPathaddJarContent in interface ClassFileSource2jarPath - path to a jar.public void informAnalysisRelativePathDetail(java.lang.String usePath,
java.lang.String classFilePath)
ClassFileSourceclassFilePath.
This information should be taken into account when loading any inner classes, or other classes that CFR tries
to load in order to improve decompilation.
Why do you care? Let's say you have a class in a top level outside its normal structure, Bob.class.
It should be found at org/person/Bob.class.
Implementors of this will be called back with "", and "org/person", telling you that org.person are implicit
in your path. CFR may later ask you to load "org/person/Bob$1.class".
You should adjust this path to match where Bob$1 actually is.
This will also be called with null, null to reset.informAnalysisRelativePathDetail in interface ClassFileSourceusePath - the path that was used to load a class file.classFilePath - the path that CFR actually suspects it should have been, based on package name.public java.util.Collection<java.lang.String> addJar(java.lang.String jarPath)
ClassFileSourcejarPathaddJar in interface ClassFileSourcejarPath - path to a jar.public java.lang.String getPossiblyRenamedPath(java.lang.String path)
ClassFileSourcegetPossiblyRenamedPath in interface ClassFileSourcepath - Path CFR would like to usepublic Pair<byte[],java.lang.String> getClassFileContent(java.lang.String path) throws java.io.IOException
ClassFileSourcegetClassFileContent in interface ClassFileSourcepath - relative path of class we wish to load.java.io.IOException - if you can't find the class.