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