io.github.effiban.scala2java.spi.predicates.TermSelectHasApplyMethod.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala2java-spi_2.13 Show documentation
Show all versions of scala2java-spi_2.13 Show documentation
Plugin Interface for Scala2Java Tool
The newest version!
package io.github.effiban.scala2java.spi.predicates
import scala.meta.Term
/** A predicate which determines whether a given [[Term.Select]] appearing in the Scala source file,
* has an `apply()` method (whether defined implicitly or explicitly).
* This is true of all case classes and functions, and also some companion objects.
* The framework will use this in order to properly identify invocations where the `apply()`
* does not appear explicitly.
*/
// TODO - once file-scope or external type inference is added, add ability to check by a given type as well
trait TermSelectHasApplyMethod extends (Term.Select => Boolean)
object TermSelectHasApplyMethod {
/** The default predicate which returns false, meaning none have an `apply()` method */
val None: TermSelectHasApplyMethod = _ => false
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy