(String path)
| 60 | } |
| 61 | |
| 62 | @Override |
| 63 | public Pair<byte[], String> getClassFileContent(String path) throws IOException { |
| 64 | if (!path.endsWith(fileSuffix)) { |
| 65 | Matcher.LOGGER.debug("getClassFileContent invalid path: {}", path); |
| 66 | throw new NoSuchFileException(path); |
| 67 | } |
| 68 | |
| 69 | String clsName = path.substring(0, path.length() - fileSuffix.length()); |
| 70 | ClassInstance cls = env.getClsByName(clsName, nameType); |
| 71 | |
| 72 | if (cls == null) { |
| 73 | Matcher.LOGGER.debug("getClassFileContent missing cls: {}", clsName); |
| 74 | throw new NoSuchFileException(path); |
| 75 | } |
| 76 | |
| 77 | if (cls.getAsmNodes() == null) { |
| 78 | Matcher.LOGGER.debug("getClassFileContent unknown cls: {}", clsName); |
| 79 | throw new NoSuchFileException(path); |
| 80 | } |
| 81 | |
| 82 | byte[] data = cls.serialize(nameType); |
| 83 | |
| 84 | return Pair.make(data, path); |
| 85 | } |
| 86 | |
| 87 | private final ClassFeatureExtractor env; |
| 88 | private final NameType nameType; |
nothing calls this directly
no test coverage detected