Minor, add toString() to OutputFile for debugging
This commit is contained in:
@@ -33,6 +33,8 @@ public trait OutputFile {
|
||||
public val sourceFiles: List<File>
|
||||
public fun asByteArray(): ByteArray
|
||||
public fun asText(): String
|
||||
|
||||
override fun toString() = "$relativePath (compiled from $sourceFiles)"
|
||||
}
|
||||
|
||||
class SimpleOutputFile(
|
||||
|
||||
@@ -80,6 +80,7 @@ public final class ClassFileFactory extends GenerationStateAware implements Outp
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<OutputFile> asList() {
|
||||
done();
|
||||
@@ -173,11 +174,13 @@ public final class ClassFileFactory extends GenerationStateAware implements Outp
|
||||
this.relativeClassFilePath = relativeClassFilePath;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getRelativePath() {
|
||||
return relativeClassFilePath;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<File> getSourceFiles() {
|
||||
ClassBuilderAndSourceFileList pair = generators.get(relativeClassFilePath);
|
||||
@@ -210,6 +213,12 @@ public final class ClassFileFactory extends GenerationStateAware implements Outp
|
||||
public String asText() {
|
||||
return builderFactory.asText(generators.get(relativeClassFilePath).classBuilder);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return getRelativePath() + " (compiled from " + getSourceFiles() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
private static final class ClassBuilderAndSourceFileList {
|
||||
|
||||
Reference in New Issue
Block a user