Record Class ScalaCompiler.SourceFile
java.lang.Object
java.lang.Record
io.micronaut.scala.processing.test.ScalaCompiler.SourceFile
- Record Components:
className- The primary class name declared by the source, used to derive the file namesource- The source textextension- The file extension,.scalaor.java
- Enclosing class:
ScalaCompiler
-
Constructor Summary
ConstructorsConstructorDescriptionSourceFile(String className, String source, String extension) Creates an instance of aSourceFilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionrecord component.final inthashCode()Returns a hash code value for this object.static ScalaCompiler.SourceFileA Java source, for joint Java/Scala compilation.static ScalaCompiler.SourceFileA Scala source.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SourceFile
-
-
Method Details
-
scala
A Scala source.- Parameters:
className- The primary class namesource- The source text- Returns:
- The source
-
java
A Java source, for joint Java/Scala compilation. dotty parses Java sources for their signatures, so this exercises the compiler's own Java symbol reader rather than the classpath reader used for pre-compiled Java classes.- Parameters:
className- The primary class namesource- The source text- Returns:
- The source
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
className
-
source
-
extension
-